Confusion Matrix didn't work in Classifcation Learner

2 ビュー (過去 30 日間)
Zhijun Cui
Zhijun Cui 2019 年 3 月 15 日
編集済み: sandhya sandhya 2019 年 3 月 15 日
After I trained a modle in Classification Learner App, I click the button of Confusion Matrix. But it didn't show the confusion matrix, reporting that ''<Model not trained>". The message in commond line are shown as below.
警告: 执行为类 mlearnapp.internal.ui.toolstrip.GenericButtonView 定义的事件 Clicked 的侦听程序回调时出现错误:
错误使用 confusionmat
输入参数太多。
出错 mlearnapp.internal.model.ConfusionMatrixFactory/createConfusionMatrix (line 10)
confusionMatrixCounts = confusionmat(trueRespData, predictedRespData, 'order',
classOrderToUse);
出错 mlearnapp.internal.ui.ConfusionMatrixPresenter/computeConfusionMatrix (line 70)
confusionMatrix = this.ConfusionMatrixFactory.createConfusionMatrix( ...
出错 mlearnapp.internal.ui.ConfusionMatrixPresenter/updateView (line 63)
this.ConfusionMatrixView.ConfusionMatrix = this.computeConfusionMatrix();
出错 mlearnapp.internal.ui.ConfusionMatrixPresenter (line 43)
this.updateView();
出错 mlearnapp.internal.ui.plot.ConfusionMatrixPlotFactory/createPlotPresenter (line 11)
presenter = mlearnapp.internal.ui.ConfusionMatrixPresenter( ...
出错 mlearnapp.internal.ui.toolstrip.GenericPlotButtonPresenter/openPlot (line 90)
this.PlotPresenter = this.PlotFactory.createPlotPresenter(this.Session, this.HelpLauncher);
出错 mlearnapp.internal.ui.toolstrip.GenericPlotButtonPresenter/plotButtonClickedCallback (line 98)
this.openPlot();
出错
mlearnapp.internal.ui.toolstrip.GenericPlotButtonPresenter>@(varargin)this.plotButtonClickedCallback(varargin{:})
(line 78)
this.addListener(this.View, 'Clicked', @this.plotButtonClickedCallback);
出错 mlearnapp.internal.ui.toolstrip.GenericButtonView/buttonClickedCallback (line 58)
this.notify('Clicked');
出错 mlearnapp.internal.ui.toolstrip.GenericButtonView>@(varargin)this.buttonClickedCallback(varargin{:})
(line 34)
this.Button.ButtonPushedFcn = @this.buttonClickedCallback;
出错 internal.Callback.execute (line 128)
feval(callback, src, event);
出错 matlab.ui.internal.toolstrip.base.Action/PeerEventCallback (line 803)
internal.Callback.execute(this.PushPerformedFcn, this, eventdata);
出错 matlab.ui.internal.toolstrip.base.PeerInterface>@(event,data)PeerEventCallback(this,event,data)
出错 hgfeval (line 62)
feval(fcn{1},varargin{:},fcn{2:end});
出错 javaaddlistener>cbBridge (line 52)
hgfeval(response, java(o), e.JavaEvent)
出错 javaaddlistener>@(o,e)cbBridge(o,e,response) (line 47)
@(o,e) cbBridge(o,e,response));
> In mlearnapp.internal.ui.toolstrip.GenericButtonView/buttonClickedCallback (line 58)
In mlearnapp.internal.ui.toolstrip.GenericButtonView>@(varargin)this.buttonClickedCallback(varargin{:}) (line 34)
In internal.Callback.execute (line 128)
In matlab.ui.internal.toolstrip.base.Action/PeerEventCallback (line 803)
In matlab.ui.internal.toolstrip.base.PeerInterface>@(event,data)PeerEventCallback(this,event,data)
In hgfeval (line 62)
In javaaddlistener>cbBridge (line 52)
In javaaddlistener>@(o,e)cbBridge(o,e,response) (line 47)

回答 (1 件)

sandhya sandhya
sandhya sandhya 2019 年 3 月 15 日
編集済み: sandhya sandhya 2019 年 3 月 15 日
Check your training model command once again, ,and to plot confusion matrix follow the command below.
plotconfusion(targets,outputs)
you should create another button and in that add your confusion plot command or program code.After clicking that button it can plot confusion matrix.

カテゴリ

Help Center および File ExchangeNetworks についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by