What sort of support elements does naive bayes classifier need?

What sort of support elements does naive bayes classifier need? I've got to insert two of this and not sure what sort of elements tit needs...Please help!!!

 채택된 답변

Tom Lane
Tom Lane 2013년 1월 25일

0 개 추천

If you are referring to NaiveBayes.fit and its 'KSSupport' argument, then you can omit this in most cases. You would specify it as [0,1], for example, if you wanted to force the density to be zero outside that range.
If you are referring to something else, please provide more details.

댓글 수: 4

This was my error:
Error using ksdensity>compute_finite_support (line 181)
Value of 'support' parameter must have two elements.
error line:
fuStruct(i,k).f = ksdensity(xi,ui);
Would you be able to tell me more?
I can show you two valid examples, then an example with an invalid specification of support:
>> x = rand(100,1);
>> ksdensity(x)
>> ksdensity(x,'support',[0 1])
>> ksdensity(x,'support',4)
Error using ksdensity>compute_finite_support (line 193)
Value of 'support' parameter must have two elements.
However, it appears from other postings that you may be trying to use ksdensity from within NaiveBayes, and there is some question about what release or releases you are using. I can't tell from that information what is going wrong.
Does the support refer to the statistical toolbox's support?
It refers to the support of the probability distribution. Search for "support" on this page: http://en.wikipedia.org/wiki/Probability_distribution

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2013년 1월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by