BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



class ClassicProblem( Problem )Source

A ClassicProblem is an optimization of parameters which involves the fitting of data to a Model at a fixed set of x values.

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( x, p ) The parameters, p, are to be optimized while the x provide additional information.

Attributes from Problem

model, xdata, ydata, weights, accuracy, varyy

  • Author : Do Kester

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

Constructor for classic problems.

Parameters

  • model : Model
         the model to be solved
  • xdata : array_like or None
         independent variable
  • ydata : array_like or None
         dependent variable
  • weights : array_like or None
         weights associated with ydata
  • accuracy : float or array_like
         accuracy scale for the datapoints
         all the same or one for each data point
  • copy : Problem
         to be copied

copy( )
Copy.

The copy points to the same instance of model.

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

Parameters

  • param : array_like
         values for the parameters.

partial( param )
Return the partials of the internal model.

Parameters

  • param : array_like
         list of model parameters

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

Parameters

  • param : array_like
         list of model parameters

myEngines( )
Return a default list of preferred engines

myStartEngine( )
Return a default preferred start engines: "start"

myDistribution( )
Return a default preferred ErrorDistribution: "gauss"

baseName( )

Returns a string representation of the model.

Methods inherited from Problem