xpectra.label_spread

xpectra.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.

Parameters:
Return type:

tuple[LabelSpreading, Pipeline]