Spaces:
Sleeping
Sleeping
Update
Browse files- app/core/engine.py +6 -6
app/core/engine.py
CHANGED
|
@@ -80,16 +80,16 @@ class DECI_Engine:
|
|
| 80 |
|
| 81 |
# === 2. SCORING POR SEÑAL ===
|
| 82 |
|
| 83 |
-
# === 2. SCORING POR SEÑAL CONTINUO (Vertex Hardened Layer) ===
|
| 84 |
|
| 85 |
-
# 2.1 Entropy Score: Curva Gaussiana suave centrada en 0.70 (
|
| 86 |
-
s_entropy = float(np.exp(-((entropy - 0.70) ** 2) / 0.12))
|
| 87 |
s_entropy = max(0.05, min(1.0, s_entropy))
|
| 88 |
|
| 89 |
-
# 2.2 CV Score: Proporcional y continuo
|
| 90 |
s_cv = float(np.clip(cv / 0.50, 0.1, 1.0))
|
| 91 |
|
| 92 |
-
# 2.3 Mean IKL Score: Penalización suave solo en los extremos
|
| 93 |
if 80 <= mean_ikl <= 350:
|
| 94 |
s_mean = 1.0
|
| 95 |
else:
|
|
@@ -101,7 +101,7 @@ class DECI_Engine:
|
|
| 101 |
# Si la cadena es corta y no hay errores, evaluamos neutral (0.75) en vez de tratarlo como bot
|
| 102 |
s_corrections = 0.75
|
| 103 |
else:
|
| 104 |
-
# En textos largos, la ausencia total de errores sí es
|
| 105 |
s_corrections = 0.1
|
| 106 |
else:
|
| 107 |
# Si hay correcciones, aplicamos el mapeo continuo con el bonus de ráfaga de DeepSeek
|
|
|
|
| 80 |
|
| 81 |
# === 2. SCORING POR SEÑAL ===
|
| 82 |
|
| 83 |
+
# === 2. SCORING POR SEÑAL CONTINUO (Vertex Hardened Layer - Fixed) ===
|
| 84 |
|
| 85 |
+
# 2.1 Entropy Score: Curva Gaussiana suave centrada en 0.70 (Sin paréntesis fantasmas)
|
| 86 |
+
s_entropy = float(np.exp(-((entropy - 0.70) ** 2) / 0.12))
|
| 87 |
s_entropy = max(0.05, min(1.0, s_entropy))
|
| 88 |
|
| 89 |
+
# 2.2 CV Score: Proporcional y continuo
|
| 90 |
s_cv = float(np.clip(cv / 0.50, 0.1, 1.0))
|
| 91 |
|
| 92 |
+
# 2.3 Mean IKL Score: Penalización suave solo en los extremos
|
| 93 |
if 80 <= mean_ikl <= 350:
|
| 94 |
s_mean = 1.0
|
| 95 |
else:
|
|
|
|
| 101 |
# Si la cadena es corta y no hay errores, evaluamos neutral (0.75) en vez de tratarlo como bot
|
| 102 |
s_corrections = 0.75
|
| 103 |
else:
|
| 104 |
+
# En textos largos, la ausencia total de errores sí es sospechosa (Bot / LLM)
|
| 105 |
s_corrections = 0.1
|
| 106 |
else:
|
| 107 |
# Si hay correcciones, aplicamos el mapeo continuo con el bonus de ráfaga de DeepSeek
|