Package sklearn.neighbors
Class NearestNeighbors
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.lang.Object>
-
- net.razorvine.pickle.objects.ClassDict
-
- org.jpmml.python.PythonObject
-
- sklearn.Step
-
- sklearn.Estimator
-
- sklearn.Clusterer
-
- sklearn.SkLearnClusterer
-
- sklearn.neighbors.NearestNeighbors
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>,org.jpmml.converter.HasOptions,Encodable,HasSkLearnOptions,HasFeatureNamesIn,HasNumberOfFeatures,HasNumberOfOutputs,HasPredictField,HasType,HasMetric,HasNumberOfNeighbors,HasTrainingData,HasPMMLOptions<Estimator>,HasPMMLSegmentId<Estimator>
public class NearestNeighbors extends SkLearnClusterer implements HasMetric, HasNumberOfNeighbors, HasTrainingData
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>ENUM_METRICstatic java.util.List<java.lang.String>ENUM_WEIGHTSstatic java.lang.StringMETRIC_EUCLIDEANstatic java.lang.StringMETRIC_MANHATTANstatic java.lang.StringMETRIC_MINKOWSKIstatic java.lang.StringWEIGHTS_DISTANCEstatic java.lang.StringWEIGHTS_UNIFORM-
Fields inherited from class sklearn.Clusterer
FIELD_CLUSTER
-
Fields inherited from class sklearn.Estimator
FIELD_APPLY, FIELD_DECISION_FUNCTION, FIELD_PREDICT
-
Fields inherited from interface sklearn.HasNumberOfFeatures
UNKNOWN
-
Fields inherited from interface sklearn.HasNumberOfOutputs
UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description NearestNeighbors(java.lang.String module, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.dmg.pmml.nearest_neighbor.NearestNeighborModelencodeModel(org.jpmml.converter.Schema schema)org.dmg.pmml.DataTypegetDataType()java.util.List<java.lang.Number>getFitX()int[]getFitXShape()java.util.List<java.lang.Object>getId()java.lang.StringgetMetric()intgetNumberOfFeatures()intgetNumberOfNeighbors()intgetNumberOfOutputs()java.lang.IntegergetP()java.util.List<java.lang.Number>getY()int[]getYShape()-
Methods inherited from class sklearn.SkLearnClusterer
encodePMML
-
Methods inherited from class sklearn.Clusterer
encodeLabel, getMiningFunction, getPredictField, isSupervised
-
Methods inherited from class sklearn.Estimator
addFeatureImportances, checkFeatures, checkLabel, configureModel, configureSchema, createApplyField, createMultiApplyField, createPredictProbaFields, encode, encode, encodeApplyOutput, encodeMultiApplyOutput, getAlgorithmName, getFeatureImportances, getOption, getOpType, getPMMLCustomizations, getPMMLFeatureImportances, getPMMLOptions, getPMMLSegmentId, hasFeatureImportances, putOption, putOptions, setPMMLCustomizations, setPMMLFeatureImportances, setPMMLOptions, setPMMLSegmentId
-
Methods inherited from class sklearn.Step
checkSkLearnVersion, checkVersion, getFeatureNamesIn, getPMMLName, getSkLearnVersion, setPMMLName
-
Methods inherited from class org.jpmml.python.PythonObject
containsKey, 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, update
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface sklearn.HasFeatureNamesIn
getFeatureNamesIn
-
-
-
-
Field Detail
-
METRIC_EUCLIDEAN
public static final java.lang.String METRIC_EUCLIDEAN
- See Also:
- Constant Field Values
-
METRIC_MANHATTAN
public static final java.lang.String METRIC_MANHATTAN
- See Also:
- Constant Field Values
-
METRIC_MINKOWSKI
public static final java.lang.String METRIC_MINKOWSKI
- See Also:
- Constant Field Values
-
ENUM_METRIC
public static final java.util.List<java.lang.String> ENUM_METRIC
-
WEIGHTS_DISTANCE
public static final java.lang.String WEIGHTS_DISTANCE
- See Also:
- Constant Field Values
-
WEIGHTS_UNIFORM
public static final java.lang.String WEIGHTS_UNIFORM
- See Also:
- Constant Field Values
-
ENUM_WEIGHTS
public static final java.util.List<java.lang.String> ENUM_WEIGHTS
-
-
Method Detail
-
getNumberOfFeatures
public int getNumberOfFeatures()
- Specified by:
getNumberOfFeaturesin interfaceHasNumberOfFeatures- Overrides:
getNumberOfFeaturesin classEstimator
-
getNumberOfOutputs
public int getNumberOfOutputs()
- Specified by:
getNumberOfOutputsin interfaceHasNumberOfOutputs- Overrides:
getNumberOfOutputsin classClusterer
-
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
-
getNumberOfNeighbors
public int getNumberOfNeighbors()
- Specified by:
getNumberOfNeighborsin interfaceHasNumberOfNeighbors
-
getFitX
public java.util.List<java.lang.Number> getFitX()
- Specified by:
getFitXin interfaceHasTrainingData
-
getFitXShape
public int[] getFitXShape()
- Specified by:
getFitXShapein interfaceHasTrainingData
-
getId
public java.util.List<java.lang.Object> getId()
- Specified by:
getIdin interfaceHasTrainingData
-
getY
public java.util.List<java.lang.Number> getY()
- Specified by:
getYin interfaceHasTrainingData
-
getYShape
public int[] getYShape()
- Specified by:
getYShapein interfaceHasTrainingData
-
-