I
- type of independent dataD
- type of dependent dataM
- type of modelpublic class DistanceComparatorResidual<I,D,M extends Model<I,D>> extends AbstractResidualCalculator<I,D,M>
ResidualCalculator
that uses a
DistanceComparator
to compute the error between the predicted and
observed data point. In the case that the given DistanceComparator
is
a similarity measure, the similarities will be multiplied by -1 to ensure
error increases with decreasing similarity.Modifier and Type | Field and Description |
---|---|
protected DistanceComparator<D> |
comparator |
model
Constructor and Description |
---|
DistanceComparatorResidual(DistanceComparator<D> comparator)
Construct with the given
DistanceComparator . |
Modifier and Type | Method and Description |
---|---|
double |
computeResidual(IndependentPair<I,D> data)
Compute the residual for a single point
|
computeResiduals, setModel
protected DistanceComparator<D> comparator
public DistanceComparatorResidual(DistanceComparator<D> comparator)
DistanceComparator
.comparator
- the DistanceComparator
public double computeResidual(IndependentPair<I,D> data)
ResidualCalculator
data
- the data