swiftemulator.mean_models.base module
A base model to be overloaded in further implementations.
- class swiftemulator.mean_models.base.MeanModel[source]
Bases:
objectA base mean model which describes the basic layout. Each function must be overloaded.
- train(independent: ndarray, dependent: ndarray) None[source]
Trains the mean model to predict dependent(independent).
By convention, if there is an underlying model object, this should be stored in
self.model.- Parameters:
independent (np.ndarray) – Independent variables. Should be in the same format as is passed to
george.dependent (np.ndarray) – Dependent variables, to be predicted from the independent variables. Should be in the same format as is passed to
george.
- Raises:
NotImplementedError – If not implemented.
- predict(independent: ndarray) ndarray[source]
Predicts dependent variables from independent variables, using the predictive model.
- Parameters:
independent (np.ndarray) – Independent variables to predict dependent variables from, in the same format as is passed to
george.- Returns:
dependent – Dependent variables that are in the same format that
georgeexpects.- Return type:
np.ndarray
- Raises:
NotImplementedError – If not implemented
AttributeError – If the
modelis not trained.
- property george_model: CallableModel
Get the
georgeCallableModelinstance that corresponds to this system. Returns a copy of the predict function associated with the current instance.