Update on machine learning
This commit is contained in:
@@ -6,9 +6,9 @@ Automatically generated HTML file from DocOnce source
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
|
||||
<meta name="description" content="Data Analysis and Machine Learning: Representing data">
|
||||
<meta name="description" content="Data Analysis and Machine Learning: Introduction and Representing data">
|
||||
|
||||
<title>Data Analysis and Machine Learning: Representing data</title>
|
||||
<title>Data Analysis and Machine Learning: Introduction and Representing data</title>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
@@ -65,8 +65,18 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
|
||||
<!-- tocinfo
|
||||
{'highest level': 2,
|
||||
'sections': [('Representing data, overarching aims', 2, None, '___sec0'),
|
||||
('Representing data, overarching aims', 2, None, '___sec1')]}
|
||||
'sections': [('What is Machine Learning?', 2, None, '___sec0'),
|
||||
('Types of Machine Learning', 2, None, '___sec1'),
|
||||
('Different algorithms', 2, None, '___sec2'),
|
||||
('Software and needed installations', 2, None, '___sec3'),
|
||||
('Python installers', 2, None, '___sec4'),
|
||||
('Installing R and C++', 2, None, '___sec5'),
|
||||
('Introduction to Jupyter notebook and available tools',
|
||||
2,
|
||||
None,
|
||||
'___sec6'),
|
||||
('Representing data, overarching aims', 2, None, '___sec7'),
|
||||
('Representing data, more examples', 2, None, '___sec8')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -76,7 +86,7 @@ end of tocinfo -->
|
||||
|
||||
|
||||
|
||||
<center><h1>Data Analysis and Machine Learning: Representing data</h1></center> <!-- document title -->
|
||||
<center><h1>Data Analysis and Machine Learning: Introduction and Representing data</h1></center> <!-- document title -->
|
||||
|
||||
<p>
|
||||
<!-- author(s): Morten Hjorth-Jensen -->
|
||||
@@ -92,12 +102,151 @@ end of tocinfo -->
|
||||
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>Nov 26, 2017</h4></center> <!-- date -->
|
||||
<center><h4>Nov 27, 2017</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec0">Representing data, overarching aims </h2>
|
||||
<h2 id="___sec0">What is Machine Learning? </h2>
|
||||
|
||||
<p>
|
||||
Machine learning is the science of giving computers the ability to
|
||||
learn without being explicitly programmed. The idea is that there
|
||||
exist generic algorithms which can be used to find patterns in a broad
|
||||
class of data sets without having to write code specifically for each
|
||||
problem. The algorithm will build its own logic based on the data.
|
||||
|
||||
<p>
|
||||
Machine learning is a subfield of computer science, and is closely
|
||||
related to computational statistics. It evolved from the study of
|
||||
pattern recognition in artificial intelligence (AI) research, and has
|
||||
made contributions to AI tasks like computer vision, natural language
|
||||
processing and speech recognition. It has also, especially in later
|
||||
years, found applications in a wide variety of other areas, including
|
||||
bioinformatics, economy, physics, finance and marketing.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec1">Types of Machine Learning </h2>
|
||||
|
||||
<p>
|
||||
The approaches to machine learning are many, but are often split into two main categories.
|
||||
In <em>supervised learning</em> we know the answer to a problem,
|
||||
and let the computer deduce the logic behind it. On the other hand, <em>unsupervised learning</em>
|
||||
is a method for finding patterns and relationship in data sets without any prior knowledge of the system.
|
||||
Some authours also operate with a third category, namely <em>reinforcement learning</em>. This is a paradigm
|
||||
of learning inspired by behavioural psychology, where learning is achieved by trial-and-error,
|
||||
solely from rewards and punishment.
|
||||
|
||||
<p>
|
||||
Another way to categorize machine learning tasks is to consider the desired output of a system.
|
||||
Some of the most common tasks are:
|
||||
|
||||
<ul>
|
||||
<li> Classification: Outputs are divided into two or more classes. The goal is to produce a model that assigns inputs into one of these classes. An example is to identify digits based on pictures of hand-written ones. Classification is typically supervised learning.</li>
|
||||
<li> Regression: Finding a functional relationship between an input data set and a reference data set. The goal is to construct a function that maps input data to continuous output values.</li>
|
||||
<li> Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning.</li>
|
||||
</ul>
|
||||
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec2">Different algorithms </h2>
|
||||
In this course we will build our machine learning approach on a statistical foundation, with elements
|
||||
from data analysis, stochastic processes etc before we proceed with the following machine learning algorithms
|
||||
|
||||
<ol>
|
||||
<li> Linear regression and its variants</li>
|
||||
<li> Decision tree algorithms, from simpler to more complex ones</li>
|
||||
<li> Nearest neighbors models</li>
|
||||
<li> Bayesian statistics</li>
|
||||
<li> Support vector machines and finally various variants of</li>
|
||||
<li> Artifical neural networks</li>
|
||||
</ol>
|
||||
|
||||
Before we proceed however, there are several practicalities with data analysis and software tools we would
|
||||
like to present. These tools will help us in our understanding of various machine learning algorithms.
|
||||
|
||||
<p>
|
||||
Our emphasis here is on understanding the mathematical aspects of different algorithms, however, where possible
|
||||
we will emphasize the importance of using available software.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec3">Software and needed installations </h2>
|
||||
We will make intensive use of python as programming language and the myriad of available libraries.
|
||||
Furthermore, you will find IPython/Jupyter notebooks invaluable in your work.
|
||||
You can run <b>R</b> codes in the Jupyter/IPython notebooks, with the immediate benefit of visualizing your data.
|
||||
|
||||
<p>
|
||||
If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages,
|
||||
we recommend that you install the following Python packages via <b>pip</b> as
|
||||
|
||||
<ol>
|
||||
<li> pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow</li>
|
||||
</ol>
|
||||
|
||||
For Python3, replace <b>pip</b> with <b>pip3</b>.
|
||||
|
||||
<p>
|
||||
For OSX user we recommend also, after having installed Xcode, to install <b>brew</b>. Brew allows
|
||||
for a seamless installation of additional software via for example
|
||||
|
||||
<ol>
|
||||
<li> brew install python3</li>
|
||||
</ol>
|
||||
|
||||
For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution
|
||||
you can use <b>pip</b> as well and simply install Python as
|
||||
|
||||
<ol>
|
||||
<li> sudo apt-get install python3 (or python for pyhton2.7)</li>
|
||||
</ol>
|
||||
|
||||
etc etc.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec4">Python installers </h2>
|
||||
If you don't want to perform these operations separately, we recommend two widely used distrubutions which set up
|
||||
all relevant dependencies for Python, namely
|
||||
|
||||
<ol>
|
||||
<li> anaconda</li>
|
||||
<li> Enthought canopy</li>
|
||||
</ol>
|
||||
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec5">Installing R and C++ </h2>
|
||||
|
||||
<p>
|
||||
You will also find it convenient to utilize R. Say more about R.
|
||||
Jupyter/Ipython notebook allows you run <b>R</b> code interactively in your browser. The software library <b>R</b> is
|
||||
tuned to statistically analysis and allows for an easy usage of the tools we will discuss in these texts.
|
||||
|
||||
<p>
|
||||
For the C++ affecianodas, Jupyter/IPython notebook allows you also to install C++ and run codes written in this language
|
||||
interactively in the browser. Since we will emphasize writing many of the algorithms yourself, you can thus opt for
|
||||
either Python or C++ as programming languages.
|
||||
|
||||
<p>
|
||||
To add more entropy, <b>cython</b> can also be used when running your notebooks. It means that Python with the Jupyter/IPython notebook
|
||||
setup allows you to integrate widely popular softwares and tools for scientific computing. With its versatility,
|
||||
including symbolic operations, Python offers a unique computational environment. Your Jupyter/IPython notebook
|
||||
can easily be converted into a nicely rendered <b>PDF</b> file or a Latex file for further processing.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec6">Introduction to Jupyter notebook and available tools </h2>
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec7">Representing data, overarching aims </h2>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
<b></b>
|
||||
<p>
|
||||
@@ -128,7 +277,7 @@ display(data_pandas)
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<h2 id="___sec1">Representing data, overarching aims </h2>
|
||||
<h2 id="___sec8">Representing data, more examples </h2>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
<b></b>
|
||||
<p>
|
||||
@@ -156,6 +305,8 @@ plt<span style="color: #666666">.</span>show()
|
||||
</div>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
<!-- ------------------- end of main content --------------- -->
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user