"""Registry data for Group E (detection/classification thresholds).

Each entry is a dict matching the ConstantMeta constructor signature.
Group D ML hyperparameters are in registry_data.py.
"""

from wisent.core.constants import (
    NLI_MARGIN, NLI_ENT_MIN, EMB_DELTA_MIN, EMB_MATCH_MIN,
    TRUTHFUL_MIN_SIMILARITY, TRUTHFUL_MIN_MARGIN,
    RECOMMEND_LINEAR_PROBE_HIGH, RECOMMEND_LINEAR_PROBE_LOW,
    RECOMMEND_NONLINEARITY_GAP, RECOMMEND_ICD_HIGH, RECOMMEND_ICD_LOW,
    RECOMMEND_STABILITY_HIGH, RECOMMEND_STABILITY_LOW,
    RECOMMEND_MULTI_CONCEPT_SILHOUETTE, RECOMMEND_ALIGNMENT_HIGH,
    RECOMMEND_ALIGNMENT_LOW, RECOMMEND_VARIANCE_CONCENTRATED,
    RECOMMEND_MULTI_DIR_GAIN_HIGH, RECOMMEND_COHERENCE_HIGH,
    RECOMMEND_COHERENCE_LOW, RECOMMEND_ICD_TOP5_THRESHOLD,
    RECOMMEND_NOT_VIABLE_SCALE, RECOMMEND_CONFIDENCE_BASE,
    SIMILARITY_THRESHOLD, QUALITY_THRESHOLD,
    DIAG_MIN_DIVERGENCE, DIAG_MAX_LOW_DIV_FRACTION,
    DIAG_NEAR_DUPLICATE_THRESHOLD, BLEU_THRESHOLD, CLASSIFIER_THRESHOLD,
    VQ_CONVERGENCE_CRITICAL, VQ_CONVERGENCE_WARNING,
    VQ_CV_SCORE_CRITICAL, VQ_CV_SCORE_WARNING,
    VQ_ALIGNMENT_STD_WARNING, VQ_ALIGNMENT_MIN_CRITICAL,
    VQ_SILHOUETTE_CRITICAL, VQ_SILHOUETTE_WARNING,
    GEO_DIAG_LINEAR_VARIANCE, GEO_DIAG_CONE_THRESHOLD,
    GEO_DIAG_CLUSTER_SILHOUETTE, GEO_DIAG_MANIFOLD_THRESHOLD,
    GEO_DIAG_SPARSE_THRESHOLD, GEO_DIAG_BIMODAL_DIP,
    GEO_DIAG_ORTHOGONAL_THRESHOLD,
    CONE_THRESHOLD, MOVEMENT_THRESHOLD, BEHAVIOR_THRESHOLD,
    CONTINUAL_FORGETTING_THRESHOLD, DETECTION_THRESHOLD,
    SIGNAL_EXIST_THRESHOLD, SIGNAL_LINEAR_GAP,
    EFFECTIVENESS_HIGH, EFFECTIVENESS_MODERATE, EFFECTIVENESS_SLIGHT,
    ZWIAD_EDITABILITY_THRESHOLD, ZWIAD_MIN_SILHOUETTE,
    ZWIAD_GAP_K, ZWIAD_GAP_MIN, ZWIAD_GAP_MAX,
    ZWIAD_SIL_BASE, ZWIAD_SIL_SLOPE, ZWIAD_SIL_MAX,
    BEHAVIORAL_CONF_IMPROPERLY, BEHAVIORAL_CONF_UNEXPECTED,
    BEHAVIORAL_CONF_INEFFECTIVE,
)

_E = "E"
_F = "float"

GROUP_E_ENTRIES = [
    dict(name="NLI_MARGIN", group=_E, current_value=NLI_MARGIN,
         dtype=_F, low=0.01, high=0.5, log_scale=False, method="evaluator",
         description="Minimum margin for NLI entailment vs contradiction"),
    dict(name="NLI_ENT_MIN", group=_E, current_value=NLI_ENT_MIN,
         dtype=_F, low=0.1, high=0.8, log_scale=False, method="evaluator",
         description="Minimum entailment score for NLI evaluator"),
    dict(name="EMB_DELTA_MIN", group=_E, current_value=EMB_DELTA_MIN,
         dtype=_F, low=0.01, high=0.2, log_scale=False, method="evaluator",
         description="Minimum embedding delta for significant change"),
    dict(name="EMB_MATCH_MIN", group=_E, current_value=EMB_MATCH_MIN,
         dtype=_F, low=0.1, high=0.8, log_scale=False, method="evaluator",
         description="Minimum embedding match score"),
    dict(name="TRUTHFUL_MIN_SIMILARITY", group=_E,
         current_value=TRUTHFUL_MIN_SIMILARITY,
         dtype=_F, low=0.05, high=0.7, log_scale=False, method="evaluator",
         description="Minimum similarity for truthfulness evaluation"),
    dict(name="TRUTHFUL_MIN_MARGIN", group=_E, current_value=TRUTHFUL_MIN_MARGIN,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="evaluator",
         description="Minimum margin for truthfulness scoring"),
    dict(name="RECOMMEND_LINEAR_PROBE_HIGH", group=_E,
         current_value=RECOMMEND_LINEAR_PROBE_HIGH,
         dtype=_F, low=0.6, high=0.98, log_scale=False, method="recommendation",
         description="High linear probe accuracy threshold"),
    dict(name="RECOMMEND_LINEAR_PROBE_LOW", group=_E,
         current_value=RECOMMEND_LINEAR_PROBE_LOW,
         dtype=_F, low=0.4, high=0.8, log_scale=False, method="recommendation",
         description="Low linear probe accuracy threshold"),
    dict(name="RECOMMEND_NONLINEARITY_GAP", group=_E,
         current_value=RECOMMEND_NONLINEARITY_GAP,
         dtype=_F, low=0.01, high=0.2, log_scale=False, method="recommendation",
         description="Gap threshold for detecting nonlinearity"),
    dict(name="RECOMMEND_ICD_HIGH", group=_E, current_value=RECOMMEND_ICD_HIGH,
         dtype=_F, low=0.3, high=0.95, log_scale=False, method="recommendation",
         description="High ICD threshold for method recommendation"),
    dict(name="RECOMMEND_ICD_LOW", group=_E, current_value=RECOMMEND_ICD_LOW,
         dtype=_F, low=0.1, high=0.6, log_scale=False, method="recommendation",
         description="Low ICD threshold for method recommendation"),
    dict(name="RECOMMEND_STABILITY_HIGH", group=_E,
         current_value=RECOMMEND_STABILITY_HIGH,
         dtype=_F, low=0.5, high=0.98, log_scale=False, method="recommendation",
         description="High stability threshold for recommendation"),
    dict(name="RECOMMEND_STABILITY_LOW", group=_E,
         current_value=RECOMMEND_STABILITY_LOW,
         dtype=_F, low=0.2, high=0.7, log_scale=False, method="recommendation",
         description="Low stability threshold for recommendation"),
    dict(name="RECOMMEND_MULTI_CONCEPT_SILHOUETTE", group=_E,
         current_value=RECOMMEND_MULTI_CONCEPT_SILHOUETTE,
         dtype=_F, low=0.05, high=0.7, log_scale=False, method="recommendation",
         description="Silhouette threshold for multi-concept detection"),
    dict(name="RECOMMEND_ALIGNMENT_HIGH", group=_E,
         current_value=RECOMMEND_ALIGNMENT_HIGH,
         dtype=_F, low=0.1, high=0.7, log_scale=False, method="recommendation",
         description="High alignment threshold for recommendation"),
    dict(name="RECOMMEND_ALIGNMENT_LOW", group=_E,
         current_value=RECOMMEND_ALIGNMENT_LOW,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="recommendation",
         description="Low alignment threshold for recommendation"),
    dict(name="RECOMMEND_VARIANCE_CONCENTRATED", group=_E,
         current_value=RECOMMEND_VARIANCE_CONCENTRATED,
         dtype=_F, low=0.05, high=0.5, log_scale=False, method="recommendation",
         description="Variance concentration threshold for recommendation"),
    dict(name="RECOMMEND_MULTI_DIR_GAIN_HIGH", group=_E,
         current_value=RECOMMEND_MULTI_DIR_GAIN_HIGH,
         dtype=_F, low=0.01, high=0.2, log_scale=False, method="recommendation",
         description="Multi-direction gain threshold"),
    dict(name="RECOMMEND_COHERENCE_HIGH", group=_E,
         current_value=RECOMMEND_COHERENCE_HIGH,
         dtype=_F, low=0.5, high=0.98, log_scale=False, method="recommendation",
         description="High coherence threshold for recommendation"),
    dict(name="RECOMMEND_COHERENCE_LOW", group=_E,
         current_value=RECOMMEND_COHERENCE_LOW,
         dtype=_F, low=0.2, high=0.7, log_scale=False, method="recommendation",
         description="Low coherence threshold for recommendation"),
    dict(name="RECOMMEND_ICD_TOP5_THRESHOLD", group=_E,
         current_value=RECOMMEND_ICD_TOP5_THRESHOLD,
         dtype=_F, low=0.1, high=0.7, log_scale=False, method="recommendation",
         description="Top-5 ICD threshold for recommendation"),
    dict(name="RECOMMEND_NOT_VIABLE_SCALE", group=_E,
         current_value=RECOMMEND_NOT_VIABLE_SCALE,
         dtype=_F, low=0.1, high=0.9, log_scale=False, method="recommendation",
         description="Scale factor for not-viable method scoring"),
    dict(name="RECOMMEND_CONFIDENCE_BASE", group=_E,
         current_value=RECOMMEND_CONFIDENCE_BASE,
         dtype=_F, low=0.2, high=0.8, log_scale=False, method="recommendation",
         description="Base confidence for method recommendation"),
    dict(name="SIMILARITY_THRESHOLD", group=_E, current_value=SIMILARITY_THRESHOLD,
         dtype=_F, low=0.5, high=0.98, log_scale=False, method="diagnostics",
         description="General similarity threshold for pair quality"),
    dict(name="QUALITY_THRESHOLD", group=_E, current_value=QUALITY_THRESHOLD,
         dtype=_F, low=10.0, high=90.0, log_scale=False, method="diagnostics",
         description="Minimum quality score for accepting steering results"),
    dict(name="DIAG_MIN_DIVERGENCE", group=_E, current_value=DIAG_MIN_DIVERGENCE,
         dtype=_F, low=0.05, high=0.7, log_scale=False, method="diagnostics",
         description="Minimum divergence between positive and negative pairs"),
    dict(name="DIAG_MAX_LOW_DIV_FRACTION", group=_E,
         current_value=DIAG_MAX_LOW_DIV_FRACTION,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="diagnostics",
         description="Max fraction of pairs with low divergence"),
    dict(name="DIAG_NEAR_DUPLICATE_THRESHOLD", group=_E,
         current_value=DIAG_NEAR_DUPLICATE_THRESHOLD,
         dtype=_F, low=0.8, high=0.99, log_scale=False, method="diagnostics",
         description="Threshold for near-duplicate pair detection"),
    dict(name="BLEU_THRESHOLD", group=_E, current_value=BLEU_THRESHOLD,
         dtype=_F, low=0.1, high=0.9, log_scale=False, method="evaluator",
         description="BLEU score threshold for generation quality"),
    dict(name="CLASSIFIER_THRESHOLD", group=_E, current_value=CLASSIFIER_THRESHOLD,
         dtype=_F, low=0.3, high=0.8, log_scale=False, method="classifier",
         description="Decision threshold for binary classifier"),
    dict(name="VQ_CONVERGENCE_CRITICAL", group=_E,
         current_value=VQ_CONVERGENCE_CRITICAL,
         dtype=_F, low=0.2, high=0.8, log_scale=False, method="vector_quality",
         description="Critical convergence threshold for vector quality"),
    dict(name="VQ_CONVERGENCE_WARNING", group=_E,
         current_value=VQ_CONVERGENCE_WARNING,
         dtype=_F, low=0.5, high=0.9, log_scale=False, method="vector_quality",
         description="Warning convergence threshold for vector quality"),
    dict(name="VQ_CV_SCORE_CRITICAL", group=_E, current_value=VQ_CV_SCORE_CRITICAL,
         dtype=_F, low=0.1, high=0.5, log_scale=False, method="vector_quality",
         description="Critical cross-validation score threshold"),
    dict(name="VQ_CV_SCORE_WARNING", group=_E, current_value=VQ_CV_SCORE_WARNING,
         dtype=_F, low=0.3, high=0.8, log_scale=False, method="vector_quality",
         description="Warning cross-validation score threshold"),
    dict(name="VQ_ALIGNMENT_STD_WARNING", group=_E,
         current_value=VQ_ALIGNMENT_STD_WARNING,
         dtype=_F, low=0.1, high=0.5, log_scale=False, method="vector_quality",
         description="Warning alignment standard deviation threshold"),
    dict(name="VQ_ALIGNMENT_MIN_CRITICAL", group=_E,
         current_value=VQ_ALIGNMENT_MIN_CRITICAL,
         dtype=_F, low=0.05, high=0.4, log_scale=False, method="vector_quality",
         description="Critical minimum alignment threshold"),
    dict(name="VQ_SILHOUETTE_CRITICAL", group=_E,
         current_value=VQ_SILHOUETTE_CRITICAL,
         dtype=_F, low=-0.5, high=0.1, log_scale=False, method="vector_quality",
         description="Critical silhouette score threshold"),
    dict(name="VQ_SILHOUETTE_WARNING", group=_E, current_value=VQ_SILHOUETTE_WARNING,
         dtype=_F, low=-0.1, high=0.3, log_scale=False, method="vector_quality",
         description="Warning silhouette score threshold"),
    dict(name="GEO_DIAG_LINEAR_VARIANCE", group=_E,
         current_value=GEO_DIAG_LINEAR_VARIANCE,
         dtype=_F, low=0.6, high=0.98, log_scale=False, method="geometry",
         description="Linear variance explained threshold for geometry"),
    dict(name="GEO_DIAG_CONE_THRESHOLD", group=_E,
         current_value=GEO_DIAG_CONE_THRESHOLD,
         dtype=_F, low=0.3, high=0.9, log_scale=False, method="geometry",
         description="Cone structure detection threshold"),
    dict(name="GEO_DIAG_CLUSTER_SILHOUETTE", group=_E,
         current_value=GEO_DIAG_CLUSTER_SILHOUETTE,
         dtype=_F, low=0.2, high=0.8, log_scale=False, method="geometry",
         description="Cluster silhouette threshold for geometry"),
    dict(name="GEO_DIAG_MANIFOLD_THRESHOLD", group=_E,
         current_value=GEO_DIAG_MANIFOLD_THRESHOLD,
         dtype=_F, low=0.4, high=0.95, log_scale=False, method="geometry",
         description="Manifold detection threshold"),
    dict(name="GEO_DIAG_SPARSE_THRESHOLD", group=_E,
         current_value=GEO_DIAG_SPARSE_THRESHOLD,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="geometry",
         description="Sparse representation threshold"),
    dict(name="GEO_DIAG_BIMODAL_DIP", group=_E, current_value=GEO_DIAG_BIMODAL_DIP,
         dtype=_F, low=0.01, high=0.15, log_scale=False, method="geometry",
         description="Dip test threshold for bimodality detection"),
    dict(name="GEO_DIAG_ORTHOGONAL_THRESHOLD", group=_E,
         current_value=GEO_DIAG_ORTHOGONAL_THRESHOLD,
         dtype=_F, low=0.03, high=0.3, log_scale=False, method="geometry",
         description="Orthogonality detection threshold"),
    dict(name="CONE_THRESHOLD", group=_E, current_value=CONE_THRESHOLD,
         dtype=_F, low=0.3, high=0.95, log_scale=False, method="steering_analysis",
         description="Cone alignment threshold for steering geometry"),
    dict(name="MOVEMENT_THRESHOLD", group=_E, current_value=MOVEMENT_THRESHOLD,
         dtype=_F, low=0.2, high=0.9, log_scale=False, method="steering_analysis",
         description="Minimum activation movement for significance"),
    dict(name="BEHAVIOR_THRESHOLD", group=_E, current_value=BEHAVIOR_THRESHOLD,
         dtype=_F, low=-0.5, high=0.5, log_scale=False, method="steering_analysis",
         description="Minimum behavior change threshold"),
    dict(name="CONTINUAL_FORGETTING_THRESHOLD", group=_E,
         current_value=CONTINUAL_FORGETTING_THRESHOLD,
         dtype=_F, low=0.7, high=0.99, log_scale=False, method="continual",
         description="Score ratio below which forgetting is detected"),
    dict(name="DETECTION_THRESHOLD", group=_E, current_value=DETECTION_THRESHOLD,
         dtype=_F, low=0.3, high=0.9, log_scale=False, method="detection",
         description="Threshold for steering detection"),
    dict(name="SIGNAL_EXIST_THRESHOLD", group=_E,
         current_value=SIGNAL_EXIST_THRESHOLD,
         dtype=_F, low=0.3, high=0.9, log_scale=False, method="signal",
         description="Threshold for signal existence detection"),
    dict(name="SIGNAL_LINEAR_GAP", group=_E, current_value=SIGNAL_LINEAR_GAP,
         dtype=_F, low=0.05, high=0.4, log_scale=False, method="signal",
         description="Gap threshold for linear signal detection"),
    dict(name="EFFECTIVENESS_HIGH", group=_E, current_value=EFFECTIVENESS_HIGH,
         dtype=_F, low=0.03, high=0.3, log_scale=False, method="effectiveness",
         description="High effectiveness score threshold"),
    dict(name="EFFECTIVENESS_MODERATE", group=_E,
         current_value=EFFECTIVENESS_MODERATE,
         dtype=_F, low=0.01, high=0.15, log_scale=False, method="effectiveness",
         description="Moderate effectiveness score threshold"),
    dict(name="EFFECTIVENESS_SLIGHT", group=_E, current_value=EFFECTIVENESS_SLIGHT,
         dtype=_F, low=0.001, high=0.05, log_scale=False, method="effectiveness",
         description="Slight effectiveness score threshold"),
    dict(name="ZWIAD_EDITABILITY_THRESHOLD", group=_E,
         current_value=ZWIAD_EDITABILITY_THRESHOLD,
         dtype=_F, low=0.3, high=0.9, log_scale=False, method="zwiad",
         description="Minimum editability score for zwiad recommendation"),
    dict(name="ZWIAD_MIN_SILHOUETTE", group=_E, current_value=ZWIAD_MIN_SILHOUETTE,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="zwiad",
         description="Minimum silhouette for valid concept decomposition"),
    dict(name="ZWIAD_GAP_K", group=_E, current_value=ZWIAD_GAP_K,
         dtype=_F, low=0.1, high=1.0, log_scale=False, method="zwiad",
         description="Gap scaling factor for adaptive thresholds"),
    dict(name="ZWIAD_GAP_MIN", group=_E, current_value=ZWIAD_GAP_MIN,
         dtype=_F, low=0.005, high=0.1, log_scale=False, method="zwiad",
         description="Minimum gap for adaptive threshold"),
    dict(name="ZWIAD_GAP_MAX", group=_E, current_value=ZWIAD_GAP_MAX,
         dtype=_F, low=0.03, high=0.3, log_scale=False, method="zwiad",
         description="Maximum gap for adaptive threshold"),
    dict(name="ZWIAD_SIL_BASE", group=_E, current_value=ZWIAD_SIL_BASE,
         dtype=_F, low=0.01, high=0.15, log_scale=False, method="zwiad",
         description="Base silhouette for adaptive threshold"),
    dict(name="ZWIAD_SIL_SLOPE", group=_E, current_value=ZWIAD_SIL_SLOPE,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="zwiad",
         description="Silhouette slope for sample-size scaling"),
    dict(name="ZWIAD_SIL_MAX", group=_E, current_value=ZWIAD_SIL_MAX,
         dtype=_F, low=0.05, high=0.5, log_scale=False, method="zwiad",
         description="Maximum silhouette for adaptive threshold"),
    dict(name="BEHAVIORAL_CONF_IMPROPERLY", group=_E,
         current_value=BEHAVIORAL_CONF_IMPROPERLY,
         dtype=_F, low=0.2, high=0.8, log_scale=False, method="behavioral",
         description="Confidence for improperly steered detection"),
    dict(name="BEHAVIORAL_CONF_UNEXPECTED", group=_E,
         current_value=BEHAVIORAL_CONF_UNEXPECTED,
         dtype=_F, low=0.1, high=0.6, log_scale=False, method="behavioral",
         description="Confidence for unexpected behavior detection"),
    dict(name="BEHAVIORAL_CONF_INEFFECTIVE", group=_E,
         current_value=BEHAVIORAL_CONF_INEFFECTIVE,
         dtype=_F, low=0.01, high=0.3, log_scale=False, method="behavioral",
         description="Confidence for ineffective steering detection"),
]
