Giter Site home page Giter Site logo

ekoziol / machine-learning-course Goto Github PK

View Code? Open in Web Editor NEW

This project forked from faridcher/ml-course

0.0 1.0 0.0 19.84 MB

:white_check_mark: The R code for the assignments of Coursera machine learning course

Home Page: https://www.coursera.org/learn/machine-learning

R 100.00%

machine-learning-course's Introduction

Introduction

This is the R version assignments of the popular online machine learning course on Coursera website.

To download lecture videos visit the course website:

This repo provides the starter code to solve the assignment in R statistical software; the completed assignments are available in the Solutions folder.

Do these steps to complete the assignments:

  1. View the lectures
  2. Read the instructions (pdf)
  3. Use the Starter folder and fill the parts of the code that is written "YOUR CODE HERE"
  4. If you couldn't solve yourself, get help from the Solutions folder
  5. Submit

Dependencies

In order to produce similar results and plots to Octave/Matlab, you should install a few packages:

  • rgl package is used to produce the 3D scatter plots and surface plots in the exercises.

  • SnowballC: portStemmer function in this package has the same role of the portStemmer.m.

  • raster package is used to produce the plot of the bird in exercise 7.

  • jsonlite and httr packages are needed for submission.

  • pinv.R: The ginv function, generalized inverse, in MASS package doesn't produce the same exact result of the Matlab pinv (pseudo-inverse). pinv.R is the modified version of MASS ginv to produce the same effect of the MATLAB pinv. For more info see the stackoverflow discussion

  • lbfgsb3_.R: Certain optimization tasks could only be solved using lbfgsb3 package, yet there are a few bugs in this package. The purpose of lbfgsb3_.R is to address these bugs; it is used for exercises 4 and 8. Beware that fmincg/fminunc optimization functions in Matlab takes one function as input and computes cost and gradient simultaneously. However, cost and gradient functions MUST be supplied into optim or lbfgsb3 functions individually.

Before starting to code, install the following packages: install.packages(c('rgl','lbfgsb3','SnowballC','raster','jsonlite', 'httr'))

Note that you don't have to do anything with what is mentioned above, just be informed.

Submission

After completing each assignment, source the submit.r and type submit() in the R console.

I submitted the solutions to Coursera for testing and the scores were 100%. Please report any problem with submission.

Topics covered in the course and assignments

  1. Linear regression, cost function and normalization
  2. Gradient descent and advanced optimization
  3. Multiple linear regression and normal equation
  4. Logistic regression, decision boundary and multi-class classification
  5. Over-fitting and Regularization
  6. Neural Network non-linear classification
  7. Model validation, diagnosis and learning curves
  8. System design, prioritizing and error analysis
  9. Support vector machine (SVM), large margin classification and SVM kernels (linear and Gaussian)
  10. K-Means clustering
  11. Principal component analysis (PCA)
  12. Anomaly detection, supervised learning
  13. Recommender systems, Collaborative filtering
  14. Large scale machine learning, stochastic and mini-batch gradient descent, on-line learning, map reduce

Screen-shots

A few screen-shots of the plots produced in R:

Anomaly Detection Gradient Descent Convergence K-Means Clustering K-Means Raster Compress ![Learning Curves](http://faridcher.github.io/uploads/ml-course/Snapshots/Learning Curve.png) PCA Face Dataset SVM RBF Kernel Multiple Regression PCA Pixel Dataset Centroids

machine-learning-course's People

Contributors

faridcher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.