New answers tagged scikit-learn
1
vote
Why is Scikit's Support Vector Classifier returning support vectors with decision scores outside [-1,1]? Is this a mistake?
Misclassified points will always be support vectors, even when they are "badly misclassified" and lie beyond the margin, with decision function scores outside of $[-1, 1]$.
1
vote
F2 score or the Area under the Precision-Recall-Curve as a scoring metric
There's nothing to keep you from calculating several metrics, so evaluate all metrics that are relevant for your application.
A model is rarely (if ever?) characterized well with a single metric.
E.g....
1
vote
Accepted
What are the main difference between a QQ plot and a probability plot for measuring nomality?
These are the same two QQ plots. However, the aspect ratios and the two lines are different.
Aside: In the second QQ plot (with better scaling) we see that the sample has a heavier right tail than the ...
0
votes
Is there any background for constraining covariances on fitting GMM?
Indeed, there is mathematical background for the reasoning of structured covariances of GMMS. See, for example, this paper
https://ieeexplore.ieee.org/document/342500.
It discusses structured ...
2
votes
Accepted
Scikit-learn QuantileRegressor memory allocation error. No issue with statsmodel QuantReg with the same data
The sklearn QuantileRegressor class uses linear programming to solve the quantile regression problem which is much more computationally expensive than iterative reweighted least squares as used by ...
0
votes
How to properly impute values on the test set using imputer (missForest)
You should use imputer.transform(test) to get accurate generalization metrics from your model. If you use the whole dataset, then you will leak information to ...
0
votes
Accepted
Which AI technique should I pair with my Linear Regression for cost appraisals?
There are a ton of things that would be 'hybrid' by your definition but I doubt any would help significantly. The most straightforward thing for you data may be to use a pretrained nlp model to embed ...
1
vote
For K-means clusters, how can I ensure each cluster has a minimum of n numbers
You can use faiss. Its clustering model has options like: min_points_per_centroid/ max_points_per_centroid. It has kmeans, but I ...
1
vote
What does it mean having 1 as best k parameter in K-NN?
There is nothing "bad" about $k=1$. It's a hyperparameter to tune, so different values would work for different problems. If you did your hyperparameter tuning correctly, i.e. there are no ...

Tim♦
- 117k
1
vote
Why are sklearn's cross_val_score values not increasing with the size of the training set?
To add to @sycorax' answer:
If I understand the description of your data correctly, you have
features: resistivity, density, ...
(how many such physical properties do you have?)
And in terms of ...
2
votes
Accepted
Why are sklearn's cross_val_score values not increasing with the size of the training set?
I don't think this result is too surprising. Each of the points in your plot has an associated error measurement associated with it. The overall number of holes only varies in a small range, so the ...
1
vote
Graphical lasso numerical problem (not SPD matrix result)
I also have run into this SPD problem. I was unable to avoid it by rescaling my data because I was interested in conducting simulations in a particular (strange) statistical regime.
I then found the ...
0
votes
Different precisions in predicting two classes with logistic regression
Use LogisticRegression.predict_proba() to extract the predicted probabilities. Then compare them to a different threshold than the 0.5 that is inexplicably built ...
Top 50 recent answers are included
Related Tags
scikit-learn × 1697python × 640
machine-learning × 590
regression × 230
classification × 222
cross-validation × 193
random-forest × 170
svm × 151
feature-selection × 94
logistic × 91
pca × 76
clustering × 63
cart × 57
predictive-models × 50
neural-networks × 48
boosting × 45
hyperparameter × 45
r × 39
lasso × 38
gaussian-process × 33
roc × 33
multi-class × 33
dimensionality-reduction × 31
multiple-regression × 29
k-means × 29