Coder Social home page Coder Social logo

indrajithbandara / ml-precourse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from radovankavicky/ml-precourse

0.0 1.0 0.0 5 KB

Welcome to the Lambda School Machine Learning program! This is the first of many coding assignments that will teach you modern Machine Learning.

License: MIT License

Python 82.92% TeX 17.08%

ml-precourse's Introduction

The Lambda School Machine Learning Precourse work enables you to demonstrate basic understanding of Python3 programming, linear algebra, very basic calculus, and conforming to unit test requirements.

Prereqs

You can only execute the tests in a python programming environment. Run the tests in order to determine if your solutions are correct:

python test.py

You must add the functions described below into the file precourse.py.

Calculus

Please define three functions with the names 'f', 'f_2', and 'f_3'. These functions should respectively return the following values: x^2, x^3, and x^3 + 5x.

Define three additional functions d_f, d_f_2, and d_f_3. These functions should respectively return the derivative of their associated functions above: d_f returns the derivative of f, d_f_2 returns the derivative of f_2, and d_f_3 returns the derivative of f_3.

Linear Algebra

Define functions that perform basic vector arithmetic operations:

The sum of two vectors x and y is another vector v:

v_i = x_i + y_i

Calculate this new vector in a function defined vector_sum

The difference of two vectors x and y is another vector v:

v_i = x_i - y_i

Calculate this new vector in a function defined vector_less

The magnitude of a vector, its length, is:

magnitude of v = sqrt(/sum_i^n v_i^2)

Calculate this magnitude, a single number, and return it in a function defined vector_magnitude

Using numpy's array object, define functions vec5, vec3, vec2_1, and vec2_2 that respectively return

vector notation of a 5d vector containing ones, a 3d vector containing 0s, a 2d vector with 1 in x and a 2d vector with 1 in y

Finally, the last of your precourse python examples. Write a matrix multiplication function that multiplies a 2 element vector by a 2x2 matrix matrix_multiply(vec,matrix)

matrix notation Mv. See LaTeX in solution.

You can see the LaTeX description of the above matrix in precourse.tex.

That's it! Once again, a list of the functions you must properly implement:

  • f
  • f_2
  • f_3
  • d_f
  • d_f_2
  • d_f_3
  • vector_sum
  • vector_less
  • vector_magnitude
  • vec5
  • vec3
  • vec2_1
  • vec2_2
  • matrix_multiply

Good luck Lambda School Machine Learning students! Remember, while Lambda School's Machine Learning program is not a math class, everything in Machine Learning hinges upon it! These fundamentals will prepare you to understand the models that we will building, copying from the greatest innovators and implementing their original ideas.

ml-precourse's People

Contributors

thomcom 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.