Short code for assigning labels in a large dataset

2 vues (au cours des 30 derniers jours)
Tino
Tino le 14 Mai 2019
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

Réponses (0)

Catégories

En savoir plus sur Desktop dans Help Center et File Exchange

Tags

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by