So im getting this error, although im not importing safe_indexing at all. Does anyone have an idea why that might be ? Source: Python..

#### Category : scikit-learn

I am currently learning about supervised machine learning algorithms myself. Nowadays, we could simply predict outcomes using a pre-made KNN model from the scikit-learn KNeighborsClassifier. I want to understand and try to (re)build the algorithm of the KNeighborsClassifier model. But I find it difficult to do so. My data ‘deliveries.csv’ contains 3 columns [‘quantity’ (int), ..

I have a problem and I would like to share it with you. I was doing house price regression model and I got the data from Kaggle , and when I try to convert the categorical variables to dummy variables I got something not usual, for the training data, I got the shape of, ********from ..

Task 1 Import two modules sklearn.datasets, and sklearn.model_selection. • Load popular iris data set from sklearn.datasets module and assign it to variable iris. Split iris.data into two sets names X_train and X_test. Also, split iris.target into two sets Y train and Y_test. o Hint: Use train_test_split method from sklearn.model_selection; set random_state to 30 and perform ..

I am predicting on a dataset that has three different kind of output variables, and I have identified three different models that respectively are able to perform one output well. How can I combine the models so that I can use all three for live prediction? To clarify, let X_train be the training set and ..

For example, ss is an sklearn.preprocessing.StandardScaler object. If ss is fitted already, I want to use it to transform my data. If ss is not fitted yet, I want to use my data to fit it and transform my data. Is there a way to know whether ss is already fitted or not? Source: Python ..

I have a text dataset which has one column for reviews and another column for labels. I want to build a decision tree model by using that dataset, I used vectorizer but it gives ValueError: Number of labels=37500 does not match number of samples=1 error. Here is the code below, any help is appreciated. from ..

Task 1 Import two modules sklearn.datasets, and sklearn.model_selection. • Load popular iris data set from sklearn.datasets module and assign it to variable iris. Split iris.data into two sets names X_train and X_test. Also, split iris.target into two sets Y train and Y_test. o Hint: Use train_test_split method from sklearn.model_selection; set random_state to 30 and perform ..

I want to find the number of tree depth, number of leaves actually assigned in my xgboot regression model. Source: Python..

[X_forpredict is a (418,1) vector, X_train[:, 9] is a (889,1) vector, y_train is a (889,1) vector. So when i am predicting y_pred for X_forpredict why am I getting this error? error – ValueError: X has 418 features, but LinearRegression is expecting 889 features as input. why is LR expecting 889 features?]1 Source: Python..

## Recent Comments