Short code for assigning labels in a large dataset

조회 수: 2 (최근 30일)
Tino
Tino 2019년 5월 14일
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개)

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by