Why does "mapstd" returns unexpected dimensions when I apply it to a new sample data?
Mostrar comentarios más antiguos
Why does "mapstd" returns unexpected dimensions when I apply it to a new sample data?
I have 4 sample data, each containing 2 predictor variables:
>> X = [ 2 1;
5 0;
3 0;
4 2];
I standardize this using "mapstd" as follow:
>> [Xnew, PS] = mapstd(X);
However, when I try standardizing a single new sample data "Xtest", it produces a 4x2 array instead of 1x2 array:
>> Xtest = [2 3];
>> XtestNew = mapstd('apply', Xtest, PS)
XtestNew =
0.7071 2.1213
-0.1414 0.1414
0.2357 0.7071
-0.7071 0
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Downloads en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!