/CourseraML

Primary LanguageMATLAB

CourseraML

Solutions for programming assignments to Coursera Machine Learning course

Ex1 - Linear regression

Implementation of linear regression algorithm with one (required by course) and multiple variables. For full description of the problem, please refer to ex1.pdf file.

Features included in this implementation:

  • data plotting
  • gradient descent
  • cost function
  • feature normalization
  • normal equations

Ex2 - Logistic regression

Implementation of logistic regression and regularized logistic regression algorithms. For full description of the problem, please refer to ex2.pdf file.

Features included in this implementation:

  • data plotting
  • sigmoid function
  • cost and gradient functions for logistic regression
  • cost and gradient functions for regularized logistic regression

Ex3 - Multi-class Classification and Neural Networks

Implementation of one-vs-all logistic regression and neural networks that recognize hand-written digits. For full description of the problem, please refer to ex3.pdf file.

Features included in this implementation:

  • logistic regression cost function
  • one-vs-all multi-class classifier
  • prediction using a one-vs-all multi-class classifier
  • prediction using Neural Network

Ex4 - Neural Networks Learning

Implementation of the backpropagation algorithm for neural networks. It was applied to the task of hand-written digit recognition. For full description of the problem, please refer to ex4.pdf file.

Features included in this implementation:

  • sigmoid gradient
  • random weights initialization
  • NN cost function

Ex5 - Regularized Linear Regression and Bias v.s. Variance

Implementation of regularized linear regression and analysis of models with different bias-variance properties. For full description of the problem, please refer to ex5.pdf file.

Features included in this implementation:

  • regularized linear regression cost function
  • learning curve
  • mapping data into polynomial feature space
  • cross validation curve

Ex6 - Support Vector Machines

Implementation of spam classifier based on SVMs. For full description of the problem, please refer to ex6.pdf file.

Features included in this implementation:

  • Gaussian kernel for SVM
  • C and sigma parameters selection
  • email preprocessing
  • feature extraction from email

Ex7 - K-means Clustering and Principal Component Analysis

Implementation of K-means clustering algorithm and its usage for image compression. In the second part, principal component analysis is used to find a low-dimensional representation of face images. For full description of the problem, please refer to ex7.pdf file.

Features included in this implementation:

  • principal component analysis
  • projecting a data set into a lower dimensional space
  • recovering the original data from the projection
  • finding closest centroids (usedin K-means)
  • computing centroid means (used in K-means)
  • initialization for K-means centroids

Ex8 - Anomaly Detection and Recommender Systems

Implementation of the anomaly detection algorithm and applying it to detect failing servers on a network. In the second part, collaborative filtering is used to build a recommender system for movies. For full description of the problem, please refer to ex8.pdf file.

Features included in this implementation:

  • estimate the parameters of a Gaussian distribution with a diagonal covariance matrix
  • find a threshold for anomaly detection
  • cost function for collaborative filtering