|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
vec_math.AbstractFit
public abstract class AbstractFit
Base class for model fitters. Additionally provides parameter names and formatters for the parameters and their errors.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private static Format |
DEFDEFAULTFORMAT
A default decimal formatter for the error. |
private Map<String,DecimalFormat> |
errformat
A lookup table for error formats. |
static String |
KEY_DEFAULTERROR
The default error format. |
static String |
KEY_DEFAULTFORMAT
The default value format. |
static String |
KEY_ERRORFORMAT
These are the error formatter strings. |
static String |
KEY_PARAMETERFORMAT
These are the parameters formatter strings. |
private Map<String,DecimalFormat> |
valformat
A lookup table for value formats. |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
protected |
AbstractFit(Map<String,String> prop)
Constructs a new regression analyser. |
| Method Summary | |
|---|---|
String |
formatError(Variable p)
Formats the parameter errors using internal formats or generic, if not explicately given. |
String |
formatValue(Variable p)
Formats the parameter values using internal formats or generic, if not explicately given. |
double |
getChi2()
Returns the weighted chi-square sum. |
static VectorG |
getModelParameterErrors(List<Variable> p)
Converts a list of model parameters into an nvector of its values. |
static VectorG |
getModelParameterValues(List<Variable> p)
Converts a list of model parameters into an nvector of its values. |
double |
getR2()
Returns the coefficient of determination, R², which is in a linear model the square of the correlation coefficient. |
double |
getRms()
Returns the rms of the fitted model to the model data. |
void |
init()
On init, we initialize our format maps, if available. |
double |
qualityOfFit()
The quality of the fit, assuming normally distributed errors can be determined from the chi2 and the degree of freedoms. |
boolean |
setConstant(Variable c)
Return false. |
boolean |
setInitialCondition(Variable c)
Return false. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface vec_math.ModelFitting |
|---|
fit, getDataModel, getFittedParameters, prepareFit |
| Field Detail |
|---|
public static final String KEY_PARAMETERFORMAT
public static final String KEY_ERRORFORMAT
public static final String KEY_DEFAULTFORMAT
public static final String KEY_DEFAULTERROR
private static final Format DEFDEFAULTFORMAT
private Map<String,DecimalFormat> valformat
private Map<String,DecimalFormat> errformat
| Constructor Detail |
|---|
protected AbstractFit(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyContainerpublic boolean setConstant(Variable c)
setConstant in interface ModelFittingpublic boolean setInitialCondition(Variable c)
setInitialCondition in interface ModelFittingpublic double getRms()
getRms in interface ModelFittingpublic double getChi2()
getChi2 in interface ModelFittingpublic double getR2()
getR2 in interface ModelFittingpublic double qualityOfFit()
qualityOfFit in interface ModelFittingpublic String formatValue(Variable p)
public String formatError(Variable p)
public static final VectorG getModelParameterValues(List<Variable> p)
public static final VectorG getModelParameterErrors(List<Variable> p)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||