This is the first homework of Machine Learning in the spring semester of 2023.
The code repository consists mainly of two tasks:
-
RPCL algorithm for K-means
please refer to
rpclk.py
andRPCLK4KM.py
python rpclk.py --k x --beta x
-
model selections for GMM clustering
please refer to
GMM.py
andmodel_selection.py
python GMM.py --n_components x --n_clusters x --n_samples x --cluster_std x --method x
The implementation mainly focuses on how to automatically get the best k.
To do the experiments, you can directly use the bash command:
bash experiment_rpclk.sh
bash experiment_gmm.sh