DawnC commited on
Commit
5e7395c
1 Parent(s): 071d6b6

Update scoring_calculation_system.py

Browse files
Files changed (1) hide show
  1. scoring_calculation_system.py +12 -14
scoring_calculation_system.py CHANGED
@@ -503,13 +503,13 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
503
  },
504
  "Large": {
505
  "apartment": {
506
- "no_yard": 0.65,
507
- "shared_yard": 0.75,
508
  "private_yard": 0.85
509
  },
510
  "house_small": {
511
- "no_yard": 0.70,
512
- "shared_yard": 0.80,
513
  "private_yard": 0.90
514
  },
515
  "house_large": {
@@ -520,13 +520,13 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
520
  },
521
  "Giant": {
522
  "apartment": {
523
- "no_yard": 0.60,
524
- "shared_yard": 0.70,
525
  "private_yard": 0.80
526
  },
527
  "house_small": {
528
- "no_yard": 0.65,
529
- "shared_yard": 0.75,
530
  "private_yard": 0.85
531
  },
532
  "house_large": {
@@ -549,13 +549,13 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
549
  "house_large": 0
550
  },
551
  "High": {
552
- "apartment": -0.25,
553
- "house_small": -0.10,
554
  "house_large": 0
555
  },
556
  "Moderate": {
557
- "apartment": -0.15,
558
- "house_small": -0.05,
559
  "house_large": 0
560
  },
561
  "Low": {
@@ -633,8 +633,6 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
633
  def calculate_exercise_score(breed_needs: str, exercise_time: int, exercise_type: str) -> float:
634
  """
635
  精確評估品種運動需求與使用者運動條件的匹配度
636
-
637
- 改進重點:
638
  1. 擴大分數範圍到 0.1-1.0
639
  2. 加強運動類型影響
640
  3. 考慮運動強度與時間的綜合效果
 
503
  },
504
  "Large": {
505
  "apartment": {
506
+ "no_yard": 0.70,
507
+ "shared_yard": 0.80,
508
  "private_yard": 0.85
509
  },
510
  "house_small": {
511
+ "no_yard": 0.75,
512
+ "shared_yard": 0.85,
513
  "private_yard": 0.90
514
  },
515
  "house_large": {
 
520
  },
521
  "Giant": {
522
  "apartment": {
523
+ "no_yard": 0.65,
524
+ "shared_yard": 0.75,
525
  "private_yard": 0.80
526
  },
527
  "house_small": {
528
+ "no_yard": 0.70,
529
+ "shared_yard": 0.80,
530
  "private_yard": 0.85
531
  },
532
  "house_large": {
 
549
  "house_large": 0
550
  },
551
  "High": {
552
+ "apartment": -0.08,
553
+ "house_small": -0.05,
554
  "house_large": 0
555
  },
556
  "Moderate": {
557
+ "apartment": -0.5,
558
+ "house_small": -0.02,
559
  "house_large": 0
560
  },
561
  "Low": {
 
633
  def calculate_exercise_score(breed_needs: str, exercise_time: int, exercise_type: str) -> float:
634
  """
635
  精確評估品種運動需求與使用者運動條件的匹配度
 
 
636
  1. 擴大分數範圍到 0.1-1.0
637
  2. 加強運動類型影響
638
  3. 考慮運動強度與時間的綜合效果