Short code for assigning labels in a large dataset
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello
Please I have a function which calculate conformal prediction
for instance if k
Z has a size of 1200 12000
rows = 1200
column = 1200
And I want to assign c1, c2 , c3 class to each rows respectively for instance
column 1
a = Z(:,1);
b =repmat(['c1';'c2'; 'c3'],size(a,1)/3,1);
% assuming rows are even if not use some rounding function
T=table ;
T.distance=a ;
T.class=b;
Column 2
a = Z(:,2);
b =repmat(['c1';'c2';'c3'],size(a,1)/3,1);
% assuming rows are even if not use some rounding function
C=table ;
C.distance=a ;
C.class=b;
I want a short code that will enable me do this instead of having to do this for each different 1200 columns
Thank you in advance
Tino
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!