def construct_features_kinematics(self): """ Independently loads/sets-up the kinematics in self.data_W. """ for demonstration in self.list_of_demonstrations: W = utils.sample_matrix(parser.get_kinematic_features(demonstration), sampling_rate=self.sr) scaler = preprocessing.StandardScaler().fit(W) self.data_W[demonstration] = scaler.transform(W)
def construct_features_kinematics(self): """ Loads kinematic features (saved in text files) and populates self.data_X dictionary """ for demonstration in self.list_of_demonstrations: W = utils.sample_matrix(parser.get_kinematic_features(demonstration), sampling_rate = self.sr) scaler = preprocessing.StandardScaler().fit(W) self.data_X[demonstration] = scaler.transform(W) print "Kinematics ", demonstration, self.data_X[demonstration].shape