Skip to content

Commit

Permalink
Merge db5becb into 84dd102
Browse files Browse the repository at this point in the history
  • Loading branch information
tBuLi committed May 25, 2019
2 parents 84dd102 + db5becb commit c419794
Show file tree
Hide file tree
Showing 14 changed files with 1,241 additions and 1,224 deletions.
2 changes: 1 addition & 1 deletion docs/api_structure.rst
Expand Up @@ -10,7 +10,7 @@ Fitting 101
Fitting a model to data is, at it's most basic, a parameter optimisation, and
depending on whether you do a least-squares fit or a loglikelihood fit your
objective function changes. This means we can split the process of fitting in
three distint, isolated parts:: the :class:`~symfit.core.fit.Model`, the
three distint, isolated parts:: the :class:`~symfit.core.models.Model`, the
Objective and the Minimizer.

In practice, :class:`~symfit.core.fit.Fit` will choose an appropriate objective
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_CallableNumericalModel.rst
Expand Up @@ -2,7 +2,7 @@ Example: CallableNumericalModel
===============================

Below is an example of how to use the
:class:`symfit.core.fit.CallableNumericalModel`. This class allows you to
:class:`symfit.core.models.CallableNumericalModel`. This class allows you to
provide custom callables as your model, while still allowing clean interfacing
with the :mod:`symfit` API.

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/ex_ODEModel.rst
@@ -1,8 +1,8 @@
Example: ODEModel for Reaction Kinetics
=======================================

Below is an example of how to use the :class:`symfit.core.fit.ODEModel`. In this
example we will fit reaction kinetics data, taken from libretexts_.
Below is an example of how to use the :class:`symfit.core.models.ODEModel`. In
this example we will fit reaction kinetics data, taken from libretexts_.

The data is from a first-order reaction :math:`\text{A} \rightarrow \text{B}`.

Expand Down
2 changes: 1 addition & 1 deletion docs/fitting_types.rst
Expand Up @@ -228,7 +228,7 @@ this::
fit = Fit(ode_model, t=tdata, a=adata, b=None)
fit_result = fit.execute()

That's it! An :class:`~symfit.core.fit.ODEModel` behaves just like any other
That's it! An :class:`~symfit.core.models.ODEModel` behaves just like any other
model object, so :class:`~symfit.core.fit.Fit` knows how to deal with it! Note
that since we don't know the concentration of B, we explicitly set ``b=None``
when calling :class:`~symfit.core.fit.Fit` so it will be ignored.
Expand Down
9 changes: 9 additions & 0 deletions docs/module_docs.rst
Expand Up @@ -14,6 +14,15 @@ Fit
:exclude-members: __weakref__
:show-inheritance:

Models
------

.. automodule:: symfit.core.models
:members:
:special-members:
:exclude-members: __weakref__
:show-inheritance:

Argument
--------

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.rst
Expand Up @@ -143,7 +143,7 @@ One thing to note about such models is that now ``model(x=xdata)`` obviously no
longer works as ``type(model) == dict``. There is a preferred way to resolve
this. If any kind of fitting object has been initiated, it will have a
`.model` atribute containing an instance of
:class:`~symfit.core.fit.Model`. This can again be called::
:class:`~symfit.core.models.Model`. This can again be called::

a, b = parameters('a, b')
y_1, y_2, x = variables('y_1, y_2, x')
Expand All @@ -161,7 +161,7 @@ returned :func:`~collections.namedtuple`. Alternatively, the unpacking can be
performed explicitly.

If for some reason no :class:`~symfit.core.fit.Fit` is initiated you can make a
:class:`~symfit.core.fit.Model` object yourself::
:class:`~symfit.core.models.Model` object yourself::

model = Model(model_dict)
y_1_result, y_2_result = model(x=xdata, a=2.4, b=0.1)
Expand Down
7 changes: 4 additions & 3 deletions symfit/api.py
Expand Up @@ -2,9 +2,10 @@
import symfit.core.operators

# Expose useful objects.
from symfit.core.fit import (
Fit, Model, ODEModel, ModelError, CallableModel,
CallableNumericalModel, GradientModel
from symfit.core.fit import Fit
from symfit.core.models import (
Model, ODEModel, ModelError, CallableModel, CallableNumericalModel,
GradientModel
)
from symfit.core.fit_results import FitResults
from symfit.core.argument import Variable, Parameter
Expand Down

0 comments on commit c419794

Please sign in to comment.