# Tag Info

1 vote

### high degree polynomial model with sklearn does not fit

Try fit_intercept=True The fit intercept option determines whether the model should fit an intercept.

### Get multiple predictions from a knn model

Instead of using the classifier you might need to use a nearest neighbor instance: https://scikit-learn.org/stable/modules/neighbors.html This will allow you to get indices of nearest neighbors. An ...
• 2,320

### sklearn.decomposition.PCA explained_variance_ratio_ attribute does not exist

Check your version then. The attribute explained_variance_ratio_ exists the latest version to this date, sklearn 1.2.1. https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html
• 1
1 vote

### problem with imputing in sklearn

in the second cell you are printing the isnull() on train_date... But you have applied imputer on train_data and assigned values to data_with_imputed_values... Try to replace train_data in second cell ...

### problem with standardScaler

What is df_scaled here? If df_scaled is the Pandas DataFrame object, As we know that pandas DataFrame are 2D objects therefore it is giving an error here. If you do like this: ...

### problem with standardScaler

I suppose when you said df_scaled is empty, you actually meant all values inside is 0 (not df_scaled = None, which does not make sense). You can try this: ...
• 236

### What is Auto-Sklearn Dummy Model?

Dummy model is a model which predicts by purely guessing or using simple rule. E.g. for classification randomly assigns a class or just uses the majority class; for regression just uses the mean. It ...
• 536
Accepted

### DecisionTreeClassifier cannot take one-hot encoded classes?

You need to integer encode your labels instead of one-hot encoding them. [1, 0, 0] -> 0 [0, 1, 0] -> 1 [0, 0, 1] -> 2 so that the labels for multiclass classification (with K classes) that ...

### Random Forest with less samples & variation in test_scores

You have 75 samples which is not enough data for meaningful machine learning. The result is high variance in performance between different runs.
• 18.8k

### Random Forest with less samples & variation in test_scores

It could be that these "outliers" which you removed were not really the problem, maybe there were in fact easier to predict then the more common cases and increased $R^2$ significantly, and ...
• 394

### What is the difference between the CCA weights and rotations?

From the scikit-learn documentation for Canonical Correlation Analysis (CCA): x_weights_ … The left singular vectors of the cross-covariance matrices of each iteration. x_rotations_ … The projection ...
• 18.8k