Structure of Strings
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi!
I want to specify possible parameters for the naive bayes classifier. For this reason, I have created a structure with a field for each parameter and a matrix with possible values.
bayesPosParams.distribution = ['normal'; 'kernel'];
bayesPosParams.prior = ['empirical'; 'uniform'];
bayesPosParams.KSWidth = 'scalar';
bayesPosParams.KSSupport = ['unbounded'; 'positive'];
Unfortunately that does not work: ??? Error using ==> vertcat CAT arguments dimensions are not consistent.
All Strings need to have the same length. What would be the best possibility to specify the parameters nice and consistently?
Thanks in advance, Jay
0 commentaires
Réponse acceptée
Andrei Bobrov
le 11 Juil 2011
bayesPosParams.distribution = {'normal'; 'kernel'};
bayesPosParams.prior = {'empirical'; 'uniform'};
bayesPosParams.KSWidth = 'scalar';
bayesPosParams.KSSupport = {'unbounded'; 'positive'};
0 commentaires
Plus de réponses (1)
Jay
le 11 Juil 2011
6 commentaires
Andrei Bobrov
le 12 Juil 2011
dis - cell array, and may be any operation with 'dis', as with cellarrays
Voir également
Catégories
En savoir plus sur MATLAB Parallel Server dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!