esem.rf_model¶
- esem.rf_model(training_params, training_data, data_processors=None, name='', gpu=0, *args, **kwargs)¶
Create a simple Random Forest Emulator using sklearn.
Note that because a Random Forest is just a recursive binary partition over the training data, there is no need to normalize/standardize the inputs.
i.e. At least in theory, Random Forests are invariant to monotonic transformations of the independent variables
- Parameters
training_params (
pd.DataFrame
) – The training parameterstraining_data (
xarray.DataArray
oriris.cube.Cube
or array_like) – The training data - the leading dimension should represent training samplesdata_processors (
list
ofesem.data_processors.DataProcessor
) – A list of DataProcessor to apply to the data transparently before training. Model output will be un-transformed before being returned from the Emulator.name (
str
) – An optional name for the emulatorgpu (
int
) – The GPU to use (only applicable for multi-GPU) machinesargs (
list
) – List of optional arguments for sklearn.ensemble.RandomForestRegressorkwargs (
dict
) – Dict of optional keyword arguments for sklearn.ensemble.RandomForestRegressor
- Returns
Emulator
– An esem emulator object which can be trained and sampled from