composeml.LabelMaker.search¶
-
LabelMaker.
search
(df, num_examples_per_instance, minimum_data=None, gap=None, drop_empty=True, label_type=None, verbose=True, *args, **kwargs)[source]¶ Searches the data to calculates labels.
Parameters: - df (DataFrame) – Data frame to search and extract labels.
- num_examples_per_instance (int or dict) – The expected number of examples to return from each entity group. A dictionary can be used to further specify the expected number of examples to return from each label.
- minimum_data (str) – Minimum data before starting search. Default value is first time of index.
- gap (str or int) – Time between examples. Default value is window size. If an integer, search will start on the first event after the minimum data.
- drop_empty (bool) – Whether to drop empty slices. Default value is True.
- label_type (str) – The label type can be “continuous” or “categorical”. Default value is the inferred label type.
- verbose (bool) – Whether to render progress bar. Default value is True.
- *args – Positional arguments for labeling function.
- **kwargs – Keyword arguments for labeling function.
Returns: Calculated labels with cutoff times.
Return type: lt (LabelTimes)