Skip to main content

New answers tagged

1 vote
Accepted

How does KNNImputer stores fitted values of the train set?

Indeed it does simply store all training samples: https://github.com/scikit-learn/scikit-learn/blob/5491dc695dbe2c9bec3452be5f3c409706ff7ee7/sklearn/impute/_knn.py#L238
Ben Reiniger's user avatar
  • 4,723
2 votes
Accepted

Implementations of Lasso in Python and R?

LASSO in Python With Python, in my experience, the most common implementation of LASSO (Least Absolute Shrinkage and Selection Operator) is provided by the ...
Robert Long's user avatar
  • 62.5k
1 vote

Do you need to adjust the probability if you use the 'class_weight' parameter in LogisticRegression-sklearn?

You seem to be mixing up a few notions that often get mixed up in machine learning work. You start out by saying you want the probabilities and use a logistic regression to estimate them. Outstanding! ...
Dave's user avatar
  • 64.2k
2 votes

Finding the corners of noisy polygons

The following (using Mathematica) does not do what one would do "by eye" but that's because the data points don't fall perfectly on a desired number of line segments. This uses Mathematica's ...
JimB's user avatar
  • 3,930
1 vote
Accepted

Finding the corners of noisy polygons

Here's a shot at it using the Douglas-Peuker algorithm as whuber suggested. Using MATLAB ...
sav's user avatar
  • 239
1 vote
Accepted

Is my understanding/approach to nested cross-validation, final model tuning correct?

I want to make a statement of the generalizability of the approach to different independent training and testing datasets [...] my understanding is that I would do nested cross-validation. I think ...
MuhammedYunus's user avatar

Top 50 recent answers are included