Comments (2)
Trying to resolve the above error, I ensured that both X
(training step csr_matrix) and Xt
(prediction step csr_matrix) have the same number of features.
However, the following error has now occurred:
File "main.py", line 29, in perform_tasks
predict(params)
File "main.py", line 15, in predict
predict_helper.perform_predict()
File "/home/celso/projects/XMTC-Baselines/source/helper/PredictHelper.py", line 70, in perform_predict
prediction = model.predict(texts, texts_rpr)
File "/home/celso/projects/venvs/XMTC-Baselines/lib/python3.8/site-packages/pecos/xmc/xtransformer/model.py", line 588, in predict
pred_csr = self.concat_model.predict(
File "/home/celso/projects/venvs/XMTC-Baselines/lib/python3.8/site-packages/pecos/xmc/xlinear/model.py", line 503, in predict
Y_pred = self.model.predict(
File "/home/celso/projects/venvs/XMTC-Baselines/lib/python3.8/site-packages/pecos/xmc/base.py", line 1557, in predict
pred_csr = cur_model.predict(
File "/home/celso/projects/venvs/XMTC-Baselines/lib/python3.8/site-packages/pecos/xmc/base.py", line 853, in predict
clib.xlinear_single_layer_predict(
File "/home/celso/projects/venvs/XMTC-Baselines/lib/python3.8/site-packages/pecos/core/base.py", line 864, in xlinear_single_layer_predict
raise ValueError("Query matrix does not have sorted indices!")
ValueError: Query matrix does not have sorted indices!
How can I get around this error?
from pecos.
Hi @celsofranssa, as the error indicates, your input sparse matrices need to have sorted indices.
from pecos.
Related Issues (20)
- Extreme multi-label classification - Text data - training set size for a class
- XLinearModel preprocessing and metrics HOT 2
- Xtransformer Predict - Threshold HOT 3
- Trying to use HybridIndexer for Label Indexing, run into issue where TrieWrapper has no attribute '_sorted' HOT 14
- Add FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Search HOT 1
- Perform inference in C++/Java HOT 1
- XLinearModel (trained) when saving it generates an error OSError: [Errno 95] Operation not supported HOT 9
- ValueError: len(params.neg_mining_chain)=4 != 3 HOT 1
- Trying to understand Cluster chain shape using hybrid indexer HOT 5
- Hyperparameter optimization/tuning
- How do I adjust parameter when the recall of a particular label is zero In Classification Task?
- Indexer as hierarchicalkmeans cannot get the correct label partition
- FineTune on Custom Dataset
- Training process freezes without using GPUs
- Newlines in Tfidf vectorizer corpus cause runtime exceptions when loading a trained vectorizer HOT 1
- Some confusion in pecos.utils.smat_utils.binarized HOT 1
- Floating point exception (core dumped) problem
- Integrate Low-rank adaptation (LoRA)
- PEFA WSDM 24 HOT 1
- Cannot replicate the XR-Linear performance with TF-IDF features and a Fine-tune Embedding Model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pecos.