xpectra.ssl
Semi-supervised learning: do the 4,058 unlabeled weathered spectra help?
Functions
|
LabelSpreading with a sparse kNN kernel on PCA-reduced features. |
|
|
|
Per LOSO fold: supervised-only vs self-training vs label-spreading, all evaluated on the held-out study. |
- xpectra.ssl.self_train(estimator, X_lab, y_lab, X_unlab, threshold=0.9, max_iter=3)[source]
- Parameters:
- Return type:
- xpectra.ssl.label_spread(X_lab, y_lab, X_unlab, n_neighbors=10, pca_components=50, random_state=42)[source]
LabelSpreading with a sparse kNN kernel on PCA-reduced features.
Returns the fitted spreader plus the scaler+PCA embedding used, so test data can be transformed into the same space for inductive prediction.