glmfit: Iteration limit reached
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello, I built a logistic model using glmfit:
[b,dev,stats]=glmfit(X,Y,'binomial','link','logit');
but I have obtained the warning: iteration limit reached. And some variables have large coefficients, so the produced model is not correct. I have 41 features and 2904 observations. The 2 classes (0 and 1) are already balanced. I have attached the matrix X and Y.
Can someone help me? Thanks.
댓글 수: 0
답변 (1개)
the cyclist
2023년 10월 6일
편집: the cyclist
2023년 10월 6일
The first thing I notice is that the X data has missing values (NaN).
MATLAB automatically removes observations (i.e. rows) with missing values. That does not seem to yield a good model.
Removing variables (i.e. columns) with missing data does bring all the coefficients down into roughly the same range.
It's unclear without more context what is the best way to handle your missing data, but I would focus on that first.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!