classification

Multiclass confusion matrix in python

Multiclass confusion matrix in python Question: I’m trying to create a single multiclass confusion matrix in Python. df_true = pd.DataFrame({ "y_true": [0,0,1,1,0,2] }) df_pred = pd.DataFrame({ "y_pred": [0,1,2,0,1,2] }) And I want a single confusion matrix that tells me the actual and predict value for each case. Like this: Asked By: juanmac || Source Answers: …

Total answers: 1

Error during Recursive feature elimination using Histogram based GBM

Error during Recursive feature elimination using Histogram based GBM Question: I am implementing Recursive Feature Elimination using the HistGradientBoostingClassifier, but for some reason keeps on getting the following error: ValueError: when importance_getter==’auto’, the underlying estimator HistGradientBoostingClassifier should have coef_ or feature_importances_ attribute. Either pass a fitted estimator to feature selector or call fit before calling …

Total answers: 1

Label conflict in classification machine learning problem

how can I remove Label conflict in classification problem? Question: I have identical samples with different labels and this has occurred due to either mislabeled data, If the data is mislabeled, it can confuse the model and can result in lower performance of the model. It’s a binary classification problem. if my input table is …

Total answers: 1

Data Science Data Analysis

Data Science Data Analysis Question: I have a dataset with people’s characteristics and I need to predict their breakfast here‘s an example of df. And I am training cat boost algorithm for that. Is it possible in my case to predict not only one kind of breakfast, but also an additional one? By additional I …

Total answers: 2

Sklearn-classifier, issue with freez (pod pending in K8s)

Sklearn-classifier, issue with freez (pod pending in K8s) Question: I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, … minutes), see log output: 2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: training-tgplm see freez/pending issue on Web UI: …

Total answers: 1

How do I extract meaningful simple rules from this classification problem?

How do I extract meaningful simple rules from this classification problem? Question: I have a problem of this type: A customer creates an order by hand, which might be erroneous. Submitting a wrong order is costly, which is why we try to reduce the error rate. I need to detect what factors cause an error, …

Total answers: 1

Naive Bayes Gaussian Classification Prediction not taking array in SK-Learn

Naive Bayes Gaussian Classification Prediction not taking array in SK-Learn Question: I have made the following gaussian prediction model in SK-learn: chess_gnb = GaussianNB().fit(raw[[‘elo’, ‘opponent_rating’, ‘winner_loser_elo_diff’]],raw[‘winner’]) I then made a test array and attempted to feed it into the model: test1 = [[‘elo’, 1000], [‘opponent_rating’, 800], [‘winner_loser_elo_diff’, 200]] chess_gnb.predict(test1) However, I’m getting this error: ValueError: …

Total answers: 1

TypeError: where() received an invalid combination of arguments

TypeError: where() received an invalid combination of arguments Question: I want to make a judgment on the value predicted by the neural network. If it is greater than 0.5, it is 1, and if it is less than 0.5, it is 0.When I ran my model,I met this problem. Input In [73], in create_model(n_inputs) 45 …

Total answers: 2

why smote raise "Found input variables with inconsistent numbers of samples"?

why smote raise "Found input variables with inconsistent numbers of samples"? Question: I try to classify emotion from tweet with dataset of 4401 tweet, when i use smaller sample of data (around 15 tweet) everything just work fine, but when i use the full dataset it raise the error of Found input variables with inconsistent …

Total answers: 2