twinlab.Emulator#
- class twinlab.Emulator(id)[source]#
A trainable twinLab emulator.
An emulator is trainable model that learns the trends in a dataset. It is a machine-learning model in that it requires a dataset of inputs
Xand outputsyon which to be trained. In this way, it learns to mimic, or emulate, the dataset and can be used to make predictions on new data. Emulators are also often called models, surrogates, or digital twins.- Variables:
id (str) – The name for the emulator in the twinLab cloud. If an emulator that does not currently exist is specified, then a new emulator will be instantiated. Otherwise the corresponding emulator will be loaded from the cloud. Be sure to double check which emulators have been created using .. autofunction:: ~list_emulator.
Methods
__init__(id)benchmark([params, verbose])Benchmark the performance of a trained emulator with a calibration curve.
calibrate(df_obs, df_std[, params, wait, ...])Solve an inverse problem using a trained emulator on the twinLab cloud.
delete([verbose])Delete emulator from the twinLab cloud.
design(priors, num_points[, params, verbose])Generate an initial design space for an emulator.
get_process(process_id[, verbose])Get the results from a process associated with the emulator on the twinLab cloud.
heatmap(x1_axis, x2_axis, y_axis[, x_fixed, ...])Plot a heatmap of the predictions from an emulator across two dimensions.
learn(dataset, inputs, outputs, num_loops, ...)Perform active learning to improve an emulator on the twinLab cloud.
list_processes([verbose])List all of the processes associated with a given emulator on the twinLab cloud.
plot(x_axis, y_axis[, x_fixed, params, ...])Plot the predictions from an emulator across a single dimension with one and two standard deviation bands.
predict(df[, params, wait, verbose])Make predictions using a trained emulator that exists on the twinLab cloud.
recommend(num_points, acq_func[, params, ...])Draw new recommended data points from a trained emulator that exists on the twinLab cloud.
sample(df, num_samples[, params, wait, verbose])Draw samples from a trained emulator that exists on the twinLab cloud.
score([params, verbose])Score the performance of a trained emulator.
status(process_id[, verbose])Check the status of a training process on the twinLab cloud.
summarise([verbose])Get a summary of a trained emulator on the twinLab cloud.
train(dataset, inputs, outputs[, params, ...])Train an emulator on the twinLab cloud.
view([verbose])View an emulator that exists on the twinLab cloud.
view_test_data([verbose])View test data on which the emulator was tested in the twinLab cloud.
view_train_data([verbose])View training data with which the emulator was trained in the twinLab cloud.