def load_preictal_dataframes(feature_folder, sliding_frames=False, **kwargs):
"""
Convenience function for loading preictal dataframes. Sets the 'Preictal' column to 1.
:param feature_folder: The folder to load the feature data from.
:param sliding_frames: If True, the data frame will be extended using sliding frames over the feature windows.
:param kwargs: keyword arguments to use for loading the features.
:return: A DataFrame of preictal data with a 'Preictal' column set to 1.
"""
preictal = load_feature_files(feature_folder,
class_name="preictal",
sliding_frames=sliding_frames,
**kwargs)
preictal['Preictal'] = 1
preictal.sortlevel('segment', inplace=True)
if isinstance(preictal.columns, pd.MultiIndex):
preictal.sortlevel(axis=1, inplace=True)
return preictal
评论列表
文章目录