What does logp output in classify exactly mean?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all!
I am using the classify function but I obtain positive values in the logp output parameter. If I understand correctly this is the logarithm of a probability and consequently should't be larger than 0. Is that correct? If so, what could cause getting these values?
Thank you very much!
댓글 수: 4
the cyclist
2014년 4월 28일
My expectation is the same as yours, Maria, but I am not an expert on this. My guess is that you are hitting some numerical instability. Are you able to post the smallest possible self-contained example that will exhibit the phenomenon?
답변 (1개)
Ilya
2014년 4월 30일
Quoting from the doc for classify:
[class,err,POSTERIOR,logp] = classify(...) also returns a vector logp containing estimates of the logarithms of the unconditional predictive probability density of the sample observations...
Values of probability density do not need to be less than one.
댓글 수: 5
Ilya
2014년 5월 5일
classify returns a vector of logp values, just as the doc says. You get one value because you pass one query point in. Take as many query points as you'd like, concatenate them in a matrix and pass them as the first input to classify. Form query points to sample the space with whatever granularity you choose.
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification Ensembles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!