"""
Overflow named constants for the wisent package (part 2).
Imported by constants.py via star-import so all constants remain
accessible from wisent.core.constants.
"""

# --- Recommendation extended thresholds ---
RECOMMEND_MULTI_CONCEPT_SILHOUETTE = 0.3
RECOMMEND_ALIGNMENT_HIGH = 0.3
RECOMMEND_ALIGNMENT_LOW = 0.1
RECOMMEND_VARIANCE_CONCENTRATED = 0.15
RECOMMEND_EFFECTIVE_DIMS_LOW = 20.0
RECOMMEND_MULTI_DIR_GAIN_HIGH = 0.05
RECOMMEND_COHERENCE_HIGH = 0.8
RECOMMEND_COHERENCE_LOW = 0.5
RECOMMEND_ICD_TOP5_THRESHOLD = 0.4
RECOMMEND_NOT_VIABLE_SCALE = 0.5
RECOMMEND_CONFIDENCE_BASE = 0.5

# --- Vector quality thresholds ---
VQ_CONVERGENCE_CRITICAL = 0.5
VQ_CONVERGENCE_WARNING = 0.75
VQ_CV_SCORE_CRITICAL = 0.3
VQ_CV_SCORE_WARNING = 0.6
VQ_SNR_CRITICAL = 10.0
VQ_SNR_WARNING = 30.0
VQ_PCA_VARIANCE_CRITICAL = 0.05
VQ_PCA_VARIANCE_WARNING = 0.15
VQ_ALIGNMENT_STD_WARNING = 0.30
VQ_ALIGNMENT_MIN_CRITICAL = 0.2
VQ_SILHOUETTE_CRITICAL = -0.1
VQ_SILHOUETTE_WARNING = 0.05
VQ_MIN_PAIRS = 5

# --- Geometry diagnostics thresholds ---
GEO_DIAG_LINEAR_VARIANCE = 0.85
GEO_DIAG_CONE_THRESHOLD = 0.65
GEO_DIAG_CLUSTER_SILHOUETTE = 0.55
GEO_DIAG_MANIFOLD_THRESHOLD = 0.70
GEO_DIAG_SPARSE_THRESHOLD = 0.1
GEO_DIAG_BIMODAL_DIP = 0.05
GEO_DIAG_ORTHOGONAL_THRESHOLD = 0.12

# --- Linearity analysis ---
LINEARITY_MAX_PAIRS = 1000
LINEARITY_PCA_COMPONENTS = 50
LINEARITY_HIDDEN_DIM_LARGE = 64
LINEARITY_HIDDEN_DIM_SMALL = 32
LINEARITY_N_CLUSTERS = 3
LINEARITY_NONLINEAR_ERROR = 0.3
LINEARITY_N_INIT = 10
LINEARITY_N_BOOTSTRAP = 100
LINEARITY_MLP_MAX_ITER = 50
LINEARITY_MIN_GAPS = 10
LINEARITY_DEGREE = 2
LINEARITY_N_FEATURES = 50
LINEARITY_REG_C = 0.1
LINEARITY_RIDGE_ALPHA = 1.0
LINEARITY_BOOTSTRAP_ITER = 50
LINEARITY_Z_SCORE_THRESHOLD = 2.0

# --- Stability analysis ---
STABILITY_N_BOOTSTRAP = 50
STABILITY_THRESHOLD_HIGH = 0.9
STABILITY_N_SUBSAMPLES = 20
STABILITY_SUBSAMPLE_RATIO = 0.8
STABILITY_THRESHOLD_MED = 0.7
STABILITY_Z_MARGIN = 1.96
STABILITY_MIN_SAMPLES_LARGE = 100
STABILITY_MIN_SAMPLES_MED = 50
STABILITY_MIN_SAMPLES_SMALL = 30
STABILITY_N_CLUSTERS = 2

# --- Search results defaults ---
SEARCH_RESULTS_TOP_N = 10
GEO_DEFAULT_DIRECTION_ANGLE = 90.0

# --- Zwiad protocol ---
ZWIAD_PRZELOM_BONUS_MAX = 1.5
ZWIAD_MIN_SILHOUETTE = 0.1

# --- Detection / config manager ---
DETECTION_THRESHOLD = 0.6
CONFIG_MAX_ALPHA = 2.0

# --- Scoring weights (ScoreWeights) ---
SCORE_WEIGHT_DEFAULT = 0.0

# --- Zwiad centroids range/weight parameters ---
ZWIAD_RANGE_SPECTRAL_MIN = 0.3
ZWIAD_RANGE_SURVIVAL_MIN = 0.5
ZWIAD_RANGE_DIM_MIN = 1
ZWIAD_RANGE_DIM_MAX = 100
ZWIAD_RANGE_CONC_MAX = 0.9
ZWIAD_RANGE_SHARP_MAX = 0.9
ZWIAD_WEIGHT_SPECTRAL = 3.0
ZWIAD_WEIGHT_SURVIVAL = 1.5
ZWIAD_WEIGHT_DIM = 1.0
ZWIAD_WEIGHT_CONC = 2.0
ZWIAD_WEIGHT_SHARP = 2.0
ZWIAD_WEIGHT_EDITABILITY = 1.5
ZWIAD_PER_TYPE_DEFAULT = 2

# --- EOT editability ---
EOT_DEFAULT_TEMPERATURE = 1.0
EOT_SURVIVAL_WEIGHT = 0.50
EOT_SPECTRAL_WEIGHT = 0.25
EOT_PERTURBATION_SCALE = 0.01

# --- Zwiad intervention scores ---
ZWIAD_SCORE_PRIMARY = 2.0
ZWIAD_SCORE_SECONDARY = 1.5
ZWIAD_SCORE_TERTIARY = 1.0
ZWIAD_EDITABILITY_THRESHOLD = 0.6

# --- Zwiad adaptive thresholds ---
ZWIAD_GAP_K = 0.5
ZWIAD_GAP_MIN = 0.02
ZWIAD_GAP_MAX = 0.1
ZWIAD_SIL_BASE = 0.05
ZWIAD_SIL_SLOPE = 0.1
ZWIAD_SIL_SCALE_SAMPLES = 500
ZWIAD_SIL_MAX = 0.2

# --- Probe metrics ---
PROBE_MIN_PER_CLASS = 5
PROBE_SMALL_HIDDEN = 16
PROBE_MLP_HIDDEN = 64
PROBE_MLP_ALPHA = 0.01
PROBE_VALIDATION_FRACTION = 0.1

# --- Auto optimization ---
AUTO_MAX_TIME_MINUTES = 60.0
AUTO_MIN_PAIRS = 10
AUTO_SAMPLE_SIZE = 50
AUTO_LAYER_FRACTION = 0.75
AUTO_N_FOLDS = 3
AUTO_DEFAULT_STRENGTHS = (0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0)

# --- Search results deserialization defaults ---
MULTI_DIR_MIN_K_NOT_FOUND = -1
MULTI_DIR_SATURATION_K_DEFAULT = 1

# --- Signal analysis ---
SIGNAL_NULL_MEAN = 0.5
SIGNAL_NULL_STD = 0.1
SIGNAL_SATURATION_DELTA = 0.02
SIGNAL_POWER_SAMPLE_SIZES = (10, 20, 50, 100, 200, 500)
BOOTSTRAP_CI_LOW_DEFAULT = 0.4
BOOTSTRAP_CI_HIGH_DEFAULT = 0.6
SIGNAL_ICD_THRESHOLD = 20

# --- Effectiveness thresholds ---
EFFECTIVENESS_HIGH = 0.1
EFFECTIVENESS_MODERATE = 0.05
EFFECTIVENESS_SLIGHT = 0.01

# --- Cache ---
KEEP_RECENT_HOURS_DEFAULT = 24.0

# --- Classifier optimizer defaults ---
CLASSIFIER_LAYER_RANGE_END = 23

# --- Signal detection (paper methodology) ---
SIGNAL_EXIST_THRESHOLD = 0.6
SIGNAL_LINEAR_GAP = 0.15
DENSITY_RATIO_DEFAULT = 1.0

# --- Dip test / direction consistency ---
DIP_TEST_SIMULATIONS = 1000
DIRECTION_N_SPLITS = 10

# --- Subspace analysis ---
SUBSPACE_MIN_VECTORS = 3
SUBSPACE_DECAY_NORMALIZE = 10.0
SUBSPACE_SPARSITY_THRESHOLD = 0.99
SUBSPACE_TOP_CONTRIB_THRESHOLD = 0.99
SUBSPACE_DEFAULT_QUALITY = 0.8
SUBSPACE_QUALITY_W_CONCENTRATION = 0.5
SUBSPACE_QUALITY_W_RANK = 0.3
SUBSPACE_QUALITY_W_DECAY = 0.2

# --- Behavioral validation confidence ---
BEHAVIORAL_CONF_IMPROPERLY = 0.5
BEHAVIORAL_CONF_UNEXPECTED = 0.3
BEHAVIORAL_CONF_INEFFECTIVE = 0.1

# --- Visualization ---
TSNE_N_ITER = 1000
VIZ_DPI = 150

# --- Abliteration defaults ---
ABLITERATION_MAX_WEIGHT_POS = 8.0
ABLITERATION_MIN_WEIGHT_DIST = 6.0
ABLITERATION_EVAL_LIMIT = 500
