It's my python practice for the machine learning. In my code, you have to prepare the matplotlib, numpy toolkit first.
There are two main codes.
'Main_randomSample_Classifier_Dimension.py' It's the example code for the classifier (Gaussian Classifier/QDC) and the dimension reduction approaches(PCA, LDA/DAFE) The data were randomly generated by the normal distribution.
The implement result is shown as follows: In dimension reduction, it is easy to understand that the supervised approach (LDA) is better than unsupervised approach (PCA) visually.
'main_regression.py' It's an example code for the regression case. RegressionExample.txt is the example data. The first column is the dependent variable, and second-fourth columns are the independent variables. I just apply the Linear regression and ridge regression. The result is shown as follows: x-axis depicts the ground truth, and y-axis depicts the prediction result.
Sklearn is a powerful toolkit for machine learning. I will demo how to use it in the future. http://scikit-learn.org/stable/