public double response ( double [ ] sample ) { if ( sample . length != A . numCols ) throw new IllegalArgumentException ( "Expected input vector to be in sample space" ) ; DMatrixRMaj dots = new DMatrixRMaj ( numComponents , 1 ) ; DMatrixRMaj s = DMatrixRMaj . wrap ( A . numCols , 1 , sample ) ; CommonOps_DDRM . mult ( V_t , s , dots ) ; return NormOps_DDRM . normF ( dots ) ; }
Computes the dot product of each basis vector against the sample . Can be used as a measure for membership in the training sample set . High values correspond to a better fit .