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 parameters

  • training_data (xarray.DataArray or iris.cube.Cube or array_like) – The training data - the leading dimension should represent training samples

  • data_processors (list of esem.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 emulator

  • gpu (int) – The GPU to use (only applicable for multi-GPU) machines

  • args (list) – List of optional arguments for sklearn.ensemble.RandomForestRegressor

  • kwargs (dict) – Dict of optional keyword arguments for sklearn.ensemble.RandomForestRegressor

Returns

Emulator – An esem emulator object which can be trained and sampled from