Skip to content

Commit cb21352

Browse files
committed
Incorporated Label Spreading algorithm onto notebook
1 parent b727fc3 commit cb21352

15 files changed

+3278
-2280
lines changed

‎Project - Semi Supervised Learning/CSI5155 Project - Co Training.ipynb‎

Lines changed: 51 additions & 39 deletions
Large diffs are not rendered by default.

‎Project - Semi Supervised Learning/CSI5155 Project - Label Spreading.ipynb‎

Lines changed: 928 additions & 0 deletions
Large diffs are not rendered by default.

‎Project - Semi Supervised Learning/CSI5155 Project - Self Training.ipynb‎

Lines changed: 14 additions & 8 deletions
Large diffs are not rendered by default.

‎Project - Semi Supervised Learning/CSI5155 Project - Semi Boost.ipynb‎

Lines changed: 34 additions & 17 deletions
Large diffs are not rendered by default.

‎Project - Semi Supervised Learning/CSI5155 Project - baseline.ipynb‎

Lines changed: 18 additions & 12 deletions
Large diffs are not rendered by default.

‎Project - Semi Supervised Learning/constants.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from scipy.stats import randint, uniform;
2+
13
# directories
24
ASM1_DIR = "Assignment 1 - Model Comparison";
35
ASM2_DIR = "Assignment 2 - Explainable AI";
@@ -16,6 +18,7 @@
1618
MODEL_COTRAIN_1_FILENAME = "mushrooms_model_Gradient_Boosting_cotrained_1.pkl";
1719
MODEL_COTRAIN_2_FILENAME = "mushrooms_model_Gradient_Boosting_cotrained_2.pkl";
1820
MODEL_SEMIBOOST_FILENAME = "mushrooms_model_SemiBoost.pkl";
21+
MODEL_LABELSPREAD_FILENAME = "mushrooms_model_LabelSpreading.pkl";
1922
MODEL_DIR = "model";
2023

2124
# data re-used
@@ -38,6 +41,7 @@
3841
Y_TRAIN_PSEUDO_FILENAME = "mushrooms_train-set_samples_pseudo.pkl";
3942
# co-training data
4043
CO_TRAINING_BEST_FEATURE_SPLIT_RESULTS_FILENAME = "mushrooms_cotraining_best_feature_split_results.pkl";
44+
#
4145
# columns file
4246
COLUMNS_FILENAME = "mushrooms_columns.pkl";
4347

@@ -52,4 +56,16 @@
5256
N_ESTIMATORS = 100;
5357
LEARNING_RATE = 0.1;
5458

59+
# label spreading parameters
60+
KERNEL = 'rbf';
61+
GAMMA = 20;
62+
MAX_ITER = 30;
63+
LABEL_SPREAD_PARAM_DIST = {
64+
'alpha': uniform(0.01, 0.99),
65+
'max_iter': randint(100, 1000)
66+
};
67+
# Label spreading pipeline
68+
VERBOSE = 2;
69+
N_ITER = 100;
70+
5571
RANDOM_STATE = 42;

0 commit comments

Comments
 (0)