@Reference(authors="B. Hopkins and J. G. Skellam", title="A new method for determining the type of distribution of plant individuals", booktitle="Annals of Botany, 18(2), 213-227", url="http://aob.oxfordjournals.org/content/18/2/213.short") public class HopkinsStatisticClusteringTendency extends AbstractNumberVectorDistanceBasedAlgorithm<NumberVector,Result>
B. Hopkins and J. G. Skellam
A new method for determining the type of distribution of plant individuals
Annals of Botany, 18(2), 213-227.
Modifier and Type | Class and Description |
---|---|
static class |
HopkinsStatisticClusteringTendency.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected int |
k
Nearest neighbor to use.
|
private static Logging |
LOG
The logger for this class.
|
private double[] |
maxima
Stores the maximum in each dimension.
|
private double[] |
minima
Stores the minimum in each dimension.
|
protected RandomFactory |
random
Random generator seeding.
|
protected int |
rep
Number of repetitions
|
protected int |
sampleSize
The parameter sampleSizes
|
distanceFunction
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
HopkinsStatisticClusteringTendency(NumberVectorDistanceFunction<? super NumberVector> distanceFunction,
int samplesize,
RandomFactory random,
int rep,
int k,
double[] minima,
double[] maxima)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected double |
computeNNForRealData(KNNQuery<NumberVector> knnQuery,
Relation<NumberVector> relation,
int dim)
Search nearest neighbors for real data members.
|
protected double |
computeNNForUniformData(KNNQuery<NumberVector> knnQuery,
double[] min,
double[] extend)
Search nearest neighbors for artificial, uniform data.
|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
protected void |
initializeDataExtends(Relation<NumberVector> relation,
int dim,
double[] min,
double[] extend)
Initialize the uniform sampling area.
|
Result |
run(Database database,
Relation<NumberVector> relation)
Runs the algorithm in the timed evaluation part.
|
getDistanceFunction
makeParameterDistanceFunction, run
private static final Logging LOG
protected int sampleSize
protected int rep
protected int k
protected RandomFactory random
private double[] maxima
private double[] minima
public HopkinsStatisticClusteringTendency(NumberVectorDistanceFunction<? super NumberVector> distanceFunction, int samplesize, RandomFactory random, int rep, int k, double[] minima, double[] maxima)
distanceFunction
- Distance functionsamplesize
- Sample sizerandom
- Random generatorrep
- Number of repetitionsk
- Nearest neighbor to useminima
- Data space minima, may be null
(get from data).maxima
- Data space minima, may be null
(get from data).public Result run(Database database, Relation<NumberVector> relation)
database
- Database contextrelation
- Relation to analyzeprotected double computeNNForRealData(KNNQuery<NumberVector> knnQuery, Relation<NumberVector> relation, int dim)
knnQuery
- KNN queryrelation
- Data relationprotected double computeNNForUniformData(KNNQuery<NumberVector> knnQuery, double[] min, double[] extend)
knnQuery
- KNN querymin
- Data minimaextend
- Data extendprotected void initializeDataExtends(Relation<NumberVector> relation, int dim, double[] min, double[] extend)
relation
- Data relationdim
- Dimensionalitymin
- Minima output array (preallocated!)extend
- Data extend output array (preallocated!)protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<Result>
public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<Result>
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.