Giter Site home page Giter Site logo

nsoojin / coursera-ml-py Goto Github PK

View Code? Open in Web Editor NEW
1.4K 45.0 480.0 22.46 MB

Python programming assignments for Machine Learning by Prof. Andrew Ng in Coursera

License: MIT License

Python 100.00%
andrew-ng-course andrew-ng-ml-course coursera-machine-learning andrew-ng-machine-learning numpy-exercises machine-learning-ex1 neural-network support-vector-machines principal-component-analysis logistic-regression

coursera-ml-py's Introduction

Coursera Machine Learning Assignments in Python

author python license contribution

title_image

About

If you've finished the amazing introductory Machine Learning on Coursera by Prof. Andrew Ng, you probably got familiar with Octave/Matlab programming. With this repo, you can re-implement them in Python, step-by-step, visually checking your work along the way, just as the course assignments.

How to start

Dependencies

This project was coded in Python 3.6

  • numpy
  • matplotlib
  • scipy
  • scikit-learn
  • scikit-image
  • nltk

Installation

The fastest and easiest way to install all these dependencies at once is to use Anaconda.

Important Note

There are a couple of things to keep in mind before starting.

  • all column vectors from octave/matlab are flattened into a simple 1-dimensional ndarray. (e.g., y's and thetas are no longer m x 1 matrix, just a 1-d ndarray with m elements.) So in Octave/Matlab,
    >> size(theta)
    >> (2, 1)
    Now, it is
    >>> theta.shape
    >>> (2, )
  • numpy.matrix is never used, just plain ol' numpy.ndarray

Contents

  • Linear Regression
  • Linear Regression with multiple variables
  • Logistic Regression
  • Logistic Regression with Regularization
  • Multiclass Classification
  • Neural Networks Prediction fuction
  • Neural Networks Learning
  • Regularized Linear Regression
  • Bias vs. Variance
  • Support Vector Machines
  • Spam email Classifier
  • K-means Clustering
  • Principal Component Analysis
  • Anomaly Detection
  • Recommender Systems

Solutions

You can check out my implementation of the assignments here. I tried to vectorize all the solutions.

coursera-ml-py's People

Contributors

nsoojin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coursera-ml-py's Issues

ex2_reg can't get the correct answer

I did it all right,but the last Expected accuracy.

The correct anwser is 83.1 (approx):
print('Expected accuracy (with lambda = 1): 83.1 (approx)')

but I can't get it, I don't know why, can you deal with it and give me the right answer code?

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.