Comments (5)
That explains those messages i'm getting : when using fit and trying to predict :
_logistic.py:444:
ConvergenceWarning: lbfgs failed to converge (status=1):
STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.
Increase the number of iterations (max_iter) or scale the data as shown in:
https://scikit-learn.org/stable/modules/preprocessing.html
Please also refer to the documentation for alternative solver options:
https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression
n_iter_i = _check_optimize_result(
`df_ri_manclassif['predicted']= model(df_ri_manclassif['global_text'].to_list())
this is the message : ---------------------------------------------------------------------------
NotFittedError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_7856/2981536964.py in
----> 1 df_ri_manclassif['predicted']= model(df_ri_manclassif['global_text'].to_list())
c:\Users\doub2420\AppData\Local\Programs\Python\Python39\lib\site-packages\setfit\modeling.py in call(self, inputs)
60 def call(self, inputs):
61 embeddings = self.model_body.encode(inputs)
---> 62 return self.model_head.predict(embeddings)
63
64 def _save_pretrained(self, save_directory):
c:\Users\doub2420\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\linear_model_base.py in predict(self, X)
445 Vector containing the class labels for each sample.
446 """
--> 447 scores = self.decision_function(X)
448 if len(scores.shape) == 1:
449 indices = (scores > 0).astype(int)
c:\Users\doub2420\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\linear_model_base.py in decision_function(self, X)
425 this class would be predicted.
426 """
--> 427 check_is_fitted(self)
428
429 X = self._validate_data(X, accept_sparse="csr", reset=False)
...
-> 1345 raise NotFittedError(msg % {"name": type(estimator).name})
1346
1347`
from setfit.
Well, I made a branch where I can enable normalize.
I did some tests with default settings, a normal BERT model (no pretrained sentence embedding model) and optuna.
Letting optuna optimize also the normalize parameter (True or False) shows that it is definitly better when NOT doing it.
This is strange since it means that the length of the vector seems to encode important information...
See here:
from setfit.
@lewtun what is your opinion on this? Do you have more insights?
from setfit.
Seems like SetFit already has something like this but only hidden in a script and not the main package...
setfit/scripts/setfit/run_fewshot.py
Line 118 in 43dbaf1
from setfit.
this is implemented via #177 - closing this
from setfit.
Related Issues (20)
- Kernel crash due to out of memory for large dataset HOT 7
- Displayed "Num examples" after the training start seems wrong HOT 1
- Unfreezing and freezing in new version HOT 3
- Runtime error during training HOT 2
- RuntimeError: CUDA error: device-side assert triggered HOT 2
- Very low and inaccurate prediction probabilities for multi-class classification HOT 4
- create_model_card() TemplateAssertionError HOT 1
- Unable to reproduce hyper param results HOT 4
- Use e5-mistral-7b-instruct as body model for text classification HOT 2
- Unable to run Text-Classification task because of error related to 'experiment_name' HOT 3
- trust_remote_code not passed in properly
- Totally unreliable results. What I'm doing wrong? HOT 1
- ABSA for Non-English Language HOT 4
- facing issue while importing setfit classifier HOT 1
- Warning from sentence-transformer, version 2.3.1 HOT 1
- Hyperparameter tuning for AbsaModel
- No timeout downloading model card data from hub api when loading pretrained model in disconnected environment
- model_config = model.config.to_dict() - AttributeError: 'dict' object has no attribute 'to_dict' HOT 9
- ValueError: Multioutput target data is not supported with label binarization
- Mis-alignment between Sentence Embeddings and Classifier in multi-label classification ?
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 setfit.