|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.AbstractDataModel
public abstract class AbstractDataModel
An abstract data model is an implementation of a data model that allows
the user to get access to the data it is constructed with. For use,
implement DataModel.getParameterCount() and DataModel.evaluateModel(vec_math.VectorG, vec_math.VectorG).
| Nested Class Summary | |
|---|---|
static class |
AbstractDataModel.Construct
Just to see the signature of the constructor. |
(package private) static class |
AbstractDataModel.LocalM
A localM-estimate model for the data. |
| Field Summary | |
|---|---|
protected double[] |
sigma
If applicable, the measurement errors. |
protected VectorG[] |
x
The independant variables as an array of vectors. |
protected double[] |
y
The measures as an array of doubles. |
| Constructor Summary | |
|---|---|
protected |
AbstractDataModel(VectorG[] times,
double[] data,
double[] err)
We construct an abstract data model by providing the dependant variables at the measurement points. |
| Method Summary | |
|---|---|
Multidimensional |
getChiSquareModel()
We return a multidimensional that calculated the chi-square of the model to the data given. |
static Multidimensional |
getChiSquareModel(DataModel fit)
We return a multidimensional that calculate the chi-square of the model to the data model given. |
static Multidimensional |
getLorentzianModel(DataModel fit)
We return a multidimensional that calculate the model parameters with errors that are Lorentzian. |
int |
getMeasureCount()
The number of data points is equal to the array size of the dependant variable array. |
double[] |
getMeasurementErrors()
Default implementation returns the total errors here. |
double[] |
getMeasures()
Returns the measures as an VectorG. |
double[] |
getModel(VectorG a)
Returns the entire model by stepping through all measurement times. |
static double[] |
getModel(VectorG a,
DataModel dm)
Static version. |
double[] |
getResiduals(VectorG a)
Returns the residuals of the measures to the data model. |
static double[] |
getResiduals(VectorG a,
DataModel dm)
Returns the residuals of the measures to the data model. |
static double |
getRms(VectorG a,
DataModel dm)
Return the rott of the average of the residuals squared. |
static Multidimensional |
getRobustModel(DataModel fit)
We return a multidimensional that calculate the model parameters with errors that are double-sided exponential, which gives a minimization to absolut divergence instead of least-squares. |
VectorG[] |
getTimes()
Returns the times the measurements were taken. |
double[] |
getTotalErrors()
If the errors were set, we return the error vector here. |
static VectorG |
LorentzianSolver(DataModel exp,
VectorG start,
VectorG length)
We use a Simplex in robust form to solve for a minimum model. |
static VectorG |
RobustSolver(DataModel exp,
VectorG start,
VectorG length)
We use a Simplex in robust form to solve for a minimum model. |
static VectorG |
SimplexSolver(DataModel exp,
VectorG start,
VectorG length)
We use a Simplex in standard form to solve for a minimum model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface vec_math.DataModel |
|---|
evaluateModel, getParameterCount |
| Field Detail |
|---|
protected VectorG[] x
protected double[] y
protected double[] sigma
| Constructor Detail |
|---|
protected AbstractDataModel(VectorG[] times,
double[] data,
double[] err)
NullPointerException - If x is null.| Method Detail |
|---|
public VectorG[] getTimes()
getTimes in interface DataModelDataModel.getMeasureCount().public double[] getMeasures()
getMeasures in interface DataModelpublic double[] getTotalErrors()
getTotalErrors in interface DataModelpublic double[] getMeasurementErrors()
getMeasurementErrors in interface DataModelpublic double[] getModel(VectorG a)
getModel in interface DataModela - The model parameters
public static double[] getModel(VectorG a,
DataModel dm)
public double[] getResiduals(VectorG a)
getMeasures() and getModel(vec_math.VectorG) and returning the
difference between both.
getResiduals in interface DataModela - The model parameters, not necessarily the best fit.
public static double[] getResiduals(VectorG a,
DataModel dm)
getMeasures() and getModel(vec_math.VectorG) and returning the
difference between both.
a - The model parameters, not necessarily the best fit.
public static double getRms(VectorG a,
DataModel dm)
public int getMeasureCount()
getMeasureCount in interface DataModelDataModel.getModel(vec_math.VectorG).public Multidimensional getChiSquareModel()
public static Multidimensional getChiSquareModel(DataModel fit)
public static Multidimensional getRobustModel(DataModel fit)
public static Multidimensional getLorentzianModel(DataModel fit)
public static VectorG SimplexSolver(DataModel exp,
VectorG start,
VectorG length)
public static VectorG RobustSolver(DataModel exp,
VectorG start,
VectorG length)
public static VectorG LorentzianSolver(DataModel exp,
VectorG start,
VectorG length)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||