Model Pipeline - Semi-supervised learning basics
Semi-supervised learning uses a small amount of labeled data and a large amount of unlabeled data to train a model. It helps the model learn better when labeling data is expensive or slow.
Jump into concepts and practice - no test required
Semi-supervised learning uses a small amount of labeled data and a large amount of unlabeled data to train a model. It helps the model learn better when labeling data is expensive or slow.
Loss
0.9 |****
0.7 |***
0.5 |**
0.3 |*
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.85 | 0.55 | Model starts learning from labeled and pseudo-labeled data |
| 2 | 0.65 | 0.68 | Loss decreases as model improves predictions |
| 3 | 0.50 | 0.75 | Accuracy improves steadily |
| 4 | 0.40 | 0.80 | Model benefits from unlabeled data guidance |
| 5 | 0.35 | 0.85 | Training converges with good accuracy |
semi-supervised learning in machine learning?from sklearn.semi_supervised import LabelSpreading import numpy as np X = np.array([[1], [2], [3], [4], [5]]) y = np.array([0, 1, -1, -1, -1]) # -1 means unlabeled model = LabelSpreading() model.fit(X, y) preds = model.transduction_ print(preds)What will be the output printed by
print(preds)?from sklearn.semi_supervised import SelfTrainingClassifier from sklearn.svm import SVC X = [[1], [2], [3], [4]] y = [0, 1, -1, -1] base_model = SVC() model = SelfTrainingClassifier(base_model) model.fit(X, y)What is the error in this code?