autofunc.split_learning_verification

Split a dataframe into training and testing sets

Module Contents

Functions

split_learning_verification(dataframe, verification_ids)

Takes a Pandas dataframe and splits it into training and testing sets. The input IDs are the testing set, the

autofunc.split_learning_verification.split_learning_verification(dataframe, verification_ids)

Takes a Pandas dataframe and splits it into training and testing sets. The input IDs are the testing set, the rest of the dataframe is the training set

Parameters
  • dataframe (Pandas dataframe) – A Pandas dataframe of the whole set that will be split

  • verification_ids (list) – The ID(s) that will be separated from the dataframe to constitute the testing set

Returns

  • test_df – Returns a Pandas dataframe with the testing set consisting of the products with the IDs in the input list

  • train_df – Returns a Pandas dataframe with the training set consisting of every product with IDs that were not in the input list