Enum SimilarityMeasure
- java.lang.Object
-
- java.lang.Enum<SimilarityMeasure>
-
- com.r4tings.recommender.model.measures.similarity.SimilarityMeasure
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SimilarityMeasure>
public enum SimilarityMeasure extends java.lang.Enum<SimilarityMeasure>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BINARY_EXTENDED_JACCARD
BINARY_JACCARD
BINARY_SMC
COSINE
EUCLIDEAN
MANHATTAN
PEARSON
WEIGHTED_EUCLIDEAN
WEIGHTED_MANHATTAN
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
descriptions()
static SimilarityMeasure
get(java.lang.String description)
abstract org.apache.spark.sql.expressions.UserDefinedFunction
invoke(java.lang.Boolean imputeZero, java.lang.Boolean verbose)
java.lang.String
toString()
static SimilarityMeasure
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SimilarityMeasure[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COSINE
public static final SimilarityMeasure COSINE
-
PEARSON
public static final SimilarityMeasure PEARSON
-
MANHATTAN
public static final SimilarityMeasure MANHATTAN
-
WEIGHTED_MANHATTAN
public static final SimilarityMeasure WEIGHTED_MANHATTAN
-
EUCLIDEAN
public static final SimilarityMeasure EUCLIDEAN
-
WEIGHTED_EUCLIDEAN
public static final SimilarityMeasure WEIGHTED_EUCLIDEAN
-
BINARY_SMC
public static final SimilarityMeasure BINARY_SMC
-
BINARY_JACCARD
public static final SimilarityMeasure BINARY_JACCARD
-
BINARY_EXTENDED_JACCARD
public static final SimilarityMeasure BINARY_EXTENDED_JACCARD
-
-
Method Detail
-
values
public static SimilarityMeasure[] 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 (SimilarityMeasure c : SimilarityMeasure.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SimilarityMeasure 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
-
get
public static SimilarityMeasure get(java.lang.String description)
-
descriptions
public static java.util.List<java.lang.String> descriptions()
-
invoke
public abstract org.apache.spark.sql.expressions.UserDefinedFunction invoke(java.lang.Boolean imputeZero, java.lang.Boolean verbose)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<SimilarityMeasure>
-
-