Questions tagged as 'sklearn'

1
answer

How to normalize data? Any sklearn libbioteca?

I need to normalize data that I have to be between -1 and 1. I used StandardScaler, but the range got larger. What other sklearn library could I use? There are several in sklearn, but I could not, it should make life easier, but I do not t...
asked by 16.05.2018 / 00:03
1
answer

classification_report and sklearn confusion_matrix: values do 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: classification_report: precision recall...
asked by 24.06.2018 / 19:19
1
answer

Code evaluation: Logistic regression with K fold validation. Is correct?

The code below is an attempt to do a logistic regression with k-fold cross-validation. The idea is to take the confusion matrices generated in each fold and then generate a mean confusion matrix with 95% confidence (confidence interval for the m...
asked by 29.06.2018 / 01:36
1
answer

ValueError in KFold of Scikit-learn: my dataset has two classes! What is going on?

I tried cross-validating a logistic regression using Scikit-learn . Here is the code: kf = KFold(n_splits=5, random_state=None, shuffle=False) kf.get_n_splits(previsores) for train_index, test_index in kf.split(previsores):...
asked by 10.10.2018 / 17:52
0
answers

Random forest with very high accuracy

I'm working with this dataset and I applied random forest to create a pricing model, but the accuracy of the model is getting too high, so I'm wary of anything wrong. Apparently train and test are different, so it was not to give such a high a...
asked by 14.11.2018 / 14:08
0
answers

Sklearn - 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 import GaussianNB from sklearn.naive_bayes...
asked by 05.11.2017 / 21:35
0
answers

What is the difference between Train Test Split and Holdout?

From what I've already researched, they both divide the set into two subsets of training and testing. Are there any differences between the two?     
asked by 14.11.2018 / 15:23
0
answers

How to capture what triggers the Warnings of sklearn.GridSearchCV.fit ()?

In a rasa_nlu function they are calling GridSearchCV.fit () with clf.fit () and it generates some Warnings that I would like to capture and modify for know what drives them: Fitting 2 folds for each of 6 candidates, totalling 1...
asked by 06.08.2018 / 19:30