Python code for commonly used Machine Learning algorithms The perceptron.py file contains the code for a single layer perceptron. Synthetic data is generated. It is ensured that the two classes are linearly separable. The perceptron.py file containts the Perceptron class the learning occurs. The training data.py file contains the data generation part and testing of the test data.