フィルターのクリア

If "classify" is supposed to be replaced by "fitcdiscr", why does it provide (better) different results?

2 ビュー (過去 30 日間)
Krystian
Krystian 2017 年 4 月 11 日
コメント済み: Alain Kuchta 2017 年 4 月 20 日
in my code on the same data:
lda = fitcdiscr(meas(:,1:3),YN); is providing different (worse) results as
[j,err,P,logp,coeff_class] = classify([x y z],meas(:,1:3),YN);
coeff(1,2).linear are quite the same wheras the Const is significatly diffrent. What did I do wrong?
  1 件のコメント
Alain Kuchta
Alain Kuchta 2017 年 4 月 20 日
I understand that the constant term of the boundary equation for comparing group 1 to group 2 is different when using classify vs fitcdiscr
Please be more specific about why the results are better or worse, and give some summary of the data set you are using.
Based on the variable names I'm assuming you're using the Fisher-Iris data set. A quick test seems to indicate comparable classification since the difference in const is very small:
>> load fisheriris
>> Mdl = fitcdiscr(meas(:,1:3),species(:));
>> [~,err,P,logp,coeff] = classify([1 2 3], meas(:,1:3), species(:));
>> diff = Mdl.Coeffs(1,2).Const - coeff(1,2).const
ans=
-7.105427357601e-14

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by