Error using Logistic regression with one hot encoding for categorical predictors
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I am new to MATLAB. I am trying to use logistic regression mnrfit on my data which contains several numeric and categorical variables. I have used one hot encoding to represent the levels of my categorical predictors.But every time I try to run mnrfit the following error shows up-
matrix is close to singular or badly scaled. results may be inaccurate. rcond = 1.256585e-22
and then-
Error using linsolve
Matrix must be positive definite.
I am guessing its beacause of all the dummy variables I have used to represent the categorical predictors with one hot encoding. What should I do?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Linear Regression についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!