필터 지우기
필터 지우기

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 CenterFile Exchange에서 Model 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