fernandobriann commited on
Commit
aeeb928
·
verified ·
1 Parent(s): 506e53c

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +29 -29
prediction.py CHANGED
@@ -48,42 +48,42 @@ price_max = meta["price_max"]
48
  # dan ram_norm karena performa CPU dan RAM paling penting untuk gaming.
49
 
50
  PRIORITY_WEIGHTS = {
51
-
52
  'gaming': {
53
- 'cpu_tier_norm': 0.35, # CPU sangat penting untuk gaming
54
- 'ram_norm': 0.25, # RAM besar mendukung multitasking saat gaming
55
- 'battery_norm': 0.20, # Baterai besar agar tidak cepat habis
56
- 'price_to_perf': 0.20, # Nilai performa per harga
57
- 'camera_norm': 0.05, # Kamera kurang prioritas untuk gamer
58
- 'battery_efficiency':0.05,
59
  },
60
-
61
  'camera': {
62
- 'camera_norm': 0.55, # Kamera adalah prioritas utama
63
- 'cpu_tier_norm': 0.15, # CPU berpengaruh ke kecepatan pemrosesan foto
64
- 'ram_norm': 0.10,
65
- 'battery_norm': 0.10,
66
- 'battery_efficiency':0.10,
67
- 'price_to_perf': 0.10,
68
  },
69
-
70
  'budget': {
71
- 'price_to_perf': 0.40, # Value terbaik terhadap harga
72
- 'battery_efficiency': 0.25, # Efisiensi baterai per harga
73
- 'battery_norm': 0.15, # Baterai tetap penting
74
- 'ram_norm': 0.10,
75
- 'cpu_tier_norm': 0.05,
76
- 'camera_norm': 0.05,
77
- },
78
-
79
  'balanced': {
80
- 'cpu_tier_norm': 0.20, # Semua fitur mendapat bobot seimbang
81
- 'ram_norm': 0.20,
82
- 'price_to_perf': 0.20,
83
- 'battery_norm': 0.15,
84
- 'camera_norm': 0.15,
85
- 'battery_efficiency':0.10,
86
  },
 
87
  }
88
 
89
  # Mapping priority ke nama segmen cluster tertentu
 
48
  # dan ram_norm karena performa CPU dan RAM paling penting untuk gaming.
49
 
50
  PRIORITY_WEIGHTS = {
 
51
  'gaming': {
52
+ 'cpu_tier_norm': 0.35, # raw processing power is #1 for gamers
53
+ 'ram_norm': 0.30, # games need memory for loading assets
54
+ 'battery_norm': 0.25, # games are battery-hungry
55
+ 'price_to_perf': 0.25, # gaming phones can be pricey; value matters
56
+ 'camera_norm': 0.05, # camera is secondary for gamers
57
+ 'battery_efficiency': 0.05,
58
  },
59
+
60
  'camera': {
61
+ 'camera_norm': 0.55, # dominant: highest MP sensor is the main ask
62
+ 'cpu_tier_norm': 0.15, # camera processing pipeline needs a decent chip
63
+ 'ram_norm': 0.10,
64
+ 'battery_norm': 0.10,
65
+ 'battery_efficiency': 0.10,
66
+ 'price_to_perf': 0.10,
67
  },
68
+
69
  'budget': {
70
+ 'battery_norm': 0.15,
71
+ 'battery_efficiency': 0.25,
72
+ 'price_to_perf': 0.40,
73
+ 'ram_norm': 0.10,
74
+ 'cpu_tier_norm': 0.05,
75
+ 'camera_norm': 0.05,
76
+ },
77
+
78
  'balanced': {
79
+ 'cpu_tier_norm': 0.20,
80
+ 'ram_norm': 0.20,
81
+ 'price_to_perf': 0.20,
82
+ 'battery_norm': 0.15,
83
+ 'camera_norm': 0.20,
84
+ 'battery_efficiency': 0.10,
85
  },
86
+
87
  }
88
 
89
  # Mapping priority ke nama segmen cluster tertentu