public class KNeighborsClassifier extends SkLearnClassifier implements HasMetric, HasNumberOfNeighbors, HasTrainingData
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
static List<String> |
ENUM_METRIC |
static List<String> |
ENUM_WEIGHTS |
static String |
METRIC_EUCLIDEAN |
static String |
METRIC_MANHATTAN |
static String |
METRIC_MINKOWSKI |
static String |
WEIGHTS_DISTANCE |
static String |
WEIGHTS_UNIFORM |
FIELD_PROBABILITYFIELD_APPLY, FIELD_DECISION_FUNCTION, FIELD_PREDICTUNKNOWNUNKNOWN| Constructor and Description |
|---|
KNeighborsClassifier(String module,
String name) |
| Modifier and Type | Method and Description |
|---|---|
org.dmg.pmml.nearest_neighbor.NearestNeighborModel |
encodeModel(org.jpmml.converter.Schema schema) |
org.dmg.pmml.DataType |
getDataType() |
List<Number> |
getFitX() |
int[] |
getFitXShape() |
List<Object> |
getId() |
String |
getMetric() |
int |
getNumberOfFeatures() |
int |
getNumberOfNeighbors() |
int |
getNumberOfOutputs() |
Integer |
getP() |
String |
getWeights() |
List<Number> |
getY() |
int[] |
getYShape() |
boolean |
hasProbabilityDistribution() |
encodePMMLcanonicalizeValue, canonicalizeValues, encodeLabel, encodeLabel, encodeLabel, encodePredictProbaOutput, getClasses, getClasses, getMiningFunction, isSupervisedaddFeatureImportances, checkFeatures, checkLabel, configureModel, configureSchema, createApplyField, createMultiApplyField, createPredictProbaFields, encode, encode, encodeApplyOutput, encodeMultiApplyOutput, extractArguments, getAlgorithmName, getFeatureImportances, getOption, getOpType, getPMMLCustomizations, getPMMLFeatureImportances, getPMMLOptions, getPMMLSegmentId, hasFeatureImportances, putOption, putOptions, setPMMLCustomizations, setPMMLFeatureImportances, setPMMLOptions, setPMMLSegmentIdcheckSkLearnVersion, checkVersion, getFeatureNamesIn, getPMMLName, getSkLearnVersion, setPMMLNamecontainsKey, delattr, get, get, getArray, getArray, getArray, getArrayList, getArrayList, getArrayShape, getArrayShape, getattr, getattr, getBoolean, getBooleanArray, getClassName, getDict, getEnum, getEnumList, getIdentifiable, getInteger, getIntegerArray, getList, getList, getListLike, getListLike, getNumber, getNumberArray, getObject, getObjectArray, getObjectList, getOptional, getOptionalBoolean, getOptionalBoolean, getOptionalDict, getOptionalEnum, getOptionalIdentifiable, getOptionalInteger, getOptionalNumber, getOptionalObject, getOptionalScalar, getOptionalString, getOptionalTuple, getPythonModule, getPythonName, getScalar, getString, getStringArray, getStringList, getTuple, getTupleList, hasattr, put, putAll, remove, setattr, setClassName, updateclear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetFeatureNamesInpublic static final String METRIC_EUCLIDEAN
public static final String METRIC_MANHATTAN
public static final String METRIC_MINKOWSKI
public static final String WEIGHTS_DISTANCE
public static final String WEIGHTS_UNIFORM
public int getNumberOfFeatures()
getNumberOfFeatures in interface HasNumberOfFeaturesgetNumberOfFeatures in class Estimatorpublic int getNumberOfOutputs()
getNumberOfOutputs in interface HasNumberOfOutputsgetNumberOfOutputs in class Classifierpublic org.dmg.pmml.DataType getDataType()
getDataType in interface HasTypegetDataType in class Estimatorpublic boolean hasProbabilityDistribution()
hasProbabilityDistribution in interface HasClasseshasProbabilityDistribution in class Classifierpublic org.dmg.pmml.nearest_neighbor.NearestNeighborModel encodeModel(org.jpmml.converter.Schema schema)
encodeModel in class Estimatorpublic int getNumberOfNeighbors()
getNumberOfNeighbors in interface HasNumberOfNeighborspublic List<Number> getFitX()
getFitX in interface HasTrainingDatapublic int[] getFitXShape()
getFitXShape in interface HasTrainingDatapublic List<Object> getId()
getId in interface HasTrainingDatapublic List<Number> getY()
getY in interface HasTrainingDatapublic int[] getYShape()
getYShape in interface HasTrainingDatapublic String getWeights()
Copyright © 2025. All rights reserved.