Update on machine learning
This commit is contained in:
@@ -4,19 +4,127 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<!-- dom:TITLE: Data Analysis and Machine Learning: Representing data -->\n",
|
||||
"# Data Analysis and Machine Learning: Representing data\n",
|
||||
"<!-- dom:TITLE: Data Analysis and Machine Learning: Introduction and Representing data -->\n",
|
||||
"# Data Analysis and Machine Learning: Introduction and Representing data\n",
|
||||
"<!-- dom:AUTHOR: Morten Hjorth-Jensen at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University -->\n",
|
||||
"<!-- Author: --> \n",
|
||||
"**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n",
|
||||
"\n",
|
||||
"Date: **Nov 26, 2017**\n",
|
||||
"Date: **Nov 27, 2017**\n",
|
||||
"\n",
|
||||
"Copyright 1999-2017, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## What is Machine Learning?\n",
|
||||
"\n",
|
||||
"Machine learning is the science of giving computers the ability to\n",
|
||||
"learn without being explicitly programmed. The idea is that there\n",
|
||||
"exist generic algorithms which can be used to find patterns in a broad\n",
|
||||
"class of data sets without having to write code specifically for each\n",
|
||||
"problem. The algorithm will build its own logic based on the data.\n",
|
||||
"\n",
|
||||
"Machine learning is a subfield of computer science, and is closely\n",
|
||||
"related to computational statistics. It evolved from the study of\n",
|
||||
"pattern recognition in artificial intelligence (AI) research, and has\n",
|
||||
"made contributions to AI tasks like computer vision, natural language\n",
|
||||
"processing and speech recognition. It has also, especially in later\n",
|
||||
"years, found applications in a wide variety of other areas, including\n",
|
||||
"bioinformatics, economy, physics, finance and marketing.\n",
|
||||
"\n",
|
||||
"## Types of Machine Learning\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"The approaches to machine learning are many, but are often split into two main categories. \n",
|
||||
"In *supervised learning* we know the answer to a problem,\n",
|
||||
"and let the computer deduce the logic behind it. On the other hand, *unsupervised learning*\n",
|
||||
"is a method for finding patterns and relationship in data sets without any prior knowledge of the system.\n",
|
||||
"Some authours also operate with a third category, namely *reinforcement learning*. This is a paradigm \n",
|
||||
"of learning inspired by behavioural psychology, where learning is achieved by trial-and-error, \n",
|
||||
"solely from rewards and punishment.\n",
|
||||
"\n",
|
||||
"Another way to categorize machine learning tasks is to consider the desired output of a system.\n",
|
||||
"Some of the most common tasks are:\n",
|
||||
"\n",
|
||||
" * 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.\n",
|
||||
"\n",
|
||||
" * 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.\n",
|
||||
"\n",
|
||||
" * Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning.\n",
|
||||
"\n",
|
||||
"## Different algorithms\n",
|
||||
"In this course we will build our machine learning approach on a statistical foundation, with elements \n",
|
||||
"from data analysis, stochastic processes etc before we proceed with the following machine learning algorithms\n",
|
||||
"\n",
|
||||
"1. Linear regression and its variants\n",
|
||||
"\n",
|
||||
"2. Decision tree algorithms, from simpler to more complex ones\n",
|
||||
"\n",
|
||||
"3. Nearest neighbors models\n",
|
||||
"\n",
|
||||
"4. Bayesian statistics \n",
|
||||
"\n",
|
||||
"5. Support vector machines and finally various variants of\n",
|
||||
"\n",
|
||||
"6. Artifical neural networks\n",
|
||||
"\n",
|
||||
"Before we proceed however, there are several practicalities with data analysis and software tools we would \n",
|
||||
"like to present. These tools will help us in our understanding of various machine learning algorithms. \n",
|
||||
"\n",
|
||||
"Our emphasis here is on understanding the mathematical aspects of different algorithms, however, where possible \n",
|
||||
"we will emphasize the importance of using available software. \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## Software and needed installations\n",
|
||||
"We will make intensive use of python as programming language and the myriad of available libraries. \n",
|
||||
"Furthermore, you will find IPython/Jupyter notebooks invaluable in your work. \n",
|
||||
"You can run **R** codes in the Jupyter/IPython notebooks, with the immediate benefit of visualizing your data.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages, \n",
|
||||
"we recommend that you install the following Python packages via **pip** as\n",
|
||||
"1. pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow\n",
|
||||
"\n",
|
||||
"For Python3, replace **pip** with **pip3**.\n",
|
||||
"\n",
|
||||
"For OSX user we recommend also, after having installed Xcode, to install **brew**. Brew allows \n",
|
||||
"for a seamless installation of additional software via for example\n",
|
||||
"1. brew install python3\n",
|
||||
"\n",
|
||||
"For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution\n",
|
||||
"you can use **pip** as well and simply install Python as \n",
|
||||
"1. sudo apt-get install python3 (or python for pyhton2.7)\n",
|
||||
"\n",
|
||||
"etc etc. \n",
|
||||
"\n",
|
||||
"## Python installers\n",
|
||||
"If you don't want to perform these operations separately, we recommend two widely used distrubutions which set up \n",
|
||||
"all relevant dependencies for Python, namely\n",
|
||||
"1. anaconda\n",
|
||||
"\n",
|
||||
"2. Enthought canopy\n",
|
||||
"\n",
|
||||
"## Installing R and C++\n",
|
||||
"\n",
|
||||
"You will also find it convenient to utilize R. Say more about R. \n",
|
||||
"Jupyter/Ipython notebook allows you run **R** code interactively in your browser. The software library **R** is \n",
|
||||
"tuned to statistically analysis and allows for an easy usage of the tools we will discuss in these texts.\n",
|
||||
"\n",
|
||||
"For the C++ affecianodas, Jupyter/IPython notebook allows you also to install C++ and run codes written in this language \n",
|
||||
"interactively in the browser. Since we will emphasize writing many of the algorithms yourself, you can thus opt for\n",
|
||||
"either Python or C++ as programming languages. \n",
|
||||
"\n",
|
||||
"To add more entropy, **cython** can also be used when running your notebooks. It means that Python with the Jupyter/IPython notebook \n",
|
||||
"setup allows you to integrate widely popular softwares and tools for scientific computing. With its versatility, \n",
|
||||
"including symbolic operations, Python offers a unique computational environment. Your Jupyter/IPython notebook \n",
|
||||
"can easily be converted into a nicely rendered **PDF** file or a Latex file for further processing.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## Introduction to Jupyter notebook and available tools\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## Representing data, overarching aims"
|
||||
]
|
||||
},
|
||||
@@ -52,7 +160,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Representing data, overarching aims"
|
||||
"## Representing data, more examples"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user