Skip to content

Commit

Permalink
comments added for the new window size detection logic. version updat…
Browse files Browse the repository at this point in the history
…ed for release
  • Loading branch information
sayanchk committed Jun 9, 2021
1 parent ad40a3b commit 02c1b79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions luminaire/exploration/data_exploration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ def stream_profile(self, df, impute_only=False, **kwargs):
if not self.window_length:
window_length_list = []

# If the window size is not specified, the following logic makes several random segments of the
# time series which obtains a list of optimal window sizes
for i in range(100):
rand_date = sample(idx_date_list, 1)[0]
rand_start_idx = pd.Timestamp(datetime.datetime.combine(rand_date, training_start_time))
Expand All @@ -1072,6 +1074,9 @@ def stream_profile(self, df, impute_only=False, **kwargs):
window_length_list.append(window_length_i)

window_length_list = np.array(window_length_list)

# From the list of optimal window sizes, if it is a list of constants, we take the constant as the
# window size. Otherwise, we obtain the window size that is most frequently observed in the list.
if np.all(window_length_list == min(window_length_list)):
window_length = window_length_list[0]
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name='luminaire',
version='0.2.0',
version='0.2.1',

license='Apache License 2.0',

Expand Down

0 comments on commit 02c1b79

Please sign in to comment.