twinlab.active_learn_campaign#
- twinlab.active_learn_campaign(campaign_id, num_points, processor='cpu', verbose=False, debug=False, **kwargs)[source]#
Active learn campaign
Draw new candidate data points via active learning from a pre-trained campaign
that exists on the twinLab cloud.
- Parameters:
- Returns:
containing the recommended sample locations
- Return type:
Examples
import pandas as pd import twinlab as tl df = pd.DataFrame({'X': [1, 2, 3, 4], 'y': [1, 4, 9, 16]}) tl.upload_dataset(df, "my_dataset") params = { "dataset_id": "my_dataset", "inputs": ["X"], "outputs": ["y"], } tl.train_campaign(params, "my_campaign") n = 10 df = tl.active_learn_campaign("my_campaign", n) print(df)
Deprecated since version 2.5.0: The twinLab Python client version v1 will be deprecated imminently. Please upgrade to the latest version of the twinLab Python client. Avaible at https://pypi.org/project/twinlab/.