コード例 #1
0
ファイル: train.py プロジェクト: mhdella/LendingLounge
	def preprocess(self):
		(self.X_train, 
		 self.X_cv, 
		 self.y_train, 
		 self.y_cv) = dm.split_train_test(features=self.features, 
		 									targets=self.targets, 
		 									test_size=0.1)
		self.X_test = self.testLoanData.drop(['loan_status', 
											  'days_to_zero_dollars',
											  'id'], 1).values
		(self.X_train, self.X_cv) = dm.standardize_samples(self.X_train, 
														  self.X_cv)
		(self.X_train, self.X_cv) = dm.scale_samples_to_range(self.X_train, 
																self.X_cv)
		(self.X_test, _) = dm.standardize_samples(self.X_test, 
														  self.X_test)
		(self.X_test, _) = dm.scale_samples_to_range(self.X_test, 
																self.X_test)
コード例 #2
0
  def define_x_test(self):
    #self.X_test = self.listedLoanData.drop(['id'], 1).values

    self.X_test = self.listedLoanData.drop(['id'], 1).astype(float).values
    (self.X_test, _) = dm.standardize_samples(self.X_test, self.X_test)
    (self.X_test, _) = dm.scale_samples_to_range(self.X_test, self.X_test)