|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.estimation.WeightedMeasurement
@Deprecated public abstract class WeightedMeasurement
This class represents measurements in estimation problems.
This abstract class implements all the methods needed to handle
measurements in a general way. It defines neither the getTheoreticalValue
nor the getPartial
methods, which should be defined by
sub-classes according to the specific problem.
The getTheoreticalValue
and getPartial
methods must always use the current
estimate of the parameters set by the solver in the problem. These
parameters can be retrieved through the EstimationProblem.getAllParameters
method if the measurements are
independent of the problem, or directly if they are implemented as
inner classes of the problem.
The instances for which the ignored
flag is set
through the setIgnored
method are ignored by the
solvers. This can be used to reject wrong measurements at some
steps of the estimation.
EstimationProblem
,
Serialized FormField Summary | |
---|---|
private boolean |
ignored
Deprecated. Ignore measurement indicator. |
private double |
measuredValue
Deprecated. Value of the measurements. |
private static long |
serialVersionUID
Deprecated. Serializable version identifier. |
private double |
weight
Deprecated. Measurement weight. |
Constructor Summary | |
---|---|
WeightedMeasurement(double weight,
double measuredValue)
Deprecated. Simple constructor. |
|
WeightedMeasurement(double weight,
double measuredValue,
boolean ignored)
Deprecated. Simple constructor. |
Method Summary | |
---|---|
double |
getMeasuredValue()
Deprecated. Get the measured value |
abstract double |
getPartial(EstimatedParameter parameter)
Deprecated. Get the partial derivative of the theoretical value according to the parameter. |
double |
getResidual()
Deprecated. Get the residual for this measurement The residual is the measured value minus the theoretical value. |
abstract double |
getTheoreticalValue()
Deprecated. Get the theoretical value expected for this measurement |
double |
getWeight()
Deprecated. Get the weight of the measurement in the least squares problem |
boolean |
isIgnored()
Deprecated. Check if this measurement should be ignored |
void |
setIgnored(boolean ignored)
Deprecated. Set the ignore flag to the specified value Setting the ignore flag to true allow to reject wrong measurements, which sometimes can be detected only rather late. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final double weight
private final double measuredValue
private boolean ignored
Constructor Detail |
---|
public WeightedMeasurement(double weight, double measuredValue)
weight
- weight of the measurement in the least squares problem
(two common choices are either to use 1.0 for all measurements, or to
use a value proportional to the inverse of the variance of the measurement
type)measuredValue
- measured valuepublic WeightedMeasurement(double weight, double measuredValue, boolean ignored)
weight
- weight of the measurement in the least squares problemmeasuredValue
- measured valueignored
- true if the measurement should be ignoredMethod Detail |
---|
public double getWeight()
public double getMeasuredValue()
public double getResidual()
public abstract double getTheoreticalValue()
The theoretical value is the value expected for this measurement if the model and its parameter were all perfectly known.
The value must be computed using the current estimate of the parameters set by the solver in the problem.
public abstract double getPartial(EstimatedParameter parameter)
theoretical value
according to the parameter.
The value must be computed using the current estimate of the parameters set by the solver in the problem.
parameter
- parameter against which the partial derivative
should be computed
theoretical value
public void setIgnored(boolean ignored)
ignored
- value for the ignore flagpublic boolean isIgnored()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |