Kindly, Can anyone help me in understanding how to implement logloss for multiclass problems
Let's assume ur using a logistic regression model.
Lr=LogisticsRegression()
Lr.fit(X_train,y_train)
Pred=lr.predict_proba(X_test)
Log_loss(y_pred,y_true)
So u needed to get the probability function of ur prediction to be able to check for the log_losss
Thanks but this is the error i am getting.
ValueError: y_true and y_pred contain different number of classes 6, 2. Please provide the true labels explicitly through the labels argument. Classes found in y_true: [0 1 2 3 4 5]
That's bcos u didn't use the proba key word.
Model.predict_proba()
Oh thank you solved it.
That's good
And can you please share how the submission file should be created from fold predictions?
Let's assume ur using a logistic regression model.
Lr=LogisticsRegression()
Lr.fit(X_train,y_train)
Pred=lr.predict_proba(X_test)
Log_loss(y_pred,y_true)
So u needed to get the probability function of ur prediction to be able to check for the log_losss
Thanks but this is the error i am getting.
ValueError: y_true and y_pred contain different number of classes 6, 2. Please provide the true labels explicitly through the labels argument. Classes found in y_true: [0 1 2 3 4 5]
That's bcos u didn't use the proba key word.
Model.predict_proba()
Oh thank you solved it.
That's good
And can you please share how the submission file should be created from fold predictions?