Packing perfcurve results into a structure

1 回表示 (過去 30 日間)
Joanna Przeworska
Joanna Przeworska 2021 年 8 月 5 日
コメント済み: Joanna Przeworska 2021 年 8 月 5 日
Hi all,
Is there faster and more space saving way (different than the one below) to pack the perfcurve results into a structure?
[X_,Y_,T_,AUC,OPTROCPT] = perfcurve(cr,mdl.Fitted.Probability,1,'NBoot',0,'XVals','All','Cost',[0 tau;(1-tau) 0]);
Struct.X = X_;
Struct.Y = Y_;
Struct.T = T_;
Struct.AUC = AUC;
Struct.OPTROCPT = OPTROCPT;

採用された回答

Chunru
Chunru 2021 年 8 月 5 日
編集済み: Chunru 2021 年 8 月 5 日
% avoid using Struct (similar to keyword struct)
p=struct('X', X_, 'Y', Y_, 'T', T_, 'AUC', AUC, 'OPTROCPT', OPTROCPT);
% Alternatively
[p.X, p.Y, p.T, p.AUC, p.OPTROCPT] = perfcurve(cr,mdl.Fitted.Probability,1,'NBoot',0,'XVals','All','Cost',[0 tau;(1-tau) 0]);
  1 件のコメント
Joanna Przeworska
Joanna Przeworska 2021 年 8 月 5 日
Thank you very much, your solution works perfectly!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel Building and Assessment についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by