sklearn

How do I set the desired treshold at the model training stage?

Hi, everybody, I have an algorithm: clf = LGBMClassifier() clf.fit(X_train, y_train) When I use this algorithm to predict ... odel)? I.e. for example, I want that when treshold>=0.6, class 1 was predicted, and class 2 was predicted for treshold fit

Different output values with the same parameters when classifying data

I select the parameters for the best training of the classification model. I do it like this: print('Исходная обученность: ... ий: ', accuracy_score(res3, y_test3)) As a result, the results are different. Where did I go wrong? What am I doing wrong?

How to normalize data? Any sklearn libraries?

I need to normalize data I have so that it is between -1 and 1. I used StandardScaler, but the range got bigger. What other ... caler = StandardScaler() scaler.fit(df) dftrans = scaler.transform(df) plt.plot(dftrans) The die is between -10 and 10.

What is the difference between Train Test Split and Holdout?

From what I've researched, both divide the set into two training and test subsets. Is there any difference between the two?

What is the Standardscaler() function of Sklearn

The code below I found in the link Classifying the Iris Data Set with Keras . And I would like to understand what the utilit ... , Y_test = train_test_split( X_scaled, Y, test_size=0.5, random_state=2) n_features = X.shape[1] n_classes = Y.shape[1]

sklearn classification report and confusion matrix: do the values not beat?

Model: logistic regression with sklearn. I decided to compare the results shown in classification_report, calculating them u ... n see, recall and precision do not beat. What's wrong? How to interpret the results? What do f1-score and support stand for?

How to use a quadratic regression model?

I'm trying to learn how to fit a quadratic regression model. The dataset can be downloaded at: https://filebin.net/ztr9har5n ... .iloc[:,0] ## How to fit a quadratic regression model using sklearn and statsmodels ? I I can only use linear regression...

TypeError: can't pickle thread. local objects when I try to use scikit-learn RFE in a model created in tensorflow

I'm trying to use the scikit-learn library RFE in models I created using tensorflow, but when I try to train I get TypeError: ... Continuum\anaconda3\lib\copy.py", line 169, in deepcopy rv = reductor(4) TypeError: can't pickle _thread._local objects