Most voted "sklearn" questions
Scikit-Learn (also known as sklearn) is a machine learning library for the Python programming language. It features various sorting, regression and clustering algorithms, including vector machines, Forests Random, gradient boosting, k-Means and DBSCAN, and is designed to interoperate with the numerical and scientific libraries of Python Numpy and Scipy.
Learn more…26 questions
Sort by count of
-
3
votes1
answer5209
viewsHow to normalize data? Any sklearn library?
I need to normalize the data I have so that it stays between -1 and 1. I used Standardscaler, but the interval got longer. What other sklearn library could you use? There are several in sklearn, but…
-
2
votes1
answer100
viewsSklearn - error in model training
I’m trying to sort with sklearn, but I’m getting an error: from sklearn.feature_extraction.text import CountVectorizer from sklearn.linear_model import LinearRegression from sklearn.naive_bayes…
sklearnasked 7 years, 1 month ago André Nascimento 1,258 -
2
votes1
answer1686
viewssklearn’s classification_report and confusion_matrix: do the values not match?
Model: logistic regression with sklearn. I decided to compare the results shown in the classification_report, calculating them using the confusion matrix but apparently the results do not match:…
-
2
votes1
answer62
viewsWhat exactly does this Python statement do?
I am studying the sklearn module of Python, and I came across this statement: data = pd.read_csv('car.data') X = data[[ 'buying', 'maint', 'safety' ]].values What exactly is stored in X? Because the…
-
2
votes1
answer181
viewsLinear Regression Evaluation and Graph Problem
My problem is that I can’t plot a line - first-degree function graph - in my first linear regression model. As a result, I have lines joining the scatter plot points of the training Features. I…
python-3.x matplotlib machine-learning regression sklearnasked 4 years, 2 months ago Breno Valle 23 -
1
votes1
answer193
viewsRandom Forest with very high accuracy
I’m working with this dataset And I applied Forest Random to create a price forecast model, but the accuracy of the model is getting too high, so I’m suspicious if something is wrong. Apparently…
-
1
votes1
answer401
viewsHow to use a quadratic regression model?
I’m trying to learn how to adjust a quadratic regression model. The dataset can be downloaded at: https://filebin.net/ztr9har5nio7x78v Let Adjsaleprice be the target variable and…
-
1
votes1
answer106
viewsTypeerror: can’t pickle _thread. _local Objects when I try to use scikit-Learn RFE in a template created in tensorflow
I’m trying to use the scikit-Learn library RFE on models I created using tensorflow, but when I try to train I get TypeError: can't pickle _thread._local objects. Follow the code and error below:…
-
1
votes0
answers52
viewsHelp with Precision in Machine Learning Sorting Algorithms
I am following a class where the teacher creates a code that will evaluate 7 different algorithms classificatory of Machine Learning and I tried to do in a more automated way so that this data…
-
1
votes0
answers23
viewsHow to use TSNE for plotting?
I am now beginning my quest for data science. I created a code in the notebook jupyter to work with CBOW and Skip-Gram and I need to plot a similarity graph. Many with whom I talked indicated me the…
-
0
votes1
answer590
viewsCode evaluation: Logistic regression with K fold validation. Is that correct?
The code below is an attempt to make a logistic regression with k fold cross validation. The idea is to take the confusion matrices generated in each fold and then generate an average confounding…
-
0
votes1
answer70
viewsValueerror in Kfold from Scikit-Earn: My dataset has two classes! What’s going on?
I tried to cross-validate with a logistic regression using the Scikit-Learn . Follows the code: kf = KFold(n_splits=5, random_state=None, shuffle=False) kf.get_n_splits(previsores) for train_index,…
-
0
votes1
answer295
viewsWhat is the difference between Train Test Split and Holdout?
From what I have already researched, both divide the set into two subsets of training and testing. There is some difference between the two?
-
0
votes3
answers583
viewsMachine Learning Python
I started in the course of Machine Learning and in exercise I’m having difficulty because it is returning me a silly error that I can not find the solution. from sklearn.model_selection import…
-
0
votes1
answer83
viewsUnable to convert string to float
I am trying to run a classification model and I am getting the feedback that it is not possible to convert string to float in the predictive variables. When I give a dtypes I see that all variables…
-
0
votes1
answer169
viewsTake the probability of belonging to each class
I have a theoretical problem where a store owner wants to know the chance of a particular phrase generating a sale, I have in hand a dictionary with 20 random words and 10 phrases formed by exactly…
-
0
votes1
answer19
viewsError importing SKLEARN 32b into 64b server
all right? I’m really desperate for a question: I have a Python 3.7 environment mounted on a machine, Windows 10 64b, and I need to migrate it (which has been working for some time) to another…
-
0
votes1
answer1113
viewsWhat is the Sklearn Standardscaler() function
The code below found in the link Classifying the Iris Data Set with Keras. And I’d like to understand the usefulness of Standardscaler(), says it is important for convergence? from sklearn.datasets…
-
0
votes0
answers98
viewsPredictions from Cross Validation
I am working with a regression problem. I built a Multilayerperceptron (MLP) using Scikit-Learn. I made two predictions...one using MPL using 70% of data for training and 30% for validation.…
-
0
votes3
answers1128
viewsModulenotfounderror: No module named 'sklearn.externals.Six'
I cannot run the script, because it is accusing that there is no module 'sklearn.externals.six'. I’ve looked for solutions, I’ve remade the venv and not the right one. Has this module become…
-
0
votes0
answers48
viewsHow to set the columns in Sklearn’s Onehotencoder?
I’m having a small problem making an ML code for sorting set when using Onehotencoder to perform categorization. I am following a course that used the resource in the following way: dados =…
-
0
votes0
answers18
viewsVariable error with Onehotencoder
When preprocessing a database, deleting part of the list, and reducing empty variables, one hot Encoder should classify the same database for the beginning of the ia tests. But it returns an error…
-
0
votes0
answers17
viewsIsolation Forest with Cross Validation
how can I use a One Class classifier, such as Isolation Forest, with Cross Validation? I’m trying to do it this way: columns = data.columns.tolist() columns = [c for c in columns if c not in…
-
-1
votes2
answers85
viewssklearn library accuracy_score error
from sklearn.svm import LinearSVC from sklearn.metrics import accuracy_score # retorna 1 se houver mais de 1 número 1 treino_x = [[1,0,1],[1,1,0],[0,0,1],[0,1,1]] teste_x…
-
-1
votes1
answer64
viewsValueerror: Classification Metrics can’t Handle a mix of multilabel-Indicator and Binary targets
Hello. I’m creating a neural network to categorize some data. Basically the neural network will tell me which molecule is. This is my code: import pandas as pd from keras.utils import np_utils from…
-
-1
votes1
answer141
viewsSklearn - Difference between preprocessing.Scale() and preprocessing.Standardscaler()
Hello! I’m a beginner in Data Science and Machine Learning, I’m sorry if the doubt is kind of "beast". I understand the importance of standardization/normalization of Features and in my studies, I…