Giter Club home page Giter Club logo

machine-learning's Introduction

Machine Learning

Trying out examples from Udacity's Machine Learning course.

Synopsis

For the following commands to work, do the Requirements section first if it's your first time running this.

Simply run the following command for each file you wish to run:

python file_name.py

Requirements

For managing dependencies this project uses a requirements.txt file, the pom file of Python.

  • Install pip using the following command:
sudo easy_install pip
  • Use the requirements.txt file to install all dependencies by calling the following command from within the root of the project:
pip install -r requirements.txt

This will install, among others, matplotlib. For this, there is a directory in you root called ~/.matplotlib. Create a file ~/.matplotlib/matplotlibrc there and add the following code: backend: TkAgg
The reason behind this is explained here.

If you run into any errors, try installing the following:

sudo apt-get install python-setuptools

Description

Machine Learning is an introductory course on this subject. I am simply trying out the examples from Udacity's course.

Errors

All logs will be printed to stderr, and thus all the errors will be found there.

Development Setup

Please install the following in order to run the project and the analysis tool against it:

  brew install pyenv-virtualenv

Please follow all the steps in the Github project link above.

  pyenv install 2.7.13
  pyenv virtualenv 2.7.13 machine-learning
  pyenv activate machine-learning

Run the following command if you wish to remove the virtual environment created:

  pyenv uninstall machine-learning

This is an extra step before first installing Pylint.
Change to the root of the project and generate the initial settings file for Pylint using:

  pylint --generate-rcfile > .pylintrc

Disable some of the warnings (e.g. missing-docstring, bare-except, fixme, redefined-builtin, too-many-locals) by adding these (missing-docstring,bare-except,fixme,redefined-builtin,too-many-locals) to the end of the line which starts disable= if you wish to turn that off.

  pip install pylint
  • Now, while in the root of the project opened from the last used command line, evaluate the code using:
  pylint *.py

You will see something like this: Your code has been rated at 8.60/10

  • For managing dependencies use a requirements.txt file, the pom file of Python.
  pip install -r requirements.txt
  • See all dependencies using the following command:
  pip freeze

Pipe directly all dependencies into the requirements.txt file in a sorted manner using the following command line:

  pip freeze | sort > requirements.txt
  • When inside the virtual env, you need to install dependencies again, otherwise Pylint will complain it cannot import them. Use the requirements.txt file to install all dependencies by calling the following from within the root of the project:
pip install -r requirements.txt

machine-learning's People

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.