Starting from:

$30

INF552-Homework 4 Solved

Part 1: Implementation  
 

 Implement the Perceptron Learning algorithm. Run it on the data file "classification.txt" ignoring the 5th column. That is, consider only the first 4 columns in each row. The first 3 columns are the coordinates of a point; and the 4th column is its classification label +1 or -1. Report your results (weights and accuracy after the final iteration).

 

Implement the Pocket algorithm and run it on the data file "classification.txt" ignoring the 4th column. That is, consider only the first 3 columns and the 5th column in each row. The first 3 columns are the coordinates of a point; and the 5th column is its classification label +1 or -1. Plot the number of misclassified points against the number of iterations of the algorithm. Run up to 7000 iterations. Also, report your results (weights and accuracy after the final iteration).

 

Implement Logistic Regression and run it on the points in the data file "classification.txt" ignoring the 4th column. That is, consider only the first 3 columns and the 5th column in each row. The first 3 columns are the coordinates of a point; and the 5th column is its classification label +1 or -1. Use the sigmoid function Ɵ(s) = es/(1+es).  Run up to 7000 iterations. Report your results (weights and accuracy after the final iteration).

 

Implement Linear Regression and run it on the points in the data file "linear-regression.txt". The first 2 columns in each row represent the independent X and Y variables; and the 3rd column represents the dependent Z variable. Report your results (weights after the final iteration).

 

You can write your programs in any programming language. However, you will have to implement the algorithms yourself instead of using high-level library functions, except for solving a system of linear equations. Please provide a description of the data structures you use, any code-level optimizations you perform, any challenges you face, and of course, the requested outputs.

 

 

Part 2: Software Familiarization  
 

Do your own research and find out about library functions that offer good implementations of linear classification, linear regression, and logistic regression. Learn how to use them. Compare them against your implementations and suggest some ideas for how you can improve your code. Describe all this in your report.

 

 

Part 3: Applications  
 

Do your own research and describe some interesting applications of linear classification, linear regression, and logistic regression

More products