Enum NearestNeighborClassifier.VoteType
- java.lang.Object
-
- java.lang.Enum<NearestNeighborClassifier.VoteType>
-
- ai.libs.jaicore.ml.tsc.classifier.neighbors.NearestNeighborClassifier.VoteType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<NearestNeighborClassifier.VoteType>
- Enclosing class:
- NearestNeighborClassifier
public static enum NearestNeighborClassifier.VoteType extends java.lang.Enum<NearestNeighborClassifier.VoteType>
Votes types that describe how to aggregate the prediciton for a test instance on its nearest neighbors found.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MAJORITYMajority vote with @see NearestNeighborClassifier#voteMajority.WEIGHTED_PROPORTIONAL_TO_DISTANCEWeighted proportional to distance vote with @see NearestNeighborClassifier#voteWeightedProportionalToDistance.WEIGHTED_STEPWISEWeighted stepwise vote with @see NearestNeighborClassifier#voteWeightedStepwise.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NearestNeighborClassifier.VoteTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static NearestNeighborClassifier.VoteType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MAJORITY
public static final NearestNeighborClassifier.VoteType MAJORITY
Majority vote with @see NearestNeighborClassifier#voteMajority.
-
WEIGHTED_STEPWISE
public static final NearestNeighborClassifier.VoteType WEIGHTED_STEPWISE
Weighted stepwise vote with @see NearestNeighborClassifier#voteWeightedStepwise.
-
WEIGHTED_PROPORTIONAL_TO_DISTANCE
public static final NearestNeighborClassifier.VoteType WEIGHTED_PROPORTIONAL_TO_DISTANCE
Weighted proportional to distance vote with @see NearestNeighborClassifier#voteWeightedProportionalToDistance.
-
-
Method Detail
-
values
public static NearestNeighborClassifier.VoteType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NearestNeighborClassifier.VoteType c : NearestNeighborClassifier.VoteType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NearestNeighborClassifier.VoteType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-