Scikit-learn is a machine-learning library for Python that provides simple and efficient tools for data analysis and data mining, with a focus on machine learning. It is accessible to everybody and reusable in various contexts. It is built on NumPy and SciPy. The project is open source and commercially usable (BSD license).
26,089 questions 3- Bountied 3
- Unanswered
- Frequent
- Score
- Unanswered (my tags)
My Grid Search keeps giving a bad score, why is that? (TFIDFVectorizer Pipeline)
I have made a pipeline using tfidfvectorizer and performed grid search but keep getting a high negative score when evaluating. I'm importing a dataset and cleaning it through lowering the case, ... python machine-learning scikit-learn ml tfidfvectorizer- 1
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1 is different from 2)
First time trying to make a fit on Python. I have sets of measurements and need to make a non-linear fit on provided data. Fit should be quadratic polynomial. Here are the code and the error: from ... python scikit-learn non-linear-regression- 63
Any idea what's happening here?
here is Clustering (Kmeans is applied and clusters are attained) then the radius for each cluster is being calculated between the center and the observations but I don't understand this here [:,0] I ... python scikit-learn k-means- 25
PLS regression MSE, RESS and PRESS
I want to evaluate the fit and prediction error analysis of a Partial Least Squares regression. My input is X and response is y: X = pd.DataFrame(np.array([[-0.267261, 0.662085, -0.534522, -0.408248], ... python machine-learning scikit-learn mse pls- 3
ROC_AUC from prediction probabilities from .pred_proba are better than from predictions from .pred
I have a multiclass classification problem. Now, I want to get the predictions from my fit classifier (OneVsRestClassifier(XGBoost)) to obtain the Area under the ROC curves in Scikit-Learn. I noticed ... python machine-learning scikit-learn xgboost multiclass-classification- 31
ML model error 'numpy.ndarray' object has no attribute 'predict'
I was trying to make a predictive model, but I can't find a way to solve this numpy-related issue with my code. I already imported the pickle file containing the model I saved from Google Colab, but I ... python pandas numpy flask scikit-learn- 1
Trying to use the SilhouetteVisualizer but its giving an error : AttributeError: 'NoneType' object has no attribute 'split'
I'm new to python and really need help with this.Trying to use the SilhouetteVisualizer but its giving an error : AttributeError: 'NoneType' object has no attribute 'split'. Please tell me what should ... python scikit-learn- 1
How to use RandomizedSearchCV of Scikit-Learn with ImageDataGenerator of Tensorflow
I'm trying to implement a RandomizedSearchCV using the ImageDataGenerators. Here an example of the generator used for the train set: train_datagen = ImageDataGenerator(rotation_range=20, ... python tensorflow keras scikit-learn hyperparameters- 33
Persistent AttributeError ('TfidfVectorizer' object has no attribute 'get_feature_names_out') even after updating scikit-learn
I was attempting to retrieve the tfidf matrix shape and the feature names with the following code: from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text ... python scikit-learn attributeerror- 25
How to plot KNN decision boundary line?
I am trying to draw this black thick line. How can I draw it? Here is the code I'm trying to edit. The code uses matplotlib and numpy libraries. I just want the black think line as shown in the first ... python matplotlib machine-learning scikit-learn knn- 1
Unable to train ML model using sklearn
I am currently trying to train the model, But the model tries to convert "Names" to float. And presents an error. So, from what I can understand. I cannot train model to identify male or ... python python-3.x database machine-learning scikit-learn- 7
Transformer combining two OHE categorical features that encode the same information
When preprocessing data sometimes that are multiple features that encode the existence of some item and should be encoded together. For example, in the below data set, I would like OHE to be done on ... python scikit-learn pipeline preprocessor feature-engineering- 1
X has 1 features, but LinearRegression is expecting 5 features as input
import matplotlib.pyplot as plt import numpy as np import pandas as pd import sklearn.linear_model dados = pd.read_csv("dados.csv", thousands=',', sep = ";", header = 0, encoding='... python pandas machine-learning scikit-learn linear-regression- 27
How does predict_proba work with cross-validation?
When using 5-fold cross-validation to create a model, 5 different models are created. The selection of the final model can vary: best-estimated (or other criteria) model out of the 5-fold created ... scikit-learn cross-validation caret- 21
Circular import of numpy error in the scikit learn
Even during the build of the sklearn, at the end it showing a message like Partial import of sklearn during the build process, though it's successfully installed the scikit-learn When i tried to run ... python numpy scikit-learn data-science- 1
15 30 50 per page12345…1740 Next