Package sklearn.neighbors
Class KNeighborsClassifier
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
net.razorvine.pickle.objects.ClassDict
org.jpmml.python.PythonObject
sklearn.Step
sklearn.Estimator
sklearn.Classifier
sklearn.neighbors.KNeighborsClassifier
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> HasClasses,HasNumberOfFeatures,HasType,HasNeighbors,HasTrainingData
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields inherited from class sklearn.Classifier
FIELD_PROBABILITYFields inherited from class sklearn.Estimator
FIELD_APPLY, FIELD_DECISION_FUNCTION, FIELD_PREDICTFields inherited from interface sklearn.HasNumberOfFeatures
UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.dmg.pmml.nearest_neighbor.NearestNeighborModelencodeModel(org.jpmml.converter.Schema schema) org.dmg.pmml.DataTypegetFitX()int[]intintintgetP()List<?>getY()Methods inherited from class sklearn.Classifier
getClasses, getMiningFunction, hasProbabilityDistributionMethods inherited from class sklearn.Estimator
addFeatureImportances, checkFeatures, checkLabel, encode, getFeatureImportances, getOption, getOpType, getPMMLFeatureImportances, getPMMLOptions, getSkLearnVersion, hasFeatureImportances, isSupervised, putOption, putOptions, setPMMLFeatureImportances, setPMMLOptionsMethods inherited from class sklearn.Step
createFieldName, createFieldName, createFieldName, getPMMLName, setPMMLNameMethods inherited from class org.jpmml.python.PythonObject
get, getArray, getArray, getArray, getArrayShape, getArrayShape, getBoolean, getBooleanArray, getClassName, getDict, getInteger, getIntegerArray, getList, getList, getListLike, getListLike, getNumber, getNumberArray, getObject, getOptional, getOptionalBoolean, getOptionalObject, getOptionalScalar, getOptionalString, getPythonModule, getPythonName, getPythonObject, getScalar, getString, getTuple, getTupleList, setClassNameMethods inherited from class net.razorvine.pickle.objects.ClassDict
__setstate__Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
KNeighborsClassifier
-
-
Method Details
-
getNumberOfFeatures
public int getNumberOfFeatures()- Specified by:
getNumberOfFeaturesin interfaceHasNumberOfFeatures- Overrides:
getNumberOfFeaturesin classEstimator
-
getDataType
public org.dmg.pmml.DataType getDataType()- Specified by:
getDataTypein interfaceHasType- Overrides:
getDataTypein classEstimator
-
encodeModel
public org.dmg.pmml.nearest_neighbor.NearestNeighborModel encodeModel(org.jpmml.converter.Schema schema) - Specified by:
encodeModelin classEstimator
-
getMetric
- Specified by:
getMetricin interfaceHasNeighbors
-
getNumberOfNeighbors
public int getNumberOfNeighbors()- Specified by:
getNumberOfNeighborsin interfaceHasNeighbors
-
getP
public int getP()- Specified by:
getPin interfaceHasNeighbors
-
getWeights
- Specified by:
getWeightsin interfaceHasNeighbors
-
getFitX
- Specified by:
getFitXin interfaceHasTrainingData
-
getFitXShape
public int[] getFitXShape() -
getY
- Specified by:
getYin interfaceHasTrainingData
-