question: public FeatureVector toFeatureVector ( int unitIndex , String featureString ) { String [ ] featureValues = featureString . split ( "\\s+" ) ; if ( featureValues . length != numByteFeatures + numShortFeatures + numContinuousFeatures ) throw new IllegalArgumentException ( "Expected " + ( numByteFeatures + numShortFeatures + numContinuousFeatures ) + " features, got " + featureValues . length ) ; byte [ ] bytes = new byte [ numByteFeatures ] ; short [ ] shorts = new short [ numShortFeatures ] ; float [ ] floats = new float [ numContinuousFeatures ] ; for ( int i = 0 ; i < numByteFeatures ; i ++ ) { bytes [ i ] = Byte . parseByte ( featureValues [ i ] ) ; } for ( int i = 0 ; i < numShortFeatures ; i ++ ) { shorts [ i ] = Short . parseShort ( featureValues [ numByteFeatures + i ] ) ; } for ( int i = 0 ; i < numContinuousFeatures ; i ++ ) { floats [ i ] = Float . parseFloat ( featureValues [ numByteFeatures + numShortFeatures + i ] ) ; } return new FeatureVector ( bytes , shorts , floats , unitIndex ) ; }
target:  Create a feature vector consistent with this feature definition by reading the data from a String representation. In that String, the String values for each feature must be separated by white space. For example, this format is created by toFeatureString(FeatureVector).