Modifier and Type | Class and Description |
---|---|
static class |
KNN.Blocks$ |
static class |
KNN.DistanceMetric$ |
static class |
KNN.K$ |
static class |
KNN.SizeHint$ |
static class |
KNN.UseQuadTree$ |
Constructor and Description |
---|
KNN() |
Modifier and Type | Method and Description |
---|---|
static KNN |
apply() |
static <T extends Vector> |
fitKNN(TypeInformation<T> evidence$1)
FitOperation which trains a KNN based on the given training data set. |
static <T extends Vector> |
predictValues(scala.reflect.ClassTag<T> evidence$2,
TypeInformation<T> evidence$3)
PredictDataSetOperation which calculates k-nearest neighbors of the given testing data
set. |
KNN |
setBlocks(int n)
Sets the number of data blocks/partitions
|
KNN |
setDistanceMetric(DistanceMetric metric)
Sets the distance metric
|
KNN |
setK(int k)
Sets K
|
KNN |
setSizeHint(CrossOperatorBase.CrossHint sizeHint)
Parameter a user can specify if one of the training or test sets are small
|
KNN |
setUseQuadTree(boolean useQuadTree)
Sets the Boolean variable that decides whether to use the QuadTree or not
|
scala.Option<DataSet<Block<Vector>>> |
trainingSet() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parameters
public static KNN apply()
public static <T extends Vector> Object fitKNN(TypeInformation<T> evidence$1)
FitOperation
which trains a KNN based on the given training data set.
public static <T extends Vector> Object predictValues(scala.reflect.ClassTag<T> evidence$2, TypeInformation<T> evidence$3)
PredictDataSetOperation
which calculates k-nearest neighbors of the given testing data
set.
public KNN setK(int k)
k
- the number of selected points as neighborspublic KNN setDistanceMetric(DistanceMetric metric)
metric
- the distance metric to calculate distance between two pointspublic KNN setBlocks(int n)
n
- the number of data blockspublic KNN setUseQuadTree(boolean useQuadTree)
public KNN setSizeHint(CrossOperatorBase.CrossHint sizeHint)
sizeHint
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.