nitish-spz commited on
Commit
cfff171
·
1 Parent(s): e87ec54

Fix confidence scores loading by using JSON instead of Node.js

Browse files

BREAKING CHANGE: Switch from parsing JS file to using pure JSON

- Created confidence_scores.json from confidence_scores.js
- Removed Node.js dependency for loading confidence scores
- Added extensive debugging for file path resolution
- Added fallback path handling
- This eliminates the subprocess reliability issues in HF Spaces

The confidence scores should now load reliably without depending on Node.js subprocess execution.

Files changed (2) hide show
  1. app.py +29 -14
  2. confidence_scores.json +554 -0
app.py CHANGED
@@ -216,32 +216,40 @@ if not os.path.exists(CAT_MAPPINGS_SAVE_PATH):
216
  with open(CAT_MAPPINGS_SAVE_PATH, 'r') as f:
217
  category_mappings = json.load(f)
218
 
219
- # Load confidence scores from confidence_scores.js
220
  def load_confidence_scores():
221
- """Load confidence scores from the JavaScript file"""
222
  try:
223
  # Get the directory where this script is located
224
  script_dir = os.path.dirname(os.path.abspath(__file__))
225
- confidence_file = os.path.join(script_dir, 'confidence_scores.js')
226
 
227
  print(f"📂 Script directory: {script_dir}")
228
  print(f"📂 Looking for confidence file at: {confidence_file}")
229
  print(f"📂 File exists: {os.path.exists(confidence_file)}")
230
 
231
- result = subprocess.run([
232
- 'node', '-e',
233
- f'const conf = require("{confidence_file}"); console.log(JSON.stringify(conf.confidenceMapping));'
234
- ], capture_output=True, text=True)
 
 
235
 
236
- if result.returncode == 0:
237
- confidence_data = json.loads(result.stdout.strip())
238
  print(f"✅ Successfully loaded {len(confidence_data)} confidence score combinations")
 
 
 
 
 
 
239
  return confidence_data
240
- else:
241
- print(f"⚠️ Failed to load confidence scores: {result.stderr}")
242
- print(f"⚠️ Return code: {result.returncode}")
243
- print(f"⚠️ Stdout: {result.stdout}")
244
- return {}
245
  except Exception as e:
246
  print(f"⚠️ Error loading confidence scores: {e}")
247
  import traceback
@@ -250,11 +258,18 @@ def load_confidence_scores():
250
 
251
  # Load confidence scores
252
  try:
 
 
 
253
  confidence_scores = load_confidence_scores()
254
  print(f"✅ Confidence scores loaded successfully: {len(confidence_scores)} combinations")
 
 
 
255
  except Exception as e:
256
  print(f"⚠️ Error loading confidence scores: {e}")
257
  confidence_scores = {}
 
258
 
259
  def get_confidence_data(business_model, customer_type, conversion_type, industry, page_type):
260
  """Get confidence data based on Industry + Page Type combination (more reliable than 5-feature combinations)"""
 
216
  with open(CAT_MAPPINGS_SAVE_PATH, 'r') as f:
217
  category_mappings = json.load(f)
218
 
219
+ # Load confidence scores directly from JSON file
220
  def load_confidence_scores():
221
+ """Load confidence scores from confidence_scores.json"""
222
  try:
223
  # Get the directory where this script is located
224
  script_dir = os.path.dirname(os.path.abspath(__file__))
225
+ confidence_file = os.path.join(script_dir, 'confidence_scores.json')
226
 
227
  print(f"📂 Script directory: {script_dir}")
228
  print(f"📂 Looking for confidence file at: {confidence_file}")
229
  print(f"📂 File exists: {os.path.exists(confidence_file)}")
230
 
231
+ if not os.path.exists(confidence_file):
232
+ print(f"⚠️ Confidence file not found, trying fallback location...")
233
+ # Try current directory as fallback
234
+ confidence_file = 'confidence_scores.json'
235
+ print(f"📂 Fallback path: {confidence_file}")
236
+ print(f"📂 Fallback exists: {os.path.exists(confidence_file)}")
237
 
238
+ with open(confidence_file, 'r') as f:
239
+ confidence_data = json.load(f)
240
  print(f"✅ Successfully loaded {len(confidence_data)} confidence score combinations")
241
+
242
+ # Print a sample to verify data
243
+ sample_key = list(confidence_data.keys())[0] if confidence_data else None
244
+ if sample_key:
245
+ print(f"📊 Sample entry: {sample_key} = {confidence_data[sample_key]}")
246
+
247
  return confidence_data
248
+ except FileNotFoundError as e:
249
+ print(f" Confidence file not found: {e}")
250
+ print(f"📂 Current working directory: {os.getcwd()}")
251
+ print(f"📂 Files in script dir: {os.listdir(script_dir) if os.path.exists(script_dir) else 'N/A'}")
252
+ return {}
253
  except Exception as e:
254
  print(f"⚠️ Error loading confidence scores: {e}")
255
  import traceback
 
258
 
259
  # Load confidence scores
260
  try:
261
+ print("=" * 50)
262
+ print("🚀 LOADING CONFIDENCE SCORES...")
263
+ print("=" * 50)
264
  confidence_scores = load_confidence_scores()
265
  print(f"✅ Confidence scores loaded successfully: {len(confidence_scores)} combinations")
266
+ print(f"🔍 confidence_scores is empty: {len(confidence_scores) == 0}")
267
+ print(f"🔍 confidence_scores type: {type(confidence_scores)}")
268
+ print("=" * 50)
269
  except Exception as e:
270
  print(f"⚠️ Error loading confidence scores: {e}")
271
  confidence_scores = {}
272
+ print(f"❌ confidence_scores set to empty dict: {confidence_scores}")
273
 
274
  def get_confidence_data(business_model, customer_type, conversion_type, industry, page_type):
275
  """Get confidence data based on Industry + Page Type combination (more reliable than 5-feature combinations)"""
confidence_scores.json ADDED
@@ -0,0 +1,554 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Automotive & Transportation|Awareness & Discovery": {
3
+ "accuracy": 0.6,
4
+ "count": 15,
5
+ "training_data_count": 135,
6
+ "correct_predictions": 9,
7
+ "actual_wins": 6,
8
+ "predicted_wins": 2
9
+ },
10
+ "Automotive & Transportation|Consideration & Evaluation": {
11
+ "accuracy": 0.667,
12
+ "count": 6,
13
+ "training_data_count": 54,
14
+ "correct_predictions": 4,
15
+ "actual_wins": 2,
16
+ "predicted_wins": 2
17
+ },
18
+ "Automotive & Transportation|Conversion": {
19
+ "accuracy": 1.0,
20
+ "count": 3,
21
+ "training_data_count": 27,
22
+ "correct_predictions": 3,
23
+ "actual_wins": 0,
24
+ "predicted_wins": 0
25
+ },
26
+ "Automotive & Transportation|Internal & Navigation": {
27
+ "accuracy": 0.571,
28
+ "count": 7,
29
+ "training_data_count": 63,
30
+ "correct_predictions": 4,
31
+ "actual_wins": 3,
32
+ "predicted_wins": 2
33
+ },
34
+ "B2B Services|Awareness & Discovery": {
35
+ "accuracy": 0.698,
36
+ "count": 483,
37
+ "training_data_count": 4347,
38
+ "correct_predictions": 337,
39
+ "actual_wins": 186,
40
+ "predicted_wins": 178
41
+ },
42
+ "B2B Services|Consideration & Evaluation": {
43
+ "accuracy": 0.657,
44
+ "count": 175,
45
+ "training_data_count": 1575,
46
+ "correct_predictions": 115,
47
+ "actual_wins": 82,
48
+ "predicted_wins": 78
49
+ },
50
+ "B2B Services|Conversion": {
51
+ "accuracy": 0.604,
52
+ "count": 53,
53
+ "training_data_count": 477,
54
+ "correct_predictions": 32,
55
+ "actual_wins": 26,
56
+ "predicted_wins": 23
57
+ },
58
+ "B2B Services|Internal & Navigation": {
59
+ "accuracy": 0.719,
60
+ "count": 139,
61
+ "training_data_count": 1251,
62
+ "correct_predictions": 100,
63
+ "actual_wins": 58,
64
+ "predicted_wins": 43
65
+ },
66
+ "B2B Services|Post-Conversion & Other": {
67
+ "accuracy": 0.571,
68
+ "count": 14,
69
+ "training_data_count": 126,
70
+ "correct_predictions": 8,
71
+ "actual_wins": 4,
72
+ "predicted_wins": 8
73
+ },
74
+ "B2B Software & Tech|Awareness & Discovery": {
75
+ "accuracy": 0.661,
76
+ "count": 1626,
77
+ "training_data_count": 14634,
78
+ "correct_predictions": 1074,
79
+ "actual_wins": 667,
80
+ "predicted_wins": 625
81
+ },
82
+ "B2B Software & Tech|Consideration & Evaluation": {
83
+ "accuracy": 0.617,
84
+ "count": 1046,
85
+ "training_data_count": 9414,
86
+ "correct_predictions": 645,
87
+ "actual_wins": 432,
88
+ "predicted_wins": 397
89
+ },
90
+ "B2B Software & Tech|Conversion": {
91
+ "accuracy": 0.647,
92
+ "count": 184,
93
+ "training_data_count": 1656,
94
+ "correct_predictions": 119,
95
+ "actual_wins": 71,
96
+ "predicted_wins": 74
97
+ },
98
+ "B2B Software & Tech|Internal & Navigation": {
99
+ "accuracy": 0.715,
100
+ "count": 376,
101
+ "training_data_count": 3384,
102
+ "correct_predictions": 269,
103
+ "actual_wins": 138,
104
+ "predicted_wins": 117
105
+ },
106
+ "B2B Software & Tech|Post-Conversion & Other": {
107
+ "accuracy": 0.78,
108
+ "count": 41,
109
+ "training_data_count": 369,
110
+ "correct_predictions": 32,
111
+ "actual_wins": 15,
112
+ "predicted_wins": 18
113
+ },
114
+ "Consumer Services|Awareness & Discovery": {
115
+ "accuracy": 0.723,
116
+ "count": 238,
117
+ "training_data_count": 2142,
118
+ "correct_predictions": 172,
119
+ "actual_wins": 97,
120
+ "predicted_wins": 85
121
+ },
122
+ "Consumer Services|Consideration & Evaluation": {
123
+ "accuracy": 0.592,
124
+ "count": 103,
125
+ "training_data_count": 927,
126
+ "correct_predictions": 61,
127
+ "actual_wins": 49,
128
+ "predicted_wins": 41
129
+ },
130
+ "Consumer Services|Conversion": {
131
+ "accuracy": 0.643,
132
+ "count": 42,
133
+ "training_data_count": 378,
134
+ "correct_predictions": 27,
135
+ "actual_wins": 12,
136
+ "predicted_wins": 13
137
+ },
138
+ "Consumer Services|Internal & Navigation": {
139
+ "accuracy": 0.607,
140
+ "count": 56,
141
+ "training_data_count": 504,
142
+ "correct_predictions": 34,
143
+ "actual_wins": 32,
144
+ "predicted_wins": 22
145
+ },
146
+ "Consumer Services|Post-Conversion & Other": {
147
+ "accuracy": 0.5,
148
+ "count": 2,
149
+ "training_data_count": 18,
150
+ "correct_predictions": 1,
151
+ "actual_wins": 1,
152
+ "predicted_wins": 0
153
+ },
154
+ "Consumer Software & Apps|Awareness & Discovery": {
155
+ "accuracy": 0.682,
156
+ "count": 22,
157
+ "training_data_count": 198,
158
+ "correct_predictions": 15,
159
+ "actual_wins": 5,
160
+ "predicted_wins": 8
161
+ },
162
+ "Consumer Software & Apps|Consideration & Evaluation": {
163
+ "accuracy": 0.9,
164
+ "count": 10,
165
+ "training_data_count": 90,
166
+ "correct_predictions": 9,
167
+ "actual_wins": 6,
168
+ "predicted_wins": 5
169
+ },
170
+ "Consumer Software & Apps|Conversion": {
171
+ "accuracy": 0.667,
172
+ "count": 15,
173
+ "training_data_count": 135,
174
+ "correct_predictions": 10,
175
+ "actual_wins": 5,
176
+ "predicted_wins": 6
177
+ },
178
+ "Consumer Software & Apps|Internal & Navigation": {
179
+ "accuracy": 0.2,
180
+ "count": 5,
181
+ "training_data_count": 45,
182
+ "correct_predictions": 1,
183
+ "actual_wins": 3,
184
+ "predicted_wins": 3
185
+ },
186
+ "Consumer Software & Apps|Post-Conversion & Other": {
187
+ "accuracy": 0.0,
188
+ "count": 1,
189
+ "training_data_count": 9,
190
+ "correct_predictions": 0,
191
+ "actual_wins": 1,
192
+ "predicted_wins": 0
193
+ },
194
+ "Education|Awareness & Discovery": {
195
+ "accuracy": 0.589,
196
+ "count": 409,
197
+ "training_data_count": 3681,
198
+ "correct_predictions": 241,
199
+ "actual_wins": 180,
200
+ "predicted_wins": 170
201
+ },
202
+ "Education|Consideration & Evaluation": {
203
+ "accuracy": 0.645,
204
+ "count": 183,
205
+ "training_data_count": 1647,
206
+ "correct_predictions": 118,
207
+ "actual_wins": 72,
208
+ "predicted_wins": 77
209
+ },
210
+ "Education|Conversion": {
211
+ "accuracy": 0.605,
212
+ "count": 43,
213
+ "training_data_count": 387,
214
+ "correct_predictions": 26,
215
+ "actual_wins": 16,
216
+ "predicted_wins": 17
217
+ },
218
+ "Education|Internal & Navigation": {
219
+ "accuracy": 0.661,
220
+ "count": 177,
221
+ "training_data_count": 1593,
222
+ "correct_predictions": 117,
223
+ "actual_wins": 70,
224
+ "predicted_wins": 62
225
+ },
226
+ "Education|Post-Conversion & Other": {
227
+ "accuracy": 0.308,
228
+ "count": 13,
229
+ "training_data_count": 117,
230
+ "correct_predictions": 4,
231
+ "actual_wins": 9,
232
+ "predicted_wins": 8
233
+ },
234
+ "Finance, Insurance & Real Estate|Awareness & Discovery": {
235
+ "accuracy": 0.662,
236
+ "count": 417,
237
+ "training_data_count": 3753,
238
+ "correct_predictions": 276,
239
+ "actual_wins": 172,
240
+ "predicted_wins": 147
241
+ },
242
+ "Finance, Insurance & Real Estate|Consideration & Evaluation": {
243
+ "accuracy": 0.596,
244
+ "count": 193,
245
+ "training_data_count": 1737,
246
+ "correct_predictions": 115,
247
+ "actual_wins": 82,
248
+ "predicted_wins": 78
249
+ },
250
+ "Finance, Insurance & Real Estate|Conversion": {
251
+ "accuracy": 0.615,
252
+ "count": 52,
253
+ "training_data_count": 468,
254
+ "correct_predictions": 32,
255
+ "actual_wins": 26,
256
+ "predicted_wins": 22
257
+ },
258
+ "Finance, Insurance & Real Estate|Internal & Navigation": {
259
+ "accuracy": 0.678,
260
+ "count": 177,
261
+ "training_data_count": 1593,
262
+ "correct_predictions": 120,
263
+ "actual_wins": 65,
264
+ "predicted_wins": 60
265
+ },
266
+ "Finance, Insurance & Real Estate|Post-Conversion & Other": {
267
+ "accuracy": 0.545,
268
+ "count": 22,
269
+ "training_data_count": 198,
270
+ "correct_predictions": 12,
271
+ "actual_wins": 13,
272
+ "predicted_wins": 7
273
+ },
274
+ "Food, Hospitality & Travel|Awareness & Discovery": {
275
+ "accuracy": 0.676,
276
+ "count": 293,
277
+ "training_data_count": 2637,
278
+ "correct_predictions": 198,
279
+ "actual_wins": 141,
280
+ "predicted_wins": 136
281
+ },
282
+ "Food, Hospitality & Travel|Consideration & Evaluation": {
283
+ "accuracy": 0.642,
284
+ "count": 159,
285
+ "training_data_count": 1431,
286
+ "correct_predictions": 102,
287
+ "actual_wins": 70,
288
+ "predicted_wins": 59
289
+ },
290
+ "Food, Hospitality & Travel|Conversion": {
291
+ "accuracy": 0.6,
292
+ "count": 60,
293
+ "training_data_count": 540,
294
+ "correct_predictions": 36,
295
+ "actual_wins": 31,
296
+ "predicted_wins": 27
297
+ },
298
+ "Food, Hospitality & Travel|Internal & Navigation": {
299
+ "accuracy": 0.63,
300
+ "count": 73,
301
+ "training_data_count": 657,
302
+ "correct_predictions": 46,
303
+ "actual_wins": 32,
304
+ "predicted_wins": 27
305
+ },
306
+ "Food, Hospitality & Travel|Post-Conversion & Other": {
307
+ "accuracy": 0.286,
308
+ "count": 7,
309
+ "training_data_count": 63,
310
+ "correct_predictions": 2,
311
+ "actual_wins": 2,
312
+ "predicted_wins": 5
313
+ },
314
+ "Health & Wellness|Awareness & Discovery": {
315
+ "accuracy": 0.631,
316
+ "count": 643,
317
+ "training_data_count": 5787,
318
+ "correct_predictions": 406,
319
+ "actual_wins": 262,
320
+ "predicted_wins": 249
321
+ },
322
+ "Health & Wellness|Consideration & Evaluation": {
323
+ "accuracy": 0.663,
324
+ "count": 389,
325
+ "training_data_count": 3501,
326
+ "correct_predictions": 258,
327
+ "actual_wins": 175,
328
+ "predicted_wins": 156
329
+ },
330
+ "Health & Wellness|Conversion": {
331
+ "accuracy": 0.632,
332
+ "count": 106,
333
+ "training_data_count": 954,
334
+ "correct_predictions": 67,
335
+ "actual_wins": 42,
336
+ "predicted_wins": 53
337
+ },
338
+ "Health & Wellness|Internal & Navigation": {
339
+ "accuracy": 0.654,
340
+ "count": 156,
341
+ "training_data_count": 1404,
342
+ "correct_predictions": 102,
343
+ "actual_wins": 72,
344
+ "predicted_wins": 58
345
+ },
346
+ "Health & Wellness|Post-Conversion & Other": {
347
+ "accuracy": 0.667,
348
+ "count": 12,
349
+ "training_data_count": 108,
350
+ "correct_predictions": 8,
351
+ "actual_wins": 5,
352
+ "predicted_wins": 3
353
+ },
354
+ "Industrial & Manufacturing|Awareness & Discovery": {
355
+ "accuracy": 0.573,
356
+ "count": 171,
357
+ "training_data_count": 1539,
358
+ "correct_predictions": 98,
359
+ "actual_wins": 75,
360
+ "predicted_wins": 82
361
+ },
362
+ "Industrial & Manufacturing|Consideration & Evaluation": {
363
+ "accuracy": 0.677,
364
+ "count": 93,
365
+ "training_data_count": 837,
366
+ "correct_predictions": 63,
367
+ "actual_wins": 34,
368
+ "predicted_wins": 32
369
+ },
370
+ "Industrial & Manufacturing|Conversion": {
371
+ "accuracy": 0.778,
372
+ "count": 18,
373
+ "training_data_count": 162,
374
+ "correct_predictions": 14,
375
+ "actual_wins": 6,
376
+ "predicted_wins": 10
377
+ },
378
+ "Industrial & Manufacturing|Internal & Navigation": {
379
+ "accuracy": 0.776,
380
+ "count": 67,
381
+ "training_data_count": 603,
382
+ "correct_predictions": 52,
383
+ "actual_wins": 25,
384
+ "predicted_wins": 28
385
+ },
386
+ "Industrial & Manufacturing|Post-Conversion & Other": {
387
+ "accuracy": 0.833,
388
+ "count": 6,
389
+ "training_data_count": 54,
390
+ "correct_predictions": 5,
391
+ "actual_wins": 4,
392
+ "predicted_wins": 5
393
+ },
394
+ "Media & Entertainment|Awareness & Discovery": {
395
+ "accuracy": 0.701,
396
+ "count": 251,
397
+ "training_data_count": 2259,
398
+ "correct_predictions": 176,
399
+ "actual_wins": 99,
400
+ "predicted_wins": 106
401
+ },
402
+ "Media & Entertainment|Consideration & Evaluation": {
403
+ "accuracy": 0.663,
404
+ "count": 95,
405
+ "training_data_count": 855,
406
+ "correct_predictions": 63,
407
+ "actual_wins": 28,
408
+ "predicted_wins": 32
409
+ },
410
+ "Media & Entertainment|Conversion": {
411
+ "accuracy": 0.792,
412
+ "count": 24,
413
+ "training_data_count": 216,
414
+ "correct_predictions": 19,
415
+ "actual_wins": 10,
416
+ "predicted_wins": 11
417
+ },
418
+ "Media & Entertainment|Internal & Navigation": {
419
+ "accuracy": 0.676,
420
+ "count": 68,
421
+ "training_data_count": 612,
422
+ "correct_predictions": 46,
423
+ "actual_wins": 24,
424
+ "predicted_wins": 18
425
+ },
426
+ "Media & Entertainment|Post-Conversion & Other": {
427
+ "accuracy": 0.6,
428
+ "count": 5,
429
+ "training_data_count": 45,
430
+ "correct_predictions": 3,
431
+ "actual_wins": 1,
432
+ "predicted_wins": 1
433
+ },
434
+ "Non-Profit & Government|Awareness & Discovery": {
435
+ "accuracy": 0.692,
436
+ "count": 107,
437
+ "training_data_count": 963,
438
+ "correct_predictions": 74,
439
+ "actual_wins": 36,
440
+ "predicted_wins": 37
441
+ },
442
+ "Non-Profit & Government|Consideration & Evaluation": {
443
+ "accuracy": 0.531,
444
+ "count": 32,
445
+ "training_data_count": 288,
446
+ "correct_predictions": 17,
447
+ "actual_wins": 12,
448
+ "predicted_wins": 11
449
+ },
450
+ "Non-Profit & Government|Conversion": {
451
+ "accuracy": 0.707,
452
+ "count": 92,
453
+ "training_data_count": 828,
454
+ "correct_predictions": 65,
455
+ "actual_wins": 29,
456
+ "predicted_wins": 22
457
+ },
458
+ "Non-Profit & Government|Internal & Navigation": {
459
+ "accuracy": 0.64,
460
+ "count": 50,
461
+ "training_data_count": 450,
462
+ "correct_predictions": 32,
463
+ "actual_wins": 23,
464
+ "predicted_wins": 21
465
+ },
466
+ "Non-Profit & Government|Post-Conversion & Other": {
467
+ "accuracy": 0.909,
468
+ "count": 11,
469
+ "training_data_count": 99,
470
+ "correct_predictions": 10,
471
+ "actual_wins": 4,
472
+ "predicted_wins": 3
473
+ },
474
+ "Other|Awareness & Discovery": {
475
+ "accuracy": 0.755,
476
+ "count": 53,
477
+ "training_data_count": 477,
478
+ "correct_predictions": 40,
479
+ "actual_wins": 24,
480
+ "predicted_wins": 21
481
+ },
482
+ "Other|Consideration & Evaluation": {
483
+ "accuracy": 0.385,
484
+ "count": 26,
485
+ "training_data_count": 234,
486
+ "correct_predictions": 10,
487
+ "actual_wins": 13,
488
+ "predicted_wins": 9
489
+ },
490
+ "Other|Conversion": {
491
+ "accuracy": 0.75,
492
+ "count": 4,
493
+ "training_data_count": 36,
494
+ "correct_predictions": 3,
495
+ "actual_wins": 2,
496
+ "predicted_wins": 3
497
+ },
498
+ "Other|Internal & Navigation": {
499
+ "accuracy": 0.4,
500
+ "count": 10,
501
+ "training_data_count": 90,
502
+ "correct_predictions": 4,
503
+ "actual_wins": 5,
504
+ "predicted_wins": 1
505
+ },
506
+ "Other|Post-Conversion & Other": {
507
+ "accuracy": 1.0,
508
+ "count": 1,
509
+ "training_data_count": 9,
510
+ "correct_predictions": 1,
511
+ "actual_wins": 1,
512
+ "predicted_wins": 1
513
+ },
514
+ "Retail & E-commerce|Awareness & Discovery": {
515
+ "accuracy": 0.645,
516
+ "count": 619,
517
+ "training_data_count": 5571,
518
+ "correct_predictions": 399,
519
+ "actual_wins": 309,
520
+ "predicted_wins": 239
521
+ },
522
+ "Retail & E-commerce|Consideration & Evaluation": {
523
+ "accuracy": 0.638,
524
+ "count": 718,
525
+ "training_data_count": 6462,
526
+ "correct_predictions": 458,
527
+ "actual_wins": 345,
528
+ "predicted_wins": 309
529
+ },
530
+ "Retail & E-commerce|Conversion": {
531
+ "accuracy": 0.661,
532
+ "count": 112,
533
+ "training_data_count": 1008,
534
+ "correct_predictions": 74,
535
+ "actual_wins": 58,
536
+ "predicted_wins": 60
537
+ },
538
+ "Retail & E-commerce|Internal & Navigation": {
539
+ "accuracy": 0.636,
540
+ "count": 154,
541
+ "training_data_count": 1386,
542
+ "correct_predictions": 98,
543
+ "actual_wins": 67,
544
+ "predicted_wins": 59
545
+ },
546
+ "Retail & E-commerce|Post-Conversion & Other": {
547
+ "accuracy": 1.0,
548
+ "count": 5,
549
+ "training_data_count": 45,
550
+ "correct_predictions": 5,
551
+ "actual_wins": 2,
552
+ "predicted_wins": 2
553
+ }
554
+ }