obtain probability prediction for binary logistic regression
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to obtain probability predictions for a binary logistic regression model. However, I am getting output only as 0 or 1s.
The spec says:
•For a binomial model, the meaning of the output values in ypred depends on the value of the 'BinomialSize' name-value pair argument.
•If 'BinomialSize' is 1 (default), then each value in the output ypred is the probability of success.
•If 'BinomialSize' is not 1, then each value in the output ypred is the predicted number of successes in the trials.
But this does not appear to be the case.
I need the input to be such that fit( X, y) with X (Y_init) being the features, and y (X) being the class vector. Here are my initial code:
mdl = fitglm(Y_init,X,'Distribution','binomial');
predictProb = predict(mdl, Y_init(500:544,:);
5 件のコメント
Ive J
2021 年 9 月 5 日
On a different note, your independent variables are highly correlated, you should be extra cautious for multicollinearity.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Gaussian Process Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!