All pastes #2130135 Raw Edit

Untitled

public text v1 · immutable
#2130135 ·published 2012-03-19 19:15 UTC
rendered paste body
>> matrix = [ [2 3]; [5 7];];
>> matrix

matrix =

     2     3
     5     7


>> import ca.ubc.cs.beta.smac.matlab.*
>>  mds = MatlabModelDataSanitizer(matrix,[], 1, [-1],true)
Calls written & deleted to: /tmp/lastoutput-mds-3
 
mds =
 
ca.ubc.cs.beta.smac.matlab.MatlabModelDataSanitizer@38bcd14f
 
>> mds.getPCAVectors()

ans =

        -0.707106781186548         0.707106781186547

>> mds.getPCACoefficients()

ans =

     2

>> [pccoeff,pcVec] = pca(matrix,1)

pccoeff =

                      12.5


pcVec =

                       0.6
                       0.8