BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



class MultipleOutputProblem( Problem )Source

A MultipleOutputProblem is an optimization of parameters where the model has multiple outputs. E.g. the orbit of a double star or the outcome of a game.

Problems can be solved by NestedSampler, with appropriate Engines and ErrorDistributions.

The result of the function for certain x and p is given by problem.result( p ) The parameters, p, are to be optimized while the x provide additional information.

Attributes from Problem

model, xdata, ydata, weights, partype

  • Author : Do Kester

MultipleOutputProblem( model=None, xdata=None, ydata=None, weights=None, accuracy=None, copy=None )

Problem Constructor.

Parameters

  • model : Model
         the model to be solved. One with multiple outputs: model.ndout > 1
  • xdata : array_like
         independent variable
  • ydata : array_like
         dependent variable. shape = (len(xdata), model.ndout)
  • weights : array_like or None
         weights associated with ydata: shape = as xdata or as ydata
  • accuracy : float or ndarray of shape (ndata,)
         accuracy scale for the datapoints
         all the same or one for each data point
  • copy : Problem
         to be copied

copy( )
Copy.

expandFlat( weights, ndout )
Expand and flatten the arrays.

result( param )
Returns the result calculated at the xdata.

Parameters

  • param : array_like
         values for the parameters + nuisance params.

partial( param )
Returns the partials (df/dp) calculated at the xdata.

Parameters

  • param : array_like
         values for the parameters + nuisance params.

derivative( param )
Return the derivative of the internal model.

Parameters

  • param : array_like
         list of model parameters

residuals( param, mockdata=None )
Returns residuals in a flattened array.

myEngines( )
Return a default list of preferred engines

myStartEngine( )
Return the default preferred startengines

myDistribution( )
Return the name of the preferred error distribution

baseName( )

Returns a string representation of the model.

Methods inherited from Problem