Sha256: 234f95618954d2371d0741d09960fd077d09a4068d047ae991d5cd9a6a22c162

Contents?: true

Size: 619 Bytes

Versions: 5

Compression:

Stored size: 619 Bytes

Contents

module FuzzyRealty
  # Chosen weights are largely arbitrary. Expert was consulted for relative ratings, 
  # but as the knowledge engineer I was forced to pick the crisp values. 
  # Experimentation with larger user groups would likely show specific values to do 
  # better 
  
  # class Parameter uses this hash to determine what is a valid type. 
  # - This must be matched by a rule in rulebase.rb
  WEIGHTS = {
    :sqft => 15, 
    :price => 10, 
    :location => 25,
    :style => 18
  }
  
  # Easy way to sum the max score (for testing)
  def self.max_score
    WEIGHTS.inject(0) {|sum,n| sum + n[1]}
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rkneufeld-fuzzy-realty-0.6.2 lib/weights.rb
rkneufeld-fuzzy-realty-0.7.0 lib/weights.rb
rkneufeld-fuzzy-realty-0.7.1 lib/weights.rb
rkneufeld-fuzzy-realty-0.7.2 lib/weights.rb
rkneufeld-fuzzy-realty-0.7.3 lib/weights.rb