Skip to content

Instantly share code, notes, and snippets.

@SanchitAggarwal
Created July 19, 2018 09:18
Show Gist options
  • Select an option

  • Save SanchitAggarwal/d38b7bf616b0c06c2809c80c9a1f551e to your computer and use it in GitHub Desktop.

Select an option

Save SanchitAggarwal/d38b7bf616b0c06c2809c80c9a1f551e to your computer and use it in GitHub Desktop.
class BaseTrainingPipeline():
def load_data(self, filepath, task_id):
"""
Method to load training data
:return: Loaded dataframe
"""
def form_training_dataset(self, raw_df, task_id):
"""
Method to prepare the final dataset to be used for training.
Method call to things like changing labels names, balancing
data, splitting into test train split etc should be done here.
:return: train df and test df
"""
def pre_process(self, raw_df, task_id):
"""
Method for pre-processing input data before extracting features.
:return: interim dataframe with preprocessed data
"""
def get_feature_extractors(self, interim_df, task_id):
"""
Method to train features_extractor on processed data
:return: loaded extractors
"""
def extract_features(self, interim_df, task_id):
"""
Method for extracting features from the data before training
:return: extracted features
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment