I have to this code for machine learning with bayesian techniques but it is giving me error
1 回表示 (過去 30 日間)
古いコメントを表示
x = bankadditionalfull X = x(:,1:end-1); Y = x.y C = cvpartition(Y,'holdout',0.2); Xtrain = X(training(C,1),:); Ytrain = Y(training(C,1)); Z = Y(test(C,1)); Bayes_model = fitcnb(Xtrain,Ytrain,'Distribution','kernel');
% Evaluation Accuracy using the Test set % Generate a confusion matrix [Bayes_predict,class_score] = Nb.predict(X(test(C,1),:)); [conf,classorder] = confusionmat(Z, Bayes_predict); conf %Calculate what percentage of confusion matrix is off the diagonal Bayes_Error = 1 - trace(conf)/sum(conf(:)); Bayes_Error
It is giving me this error "Error in Bayesian (line 9) Bayes_model = fitcnb(Xtrain,Ytrain,'Distribution','kernel')"
1 件のコメント
Image Analyst
2017 年 4 月 5 日
You forgot to post the last half of the error - where it actually says what the actual error was. And you forgot to supply us with data so we can run your code. I can't run "bankadditionalfull", whatever that is. What does this say for you?
which bankadditionalfull
Did you write it, or is it in a toolbox that you have but I don't?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!