curvefit.solvers.solvers.Solver
Solver base class that fits a Model
In order to fit a curvefit.models.base.Model
, you must
first define a Solver
and assign the model to the solver.
The reason for this is that there might be multiple ways that
you could solve a particular model.
Arguments
model_instance (curvefit.models.base.Model)
: the model instance that will be solved
Methods
fit
Fit the solver to some data using self.model_instance
.
data (Tuple[pd.DataFrame, DataSpecs])
: the input data frame to be fit, and data specifications objectoptions (None | Options)
: an optional Options object that has fit specifications for the underlying solver; overrides the options that have already been set
predict
Create predictions based on the optimal values estimated by the solver.
**kwargs
: keyword arguments passed toself.model_instance.predict()
set_options
Set a dictionary of options that will be used in the optimization.
set_model_instance
Attach a new model instance.
detach_model_instance
Detach the current model instance.
get_model_instance
Get the current model instance.