public class VectorOverThreshold extends java.lang.Object implements ScoreEvaluation.Predicate<AbstractVectorIter>
Modifier and Type | Field and Description |
---|---|
(package private) int |
numpos
Number of positive values.
|
(package private) double |
threshold
Threshold
|
(package private) NumberVector |
vec
Vector to use as reference
|
Constructor and Description |
---|
VectorOverThreshold(NumberVector vec,
double threshold)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDimensionality()
Dimensionality of the underlying truth vector (positive and negative values).
|
int |
numPositive()
Return the number of positive ids.
|
boolean |
test(AbstractVectorIter o)
Test a result.
|
NumberVector vec
double threshold
int numpos
public VectorOverThreshold(NumberVector vec, double threshold)
vec
- Reference vector.threshold
- Threshold value.public boolean test(AbstractVectorIter o)
ScoreEvaluation.Predicate
test
in interface ScoreEvaluation.Predicate<AbstractVectorIter>
o
- Object to testtrue
when positive.public int numPositive()
ScoreEvaluation.Predicate
numPositive
in interface ScoreEvaluation.Predicate<AbstractVectorIter>
public int getDimensionality()
Copyright © 2019 ELKI Development Team. License information.