Sha256: 85dd98690486efdd11578da30c8b39f63c28bc9436726596d6f9e28e5a69748c
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
# ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- require 'App42Response.rb' # # An enum that contains 2 types of the Recommender Similarity either EuclideanDistanceSimilarity or PearsonCorrelationSimilarity. # # module App42 module Recommend class RecommenderSimilarity < App42Response unless (const_defined?(:EUCLIDEAN_DISTANCE)) EUCLIDEAN_DISTANCE = "EuclideanDistanceSimilarity" end unless (const_defined?(:PEARSON_CORRELATION)) PEARSON_CORRELATION = "PearsonCorrelationSimilarity" end # # Sets the value of the Recommender Similarity. EuclideanDistanceSimilarity # or PearsonCorrelationSimilarity. # # @param string # - the string of Recommender Similarity either EuclideanDistanceSimilarity or PearsonCorrelationSimilarity. # def enum(string) return RecommenderSimilarity.const_get(string) end # # Returns the value of Recommender Similarity either EuclideanDistanceSimilarity or PearsonCorrelationSimilarity. # # @return the value of Recommender Similarity. # # def isAvailable(string) if(string == "EuclideanDistanceSimilarity") return "EUCLIDEAN_DISTANCE" elsif(string == "PearsonCorrelationSimilarity") return "PEARSON_CORRELATION"; else return nil end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
App42_RUBY_SDK-0.8.3 | lib/recommend/RecommenderSimilarity.rb |