← Back to all experiments
Semi-Supervised LearningIntermediateKNNLabel Propagation
Semi-Supervised KNN Labeling
Labels unlabeled data using KNN and compares accuracy across k values.
Key highlights
- Generates synthetic labeled/unlabeled split
- Evaluates multiple k values
- Captures accuracy trends
Metrics
Accuracy per k
Outputs

Distribution of synthetic values
Code snapshot
Key lines that anchor the experiment workflow.
knn = KNeighborsClassifier(n_neighbors=k)
knn.fit(X_train, y_train)
accuracy = accuracy_score(true_labels, predictions)Next steps
Want to explore further? Try the full gallery or open the raw script to tweak parameters.