def test_padding_with_one_hot(self): rec_ts = TimeSeries(pandas_df=self.data_to_pad_with_categorical, one_hot_root_list=["one_hot"]) results = rec_ts._pad_ts(pandas_df=self.data_to_pad_with_categorical, desired_len=10) self.assertEqual(results.shape[0], 10) self.assertEqual(results.one_hot_yes.values[0], 1) self.assertEqual(results.one_hot_no.values[0], 0)
def test_zero_len_padding(self): rec_instance = TimeSeries(pandas_df=self.data_to_pad) results = rec_instance._pad_ts( pandas_df=self.data_to_pad, desired_len=6) # len is the same as the original time series self.assertEqual(results.shape[0], 6)
def test_len_padding(self): rec_instance = TimeSeries(pandas_df=self.data_to_pad) results = rec_instance._pad_ts(pandas_df=self.data_to_pad, desired_len=10) self.assertEqual(results.shape[0], 10)