Machine Learning Il MATLAB Essentials

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Machine Learning

MATLAB Essentials
i l

Jeff Howbert Introduction to Machine Learning Winter 2012 1


MATLAB

z High level language, designed for scientific and


engineering computing
z MATLAB stands for “MATrix LABoratory”
z Operations on vectors and multi-dimensional arrays are a
core strength
t th off MATLAB
– Compact syntax
– Efficient underlying
y g implementations
p of matrix algebra
g
z Rich libraries of mathematical functions
– Statistics
– Signal processing
– Optimization
– Machine learning

Jeff Howbert Introduction to Machine Learning Winter 2012 2


MATLAB

z Interpreted language, with built-in precompiled modules


for compute-intensive
p operations
p
z Great flexibility in programming
– Interactive
– Scripts
– Functions (scripts with defined inputs and outputs)
– Object
Object-oriented
oriented programming
– Supports complex, hierarchical data structures with mixed types
– Easy to interface with C / C++
– Moderately loose typing
z Good for both exploratory work and large-scale structured
programming

Jeff Howbert Introduction to Machine Learning Winter 2012 3


MATLAB

z Ubiquitous vectorization
– Vectorization: use of single-operator syntax to signify uniform
application of the operator on all elements of one or several
vectors and/or matrices
– Circumvents need for explicit loops to process elements of
vectors and matrices
– Syntax
y veryy compact
p and highly
g y readable, akin to mathematical
formulae
– Examples:
add two matrices C = A + B;;
multiply matrix by scalar C = 2 * B;
multiply two matrices C = A * B;
logarithm of every element in matrix B = log( A );

Jeff Howbert Introduction to Machine Learning Winter 2012 4


MATLAB

z Powerful visualization capabilities


– Histograms, bar charts
– 2D and 3D line plots
– 2D and 3D scatter plots
– Heat maps
– Contour plots
– Mesh plots
– Colored and shaded surface plots

Jeff Howbert Introduction to Machine Learning Winter 2012 5

You might also like