예제 #1
0
 def load_featured_data(self):
     # Check if the file for csv
     self.labeled_xy = pd.read_csv(personalLibrary.find_data_filename(PipelineManager.FULL_TRAIN_DATA_PATH))
     self.x_test = pd.read_csv(personalLibrary.find_data_filename(PipelineManager.FULL_TEST_DATA_PATH))
     self.num_features = self.labeled_xy.shape[1] - 1
     self.num_examples = self.labeled_xy.shape[0]
     self.split_train_csv()
예제 #2
0
 def load_featured_data(self):
     # Check if the file for csv
     self.labeled_xy = pd.read_csv(
         personalLibrary.find_data_filename(
             PipelineManager.FULL_TRAIN_DATA_PATH))
     self.x_test = pd.read_csv(
         personalLibrary.find_data_filename(
             PipelineManager.FULL_TEST_DATA_PATH))
     self.num_features = self.labeled_xy.shape[1] - 1
     self.num_examples = self.labeled_xy.shape[0]
     self.split_train_csv()
예제 #3
0
 def write_submission(self):
     self.compile_report()
     self.sample_submission = pd.read_csv(personalLibrary.find_data_filename(PipelineManager.FULL_SAMPLE_SUBMISSION_PATH))
     # Then see how many headers it has
     columns = self.sample_submission.columns.values.tolist()
     pd.DataFrame({columns[self.pred_index]: self.y_test}).to_csv(self.get_submission_path(), index=False, header=self.header)
     self.FULL_SUBMISSION_PATH = self.get_submission_path()
예제 #4
0
 def write_submission(self):
     self.sample_submission = pd.read_csv(
         personalLibrary.find_data_filename(
             PipelineManager.FULL_SAMPLE_SUBMISSION_PATH))
     # Then see how many headers it has
     columns = self.sample_submission.columns.values.tolist()
     pd.DataFrame({
         columns[0]: self.y_test
     }).to_csv(self.get_submission_path(), index=False, header=self.header)
     self.FULL_SUBMISSION_PATH = self.get_submission_path()