Serializable
EuclideanDistance
, ManhattanDistance
, RelativeSquaredError
public class N_Metric extends QualityMeasure
Modifier and Type | Field | Description |
---|---|---|
protected double |
root |
The n of the metric.
|
defaultValue, meanFunction
Constructor | Description |
---|---|
N_Metric() |
Constructs a new NMetric with a default root of two.
|
N_Metric(double root) |
Constructs a new NMetric with a customized root.
|
Modifier and Type | Method | Description |
---|---|---|
double |
distance(MultiTable.Block.Column x,
MultiTable.Block.Column y,
double defaultValue) |
Returns the distance of the two vectors x and y with the given root.
|
double |
distanceToZero(MultiTable.Block.Column x,
double defaultValue) |
|
double |
getRoot() |
Returns the n of the metric.
|
void |
setRoot(double root) |
Sets the root.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, getColumnDistances, getDefaultValue, getMeanFunction, setDefaultValue, setMeanFunction
public N_Metric()
public N_Metric(double root)
root
- public double distance(MultiTable.Block.Column x, MultiTable.Block.Column y, double defaultValue)
QualityMeasure
Double.NaN
values are also ignored.distance
in class QualityMeasure
x
- an arrayy
- another arraydefaultValue
- The value to be returned in cases in which no distance
computation is possible.public double getRoot()
public void setRoot(double root)
root
- public double distanceToZero(MultiTable.Block.Column x, double defaultValue)
x
- expecteddefaultValue
- Copyright © 2007–2018. All rights reserved.