def load_interictal_dataframes(feature_folder, sliding_frames=False, **kwargs):
"""
Convenience function for loading interictal dataframes. Sets the 'Preictal' column to 0.
: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 interictal data with a 'Preictal' column set to 0.
"""
interictal = load_feature_files(feature_folder,
class_name="preictal",
sliding_frames=sliding_frames,
**kwargs)
interictal['Preictal'] = 0
interictal.sortlevel('segment', inplace=True)
if isinstance(interictal.columns, pd.MultiIndex):
interictal.sortlevel(axis=1, inplace=True)
return interictal
评论列表
文章目录