Spaces:
Running
on
Zero
Running
on
Zero
Update scoring_calculation_system.py
Browse files
scoring_calculation_system.py
CHANGED
|
@@ -2088,10 +2088,10 @@ def calculate_breed_compatibility_score(scores: dict, user_prefs: UserPreference
|
|
| 2088 |
"""
|
| 2089 |
# 重新定義關鍵指標閾值,提供更寬容的評分標準
|
| 2090 |
critical_thresholds = {
|
| 2091 |
-
'space': 0.
|
| 2092 |
-
'exercise': 0.4,
|
| 2093 |
-
'experience': 0.5,
|
| 2094 |
-
'noise': 0.5
|
| 2095 |
}
|
| 2096 |
|
| 2097 |
# 評估關鍵指標失敗情況
|
|
@@ -2333,30 +2333,4 @@ def amplify_score_extreme(score: float) -> float:
|
|
| 2333 |
position = score / 0.50
|
| 2334 |
return 0.70 + (smooth_curve(position) * 0.05)
|
| 2335 |
|
| 2336 |
-
return round(min(1.0, max(0.0, score)), 4)
|
| 2337 |
-
|
| 2338 |
-
# def amplify_score_extreme(score: float) -> float:
|
| 2339 |
-
# """優化分數分布,提供更高的分數範圍"""
|
| 2340 |
-
# def smooth_curve(x: float, steepness: float = 12) -> float:
|
| 2341 |
-
# import math
|
| 2342 |
-
# return 1 / (1 + math.exp(-steepness * (x - 0.5)))
|
| 2343 |
-
|
| 2344 |
-
# if score >= 0.9:
|
| 2345 |
-
# position = (score - 0.9) / 0.1
|
| 2346 |
-
# return 0.96 + (position * 0.04) # 90-100的原始分映射到96-100
|
| 2347 |
-
|
| 2348 |
-
# elif score >= 0.8:
|
| 2349 |
-
# position = (score - 0.8) / 0.1
|
| 2350 |
-
# return 0.90 + (position * 0.06) # 80-90的原始分映射到90-96
|
| 2351 |
-
|
| 2352 |
-
# elif score >= 0.7:
|
| 2353 |
-
# position = (score - 0.7) / 0.1
|
| 2354 |
-
# return 0.82 + (position * 0.08) # 70-80的原始分映射到82-90
|
| 2355 |
-
|
| 2356 |
-
# elif score >= 0.5:
|
| 2357 |
-
# position = (score - 0.5) / 0.2
|
| 2358 |
-
# return 0.75 + (smooth_curve(position) * 0.07) # 50-70的原始分映射到75-82
|
| 2359 |
-
|
| 2360 |
-
# else:
|
| 2361 |
-
# position = score / 0.5
|
| 2362 |
-
# return 0.70 + (smooth_curve(position) * 0.05) # 50以下的原始分映射到70-75
|
|
|
|
| 2088 |
"""
|
| 2089 |
# 重新定義關鍵指標閾值,提供更寬容的評分標準
|
| 2090 |
critical_thresholds = {
|
| 2091 |
+
'space': 0.35,
|
| 2092 |
+
'exercise': 0.4,
|
| 2093 |
+
'experience': 0.5,
|
| 2094 |
+
'noise': 0.5
|
| 2095 |
}
|
| 2096 |
|
| 2097 |
# 評估關鍵指標失敗情況
|
|
|
|
| 2333 |
position = score / 0.50
|
| 2334 |
return 0.70 + (smooth_curve(position) * 0.05)
|
| 2335 |
|
| 2336 |
+
return round(min(1.0, max(0.0, score)), 4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|