twinlab.score_campaign#

twinlab.score_campaign(campaign_id, combined_score=False, processor='cpu', verbose=True, debug=False)[source]#

Quantify the performance of your trained model with a model score.

Parameters:

combined_score (bool) – Determining whether to average scores across dimensions. If False. will return a numpy array even if only one dimension.

Returns:

float: pandas.DataFrame: containing the trained model score

Return type:

None

Examples

import pandas as pd
import twinlab as tl

df = pd.DataFrame({'X': [1.5, 2.5, 3.5]})
tl.predict_campaign(df, "my_campaign")
tl.score_campaign(df, combined_score=True)

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/.