What does logp output in classify exactly mean?
古いコメントを表示
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 件のコメント
Image Analyst
2014 年 4 月 28 日
What values? You haven't shown any values, or code for that matter.
Maria
2014 年 4 月 28 日
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?
Maria
2014 年 4 月 28 日
回答 (1 件)
Ilya
2014 年 4 月 30 日
0 投票
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 件のコメント
Maria
2014 年 5 月 1 日
Ilya
2014 年 5 月 1 日
I don't understand "what is useful for just one point of it". You can evaluate the log of the PDF at as many points as you'd like. PDF is one of the basic concepts in statistics: http://en.wikipedia.org/wiki/Probability_density_function
Maria
2014 年 5 月 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.
Maria
2014 年 5 月 6 日
カテゴリ
ヘルプ センター および File Exchange で Classification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!