DawnC commited on
Commit
2307eb1
1 Parent(s): 9ddc325

Update scoring_calculation_system.py

Browse files
Files changed (1) hide show
  1. scoring_calculation_system.py +5 -18
scoring_calculation_system.py CHANGED
@@ -624,24 +624,11 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
624
  # return max(0.65, min(0.95, amplified)) # 限制在65%-95%範圍內
625
 
626
  def amplify_score(score):
627
- """
628
- 將原始分數放大,創造更明顯的差異
629
-
630
- 參數:
631
- score: 原始分數 (0.0-1.0)
632
-
633
- 返回:
634
- float: 放大後的分數 (0.60-0.95)
635
- """
636
- # 基礎分數調整 - 將範圍集中到更有意義的區間
637
- adjusted = (score - 0.4) * 1.67
638
-
639
- # 使用更強的指數關係來放大差異
640
- # 指數3可以在高分區間產生更明顯的差異
641
- amplified = pow(adjusted, 3) / 8 + score
642
-
643
- # 確保分數在60%-95%之間,並保持合理的分布
644
- return max(0.60, min(0.95, amplified))
645
 
646
  final_score = amplify_score(weighted_score)
647
 
 
624
  # return max(0.65, min(0.95, amplified)) # 限制在65%-95%範圍內
625
 
626
  def amplify_score(score):
627
+ """強化分數差異"""
628
+ adjusted = (score - 0.35) * 1.8
629
+ amplified = pow(adjusted, 3.5) / 6 + score
630
+ # 範圍55%-95%
631
+ return max(0.55, min(0.95, amplified))
 
 
 
 
 
 
 
 
 
 
 
 
 
632
 
633
  final_score = amplify_score(weighted_score)
634