xpectra.TrustConfig

class xpectra.TrustConfig(routes: 'tuple[str, ...]'=('norm', 'deriv1', 'deriv2'), model_names: 'tuple[str, ...]'=('Logistic Regression', 'SVM (RBF)', 'Random Forest (200)', 'XGBoost (100)', 'MLP (128, 64)'), calibration_methods: 'tuple[str, ...]'=('none', 'sigmoid', 'isotonic', 'temperature'), cv_folds: 'int' = 5, test_size: 'float' = 0.2, ece_bins: 'int' = 15, dedupe_spectra: 'bool' = True, pca_components_ood: 'int' = 20, knn_k: 'int' = 5, target_coverage: 'float' = 0.9, pca_components_ssl: 'int' = 50, self_train_threshold: 'float' = 0.9, self_train_max_iter: 'int' = 3, label_spread_neighbors: 'int' = 10, carbonyl_band: 'tuple[float, float]'=(1650.0, 1800.0), reference_band: 'tuple[float, float]'=(1420.0, 1470.0), random_state: 'int' = 42, processed_dir: 'Path' = <factory>, results_dir: 'Path' = <factory>, figures_dir: 'Path' = <factory>, cache_dir: 'Path' = <factory>)[source]

Bases: object

Parameters:
__init__(routes=('norm', 'deriv1', 'deriv2'), model_names=('Logistic Regression', 'SVM (RBF)', 'Random Forest (200)', 'XGBoost (100)', 'MLP (128, 64)'), calibration_methods=('none', 'sigmoid', 'isotonic', 'temperature'), cv_folds=5, test_size=0.2, ece_bins=15, dedupe_spectra=True, pca_components_ood=20, knn_k=5, target_coverage=0.9, pca_components_ssl=50, self_train_threshold=0.9, self_train_max_iter=3, label_spread_neighbors=10, carbonyl_band=(1650.0, 1800.0), reference_band=(1420.0, 1470.0), random_state=42, processed_dir=<factory>, results_dir=<factory>, figures_dir=<factory>, cache_dir=<factory>)
Parameters:
Return type:

None

Methods

__init__([routes, model_names, ...])

ensure_dirs()

Attributes

calibration_methods

carbonyl_band

cv_folds

dedupe_spectra

ece_bins

knn_k

label_spread_neighbors

model_names

pca_components_ood

pca_components_ssl

random_state

reference_band

routes

self_train_max_iter

self_train_threshold

target_coverage

test_size

processed_dir

results_dir

figures_dir

cache_dir

routes: tuple[str, ...] = ('norm', 'deriv1', 'deriv2')
model_names: tuple[str, ...] = ('Logistic Regression', 'SVM (RBF)', 'Random Forest (200)', 'XGBoost (100)', 'MLP (128,64)')
calibration_methods: tuple[str, ...] = ('none', 'sigmoid', 'isotonic', 'temperature')
cv_folds: int = 5
test_size: float = 0.2
ece_bins: int = 15
dedupe_spectra: bool = True
pca_components_ood: int = 20
knn_k: int = 5
target_coverage: float = 0.9
pca_components_ssl: int = 50
self_train_threshold: float = 0.9
self_train_max_iter: int = 3
label_spread_neighbors: int = 10
carbonyl_band: tuple[float, float] = (1650.0, 1800.0)
reference_band: tuple[float, float] = (1420.0, 1470.0)
random_state: int = 42
processed_dir: Path
results_dir: Path
figures_dir: Path
cache_dir: Path
ensure_dirs()[source]
Return type:

None