12 questions
0
votes
1
answer
49
views
GridSeachCV custom profit function results with an error: missing 1 required positional argument: 'y'
I am trying to optimize my model with GridSearchCV, using a custom profit function. However, when I Run my code, I end up with the following error message: TypeError: profit_scorer() missing 1 ...
0
votes
1
answer
88
views
Getting following error on generating language scorer on Deepspeech
File "generate_scorer_package", line 1
SyntaxError: Non-UTF-8 code starting with '\xea' in file generate_scorer_package on line 2, but no encoding declared; see http://python.org/dev/peps/...
4
votes
1
answer
710
views
What is the difference between needs_proba and needs_threshold in scikit-learn make_scorer function?
Difference between them is not well explained in make_scorer documentation. I observed that if needs_proba or needs_threshold is set to True, scoring function receives pred_proba instead of y_pred. ...
0
votes
0
answers
87
views
sklearn extract "sign of scorer" from GridSearch Object
I have a situation where I can dynamically pass some scorers to a grid search object, either in the form of strings (=accuracy) as well as custom scorers, created via make_scorer where the parameter ...
0
votes
1
answer
389
views
Error with precision_score of XGBoost classifier with RandomizedSearchCV
I'm trying to make a classifier with XGBoost, I fit it with RandomizedSearchCV.
Here is the code of my function:
def xgboost_classifier_rscv(x,y):
from scipy import stats
from xgboost import ...
0
votes
1
answer
415
views
['kenlm/build/bin/build_binary', '-a', '255', '-q', '8', '-v', 'trie', 'lm_filtered.arpa', '/content/lm.binary']' returned non-zero exit status 1
During the build of lm binay to create scorer doe deepspeech model I was getting the following error again and again
subprocess.CalledProcessError: Command '['/content/kenlm/build/bin/build_binary', '-...
0
votes
0
answers
462
views
Scikit-learn make_scorer custom metric problem for multiclass clasification
I am doing a churn analysis. I used
randomcv = RandomizedSearchCV(estimator=clf,param_distributions = params_grid,
cv=kfoldcv,n_iter=100, n_jobs=-1, scoring='roc_auc')
and ...
1
vote
1
answer
571
views
What is "check_scoring" in sklearn.metrics?
What is check_scoring in sklearn.metrics, how does it work, and what is it its difference with make_scorer?
0
votes
3
answers
3k
views
Set up kenlm for Windows
The official website makes it pretty clear that there is no support for kenlm in Windows. There is a Windows tag at the github repository but it seems to be maintained by few random contributors then ...
0
votes
1
answer
780
views
Matthew's Correlation Coefficient and Precision throws errors in RandomizedSearchCV
I keep getting this error:
invalid value encountered in double_scalars: mcc = cov_ytyp / np.sqrt(cov_ytyt * cov_ypyp)
Is there something wrong with how I implemented it in a custom-scorer?
...
2
votes
1
answer
4k
views
using cross validation for calculating specificity [duplicate]
I want to use cross-validation for calculating specificity. I found code for calculating accuracy, really, f1-score, and precision. but I couldn't found for specificity.
for example, the code for f1-...
2
votes
1
answer
4k
views
How to pass f1_score arguments to the make_scorer in scikit learn to use with cross_val_score?
I have a multi-classification problem (with many labels) and I want to use F1 score with 'average' = 'weighted'.
Something I do wrong though. Here is my code:
from sklearn.metrics import f1_score
...