diff --git a/doc/pub/week34/html/._week34-bs000.html b/doc/pub/week34/html/._week34-bs000.html
index 19b4a2d84..9eaa31e80 100644
--- a/doc/pub/week34/html/._week34-bs000.html
+++ b/doc/pub/week34/html/._week34-bs000.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -378,7 +386,7 @@ MathJax.Hub.Config({
9
10
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs001.html b/doc/pub/week34/html/._week34-bs001.html
index 4059ee806..0856635a4 100644
--- a/doc/pub/week34/html/._week34-bs001.html
+++ b/doc/pub/week34/html/._week34-bs001.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -374,7 +382,7 @@ linear algebra and elements of statistics needed for the course.
10
11
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs002.html b/doc/pub/week34/html/._week34-bs002.html
index b3f6f153d..32c9a6a87 100644
--- a/doc/pub/week34/html/._week34-bs002.html
+++ b/doc/pub/week34/html/._week34-bs002.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,19 +343,16 @@ MathJax.Hub.Config({
-Schedule first week
+AI/ML and some statements you may have heard (and what do they mean?)
-
-
-
-
- - August 22: Presentation of the course, aims and content. Introduction to software and repetition of Python Programming, linear algebra and basic elements of statistics. Please select group.
- - August 23: Presentation of the course, aims and content. Introduction to software and repetition of Python Programming, linear algebra and basic elements of statistics. Please select group.
- - August 24: Lecture: Linear regression, examples and theory
-
-
-
+
+- Fei-Fei Li on ImageNet: map out the entire world of objects (The data that transformed AI research)
+- Russell and Norvig in their popular textbook: relevant to any intellectual task; it is truly a universal field (Artificial Intelligence, A modern approach)
+- Woody Bledsoe puts it more bluntly: in the long run, AI is the only science (quoted in Pamilla McCorduck, Machines who think)
+
+If you wish to have a critical read on AI/ML from a societal point of view, see Kate Crawford's recent text Atlas of AI
+Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis
@@ -366,7 +371,7 @@ MathJax.Hub.Config({
11
12
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs003.html b/doc/pub/week34/html/._week34-bs003.html
index 34d05529f..d66e10352 100644
--- a/doc/pub/week34/html/._week34-bs003.html
+++ b/doc/pub/week34/html/._week34-bs003.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,20 +343,16 @@ MathJax.Hub.Config({
-Reading Recommendations
+Schedule first week
-
For the reading assignments we use the following abbreviations:
-- GBC: Goodfellow, Bengio, and Courville, Deep Learning
-- CMB: Christopher M. Bishop, Pattern Recognition and Machine Learning
-- HTF: Hastie, Tibshirani, and Friedman, The Elements of Statistical Learning
-- AG: Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow
-- KM: Kevin Murphy, Probabilistic Machine Learning, an Introduction
+ - August 22: Presentation of the course, aims and content. Introduction to software and repetition of Python Programming, linear algebra and basic elements of statistics. Please select group.
+ - August 23: Presentation of the course, aims and content. Introduction to software and repetition of Python Programming, linear algebra and basic elements of statistics. Please select group.
+ - August 24: Lecture: Linear regression, examples and theory
-
Reading recommendations this week: Refresh linear algebra, GBC chapters 1 and 2. CMB sections 1.1 and 3.1. HTF chapters 2 and 3. Install scikit-learn. See lecture notes for week 34 at https://compphysics.github.io/MachineLearning/doc/web/course.html (these notes).
@@ -371,7 +375,7 @@ MathJax.Hub.Config({
12
13
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs004.html b/doc/pub/week34/html/._week34-bs004.html
index 3ce4433bd..494e0bca0 100644
--- a/doc/pub/week34/html/._week34-bs004.html
+++ b/doc/pub/week34/html/._week34-bs004.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,20 +343,20 @@ MathJax.Hub.Config({
-Lectures and ComputerLab
+Reading Recommendations
+
For the reading assignments we use the following abbreviations:
- - The sessions on Tuesdays and Wednesdays last four hours and will include partly lectures in a flipped mode (promoting active learning) and work on exercices and projects.
- - Thursdays: regular lectures (12.15pm-2pm)
- - Weekly reading assignments and videos needed to solve projects and exercises.
- - Weekly exercises when not working on projects. You can hand in exercises if you want.
- - Detailed lecture notes, exercises, all programs presented, projects etc can be found at the homepage of the course.
- - Weekly plans and all other information are on the official webpage.
- - No final exam, three projects that are graded and have to be approved.
+- GBC: Goodfellow, Bengio, and Courville, Deep Learning
+- CMB: Christopher M. Bishop, Pattern Recognition and Machine Learning
+- HTF: Hastie, Tibshirani, and Friedman, The Elements of Statistical Learning
+- AG: Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow
+- KM: Kevin Murphy, Probabilistic Machine Learning, an Introduction
+
Reading recommendations this week: Refresh linear algebra, GBC chapters 1 and 2. CMB sections 1.1 and 3.1. HTF chapters 2 and 3. Install scikit-learn. See lecture notes for week 34 at https://compphysics.github.io/MachineLearning/doc/web/course.html (these notes).
@@ -372,7 +380,7 @@ MathJax.Hub.Config({
13
14
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs005.html b/doc/pub/week34/html/._week34-bs005.html
index dead6245d..301a5099b 100644
--- a/doc/pub/week34/html/._week34-bs005.html
+++ b/doc/pub/week34/html/._week34-bs005.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,12 +343,24 @@ MathJax.Hub.Config({
-Communication channels
+Lectures and ComputerLab
+
+
+
-- Chat and communications via canvas.uio.no
-- Slack channel: machinelearninguio.slack.com
+ - The sessions on Tuesdays and Wednesdays last four hours and will include partly lectures in a flipped mode (promoting active learning) and work on exercices and projects.
+ - Thursdays: regular lectures (12.15pm-2pm)
+ - Weekly reading assignments and videos needed to solve projects and exercises.
+ - Weekly exercises when not working on projects. You can hand in exercises if you want.
+ - Detailed lecture notes, exercises, all programs presented, projects etc can be found at the homepage of the course.
+ - Weekly plans and all other information are on the official webpage.
+ - No final exam, three projects that are graded and have to be approved.
+
+
+
+
diff --git a/doc/pub/week34/html/._week34-bs006.html b/doc/pub/week34/html/._week34-bs006.html
index e017e4ba6..de64639bb 100644
--- a/doc/pub/week34/html/._week34-bs006.html
+++ b/doc/pub/week34/html/._week34-bs006.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,26 +343,12 @@ MathJax.Hub.Config({
-
+Communication channels
-
-
-
- - Three compulsory projects. Electronic reports only using Canvas to hand in projects and git as version control software and GitHub for repository (or GitLab) of all your material.
- - Evaluation and grading: The three projects are graded and each counts 1/3 of the final mark. No final written or oral exam.
-
- - For the last project each group/participant submits a proposal or works with suggested (by us) proposals for the project.
- - If possible, we would like to organize the last project as a workshop where each group makes a poster and presents this to all other participants of the course
- - Poster session where all participants can study and discuss the other proposals.
- - Based on feedback etc, each group finalizes the report and submits for grading.
-
- - Python is the default programming language, but feel free to use C/C++ and/or Fortran or other programming languages. All source codes discussed during the lectures can be found at the webpage and github address of the course.
+- Chat and communications via canvas.uio.no
+- Slack channel: machinelearninguio.slack.com
-
-
-
-
diff --git a/doc/pub/week34/html/._week34-bs007.html b/doc/pub/week34/html/._week34-bs007.html
index 480c13442..53916a021 100644
--- a/doc/pub/week34/html/._week34-bs007.html
+++ b/doc/pub/week34/html/._week34-bs007.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,26 +343,21 @@ MathJax.Hub.Config({
-Teachers
+
-
-
Teachers :
-- Morten Hjorth-Jensen, morten.hjorth-jensen@fys.uio.no
-
- - Phone: +47-48257387
- - Office: Department of Physics, University of Oslo, Eastern wing, room FØ470
- - Office hours: Anytime! Individual or group office hours can be arranged either in person or via zoom. Feel free to send an email for planning.
-
-- Ida Torkjellsdatter Storehaug, i.t.storehaug@fys.uio.no
-- Fahimeh Najafi, fahim.n.20@gmail.com
-- Mia-Katrin Ose Kvalsund, m.k.o.kvalsund@fys.uio.no
-- Karl Henrik Fredly, k.h.fredly@fys.uio.no
-- Adam Jakobsen, adam.jakobsen@fys.uio.no
-- Daniel Haas Beccatini Lima, d.h.b.lima@fys.uio.no
+ - Three compulsory projects. Electronic reports only using Canvas to hand in projects and git as version control software and GitHub for repository (or GitLab) of all your material.
+ - Evaluation and grading: The three projects are graded and each counts 1/3 of the final mark. No final written or oral exam.
+
+ - For the last project each group/participant submits a proposal or works with suggested (by us) proposals for the project.
+ - If possible, we would like to organize the last project as a workshop where each group makes a poster and presents this to all other participants of the course
+ - Poster session where all participants can study and discuss the other proposals.
+ - Based on feedback etc, each group finalizes the report and submits for grading.
+
+ - Python is the default programming language, but feel free to use C/C++ and/or Fortran or other programming languages. All source codes discussed during the lectures can be found at the webpage and github address of the course.
@@ -382,7 +385,7 @@ MathJax.Hub.Config({
16
17
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs008.html b/doc/pub/week34/html/._week34-bs008.html
index 837446f48..bf13011e2 100644
--- a/doc/pub/week34/html/._week34-bs008.html
+++ b/doc/pub/week34/html/._week34-bs008.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,18 +343,27 @@ MathJax.Hub.Config({
-Deadlines for projects (tentative)
+Teachers
-
-- Project 1: October 9 (available September 4) graded with feedback)
-- Project 2: November 6 (available October 6, graded with feedback)
-- Project 3: December 11 (available November 10, graded with feedback)
-
-
Projects are handed in using Canvas. We use Github as repository for codes, benchmark calculations etc. Comments and feedback on projects only via Canvas.
+
Teachers :
+
+- Morten Hjorth-Jensen, morten.hjorth-jensen@fys.uio.no
+
+ - Phone: +47-48257387
+ - Office: Department of Physics, University of Oslo, Eastern wing, room FØ470
+ - Office hours: Anytime! Individual or group office hours can be arranged either in person or via zoom. Feel free to send an email for planning.
+
+- Ida Torkjellsdatter Storehaug, i.t.storehaug@fys.uio.no
+- Fahimeh Najafi, fahim.n.20@gmail.com
+- Mia-Katrin Ose Kvalsund, m.k.o.kvalsund@fys.uio.no
+- Karl Henrik Fredly, k.h.fredly@fys.uio.no
+- Adam Jakobsen, adam.jakobsen@fys.uio.no
+- Daniel Haas Beccatini Lima, d.h.b.lima@fys.uio.no
+
@@ -374,7 +391,7 @@ MathJax.Hub.Config({
17
18
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs009.html b/doc/pub/week34/html/._week34-bs009.html
index 44a93e1f9..ee94c06bd 100644
--- a/doc/pub/week34/html/._week34-bs009.html
+++ b/doc/pub/week34/html/._week34-bs009.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,23 +343,22 @@ MathJax.Hub.Config({
-Recommended textbooks
+Deadlines for projects (tentative)
+
+
+
+
-- The lecture notes are collected as a jupyter-book at https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/intro.html.
+- Project 1: October 9 (available September 4) graded with feedback)
+- Project 2: November 6 (available October 6, graded with feedback)
+- Project 3: December 11 (available November 10, graded with feedback)
-
In addition to the lecture notes, we recommend the books of Bishop and Goodfellow et al. We will follow these texts closely and the weekly reading assignments refer to these two texts. The text by Hastie et al is also widely used in the Machine Learning community. Finally, we also recommend the hands-on text by Geron, see below.
+
Projects are handed in using Canvas. We use Github as repository for codes, benchmark calculations etc. Comments and feedback on projects only via Canvas.
+
+
-
-- Christopher M. Bishop, Pattern Recognition and Machine Learning, Springer, https://www.springer.com/gp/book/9780387310732.
-- Ian Goodfellow, Yoshua Bengio, and Aaron Courville. The different chapters are available for free at https://www.deeplearningbook.org/. Chapters 2-14 are highly recommended. The lectures follow to a larg extent this text. The weekly plans will include reading suggestions from these two textbooks.
-
-Additional textbooks:
-
-- Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer, https://www.springer.com/gp/book/9780387848570. This is a well-known text and serves as additional literature.
-- Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly, https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/. This text is very useful since it contains many code examples and hands-on applications of all algorithms discussed in this course.
-
diff --git a/doc/pub/week34/html/._week34-bs010.html b/doc/pub/week34/html/._week34-bs010.html
index f4eb43050..ac55ec299 100644
--- a/doc/pub/week34/html/._week34-bs010.html
+++ b/doc/pub/week34/html/._week34-bs010.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,18 +343,22 @@ MathJax.Hub.Config({
-Prerequisites
+Grading and deadlines
-Basic knowledge in programming and mathematics, with an emphasis on
-linear algebra. Knowledge of Python or/and C++ as programming
-languages is strongly recommended and experience with Jupiter notebook
-is recommended. Required courses are the equivalents to the University
-of Oslo mathematics courses MAT1100, MAT1110, MAT1120 and at least one
-of the corresponding computing and programming courses INF1000/INF1110
-or MAT-INF1100/MAT-INF1100L/BIOS1100/KJM-INF1100. Most universities
-offer nowadays a basic programming course (often compulsory) where
-Python is the recurring programming language.
-
+
+
+
+
+- First project, due October 9, 1/3%
+- Second project, due November 6, 1/3%
+- Third project, due December 11, 1/3%
+- Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score
+
+
+
+
+
+The extra credit assignments are due each Friday and can be uploaed to canvas in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35.
@@ -373,7 +385,7 @@ Python is the recurring programming language.
19
20
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs011.html b/doc/pub/week34/html/._week34-bs011.html
index bb0e8db2e..1b8407ba1 100644
--- a/doc/pub/week34/html/._week34-bs011.html
+++ b/doc/pub/week34/html/._week34-bs011.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,43 +343,23 @@ MathJax.Hub.Config({
-Learning outcomes
+Recommended textbooks
-
-
-
-
-
This course aims at giving you insights and knowledge about many of
-the central algorithms used in Data Analysis and Machine Learning.
-The course is project based and through various numerical projects,
-normally three, you will be exposed to fundamental research problems
-in these fields, with the aim to reproduce state of the art scientific
-results. Both supervised and unsupervised methods will be covered. The
-emphasis is on a frequentist approach, although we will try to link it
-with a Bayesian approach as well. You will learn to develop and
-structure large codes for studying different cases where Machine
-Learning is applied to, get acquainted with computing facilities and
-learn to handle large scientific projects. A good scientific and
-ethical conduct is emphasized throughout the course. More
-specifically, after this course you will
-
-
-
-- Learn about basic data analysis, statistical analysis, Bayesian statistics, Monte Carlo sampling, data optimization and machine learning;
-- Be capable of extending the acquired knowledge to other systems and cases;
-- Have an understanding of central algorithms used in data analysis and machine learning;
-- Understand linear methods for regression and classification, from ordinary least squares, via Lasso and Ridge to Logistic regression;
-- Learn about neural networks and deep learning methods for supervised and unsupervised learning. Emphasis on feed forward neural networks, convolutional and recurrent neural networks;
-- Learn about about decision trees, random forests, bagging and boosting methods;
-- Learn about support vector machines and kernel transformations;
-- Reduction of data sets, from PCA to clustering;
-- Autoencoders and Reinforcement Learning;
-- Work on numerical projects to illustrate the theory. The projects play a central role and you are expected to know modern programming languages like Python or C++ and/or Fortran (Fortran2003 or later) or Julia or other.
-
-
-
+
+- The lecture notes are collected as a jupyter-book at https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/intro.html.
+
+In addition to the lecture notes, we recommend the books of Bishop and Goodfellow et al. We will follow these texts closely and the weekly reading assignments refer to these two texts. The text by Hastie et al is also widely used in the Machine Learning community. Finally, we also recommend the hands-on text by Geron, see below.
+
+- Christopher M. Bishop, Pattern Recognition and Machine Learning, Springer, https://www.springer.com/gp/book/9780387310732.
+- Ian Goodfellow, Yoshua Bengio, and Aaron Courville. The different chapters are available for free at https://www.deeplearningbook.org/. Chapters 2-14 are highly recommended. The lectures follow to a larg extent this text. The weekly plans will include reading suggestions from these two textbooks.
+
+Additional textbooks:
+
+- Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer, https://www.springer.com/gp/book/9780387848570. This is a well-known text and serves as additional literature.
+- Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly, https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/. This text is very useful since it contains many code examples and hands-on applications of all algorithms discussed in this course.
+
diff --git a/doc/pub/week34/html/._week34-bs012.html b/doc/pub/week34/html/._week34-bs012.html
index e1297ade0..55dc12bd8 100644
--- a/doc/pub/week34/html/._week34-bs012.html
+++ b/doc/pub/week34/html/._week34-bs012.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,33 +343,18 @@ MathJax.Hub.Config({
-Topics covered in this course: Statistical analysis and optimization of data
-
-The course has two central parts
-
-
-- Statistical analysis and optimization of data
-- Machine learning
-
-These topics will be scattered thorughout the course and may not necessarily be taught separately. Rather, we will often take an approach (during the lectures and project/exercise sessions) where say elements from statistical data analysis are mixed with specific Machine Learning algorithms
-
-
-
-
-
-
We plan to cover the following topics:
-
-- Basic concepts, expectation values, variance, covariance, correlation functions and errors;
-- Simpler models, binomial distribution, the Poisson distribution, simple and multivariate normal distributions;
-- Central elements of Bayesian statistics and modeling;
-- Gradient methods for data optimization;
-- Monte Carlo methods, Markov chains, Gibbs sampling and Metropolis-Hastings sampling (tentative);
-- Estimation of errors and resampling techniques such as the cross-validation, blocking, bootstrapping and jackknife methods;
-- Principal Component Analysis (PCA) and its mathematical foundation;
-
-
-
+Prerequisites
+Basic knowledge in programming and mathematics, with an emphasis on
+linear algebra. Knowledge of Python or/and C++ as programming
+languages is strongly recommended and experience with Jupiter notebook
+is recommended. Required courses are the equivalents to the University
+of Oslo mathematics courses MAT1100, MAT1110, MAT1120 and at least one
+of the corresponding computing and programming courses INF1000/INF1110
+or MAT-INF1100/MAT-INF1100L/BIOS1100/KJM-INF1100. Most universities
+offer nowadays a basic programming course (often compulsory) where
+Python is the recurring programming language.
+
@@ -388,7 +381,7 @@ MathJax.Hub.Config({
21
22
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs013.html b/doc/pub/week34/html/._week34-bs013.html
index 139c98ceb..68f21d30f 100644
--- a/doc/pub/week34/html/._week34-bs013.html
+++ b/doc/pub/week34/html/._week34-bs013.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,32 +343,39 @@ MathJax.Hub.Config({
-Topics covered in this course
+Learning outcomes
-
The following topics will be covered
+
+
This course aims at giving you insights and knowledge about many of
+the central algorithms used in Data Analysis and Machine Learning.
+The course is project based and through various numerical projects,
+normally three, you will be exposed to fundamental research problems
+in these fields, with the aim to reproduce state of the art scientific
+results. Both supervised and unsupervised methods will be covered. The
+emphasis is on a frequentist approach, although we will try to link it
+with a Bayesian approach as well. You will learn to develop and
+structure large codes for studying different cases where Machine
+Learning is applied to, get acquainted with computing facilities and
+learn to handle large scientific projects. A good scientific and
+ethical conduct is emphasized throughout the course. More
+specifically, after this course you will
+
-- Pre deep-learning revolution (2008 approx)
-
- - Linear Regression and Logistic Regression, classification and regression problems;
- - Bayesian linear and logistic regression, kernel regression;
- - Decisions trees, Random Forests, Bagging and Boosting methods;
- - Support vector machines (only survey);
- - Unsupervised learning and dimensionality reduction, from PCA to clustering;
+- Learn about basic data analysis, statistical analysis, Bayesian statistics, Monte Carlo sampling, data optimization and machine learning;
+- Be capable of extending the acquired knowledge to other systems and cases;
+- Have an understanding of central algorithms used in data analysis and machine learning;
+- Understand linear methods for regression and classification, from ordinary least squares, via Lasso and Ridge to Logistic regression;
+- Learn about neural networks and deep learning methods for supervised and unsupervised learning. Emphasis on feed forward neural networks, convolutional and recurrent neural networks;
+- Learn about about decision trees, random forests, bagging and boosting methods;
+- Learn about support vector machines and kernel transformations;
+- Reduction of data sets, from PCA to clustering;
+- Autoencoders and Reinforcement Learning;
+- Work on numerical projects to illustrate the theory. The projects play a central role and you are expected to know modern programming languages like Python or C++ and/or Fortran (Fortran2003 or later) or Julia or other.
-- Deep learning
-
- - Neural networks and deep learning;
- - Convolutional neural networks;
- - Recurrent neural networks;
- - Autoencoders
- - Generative methods with an emphasis on Boltzmann Machines, Variational Autoencoders and Generalized Adversarial Networks;
-
-
-
Hands-on demonstrations, exercises and projects aim at deepening your understanding of these topics.
@@ -390,7 +405,7 @@ MathJax.Hub.Config({
22
23
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs014.html b/doc/pub/week34/html/._week34-bs014.html
index 8fe5ee44c..9dc11619a 100644
--- a/doc/pub/week34/html/._week34-bs014.html
+++ b/doc/pub/week34/html/._week34-bs014.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,14 +343,29 @@ MathJax.Hub.Config({
-
+Topics covered in this course: Statistical analysis and optimization of data
+
+The course has two central parts
+
+
+- Statistical analysis and optimization of data
+- Machine learning
+
+These topics will be scattered thorughout the course and may not necessarily be taught separately. Rather, we will often take an approach (during the lectures and project/exercise sessions) where say elements from statistical data analysis are mixed with specific Machine Learning algorithms
+
+
We plan to cover the following topics:
- - GIT for version control, and GitHub or GitLab as repositories, highly recommended. This will be discussed during the first exercise session
- - Anaconda and other Python environments, see intro slides and links to programming resources at https://computationalscienceuio.github.io/RefreshProgrammingSkills/intro.html
+- Basic concepts, expectation values, variance, covariance, correlation functions and errors;
+- Simpler models, binomial distribution, the Poisson distribution, simple and multivariate normal distributions;
+- Central elements of Bayesian statistics and modeling;
+- Gradient methods for data optimization;
+- Monte Carlo methods, Markov chains, Gibbs sampling and Metropolis-Hastings sampling (tentative);
+- Estimation of errors and resampling techniques such as the cross-validation, blocking, bootstrapping and jackknife methods;
+- Principal Component Analysis (PCA) and its mathematical foundation;
@@ -373,7 +396,7 @@ MathJax.Hub.Config({
23
24
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs015.html b/doc/pub/week34/html/._week34-bs015.html
index 9c9a00303..57195f192 100644
--- a/doc/pub/week34/html/._week34-bs015.html
+++ b/doc/pub/week34/html/._week34-bs015.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,21 +343,36 @@ MathJax.Hub.Config({
-Other courses on Data science and Machine Learning at UiO
+Topics covered in this course
+
+
+
+
+
The following topics will be covered
+
+
+- Pre deep-learning revolution (2008 approx)
+
+ - Linear Regression and Logistic Regression, classification and regression problems;
+ - Bayesian linear and logistic regression, kernel regression;
+ - Decisions trees, Random Forests, Bagging and Boosting methods;
+ - Support vector machines (only survey);
+ - Unsupervised learning and dimensionality reduction, from PCA to clustering;
+
+- Deep learning
+
+ - Neural networks and deep learning;
+ - Convolutional neural networks;
+ - Recurrent neural networks;
+ - Autoencoders
+ - Generative methods with an emphasis on Boltzmann Machines, Variational Autoencoders and Generalized Adversarial Networks;
+
+
+
Hands-on demonstrations, exercises and projects aim at deepening your understanding of these topics.
+
+
+
-The link here https://www.mn.uio.no/english/research/about/centre-focus/innovation/data-science/studies/ gives an excellent overview of courses on Machine learning at UiO.
-
-- FYS5419 Quantum Computing and Quantum Machine Learning
-- FYS5429 Advanced Machine Learning for the Physical Sciences
-- STK2100 Machine learning and statistical methods for prediction and classification.
-- IN3050/4050 Introduction to Artificial Intelligence and Machine Learning. Introductory course in machine learning and AI with an algorithmic approach.
-- STK-INF3000/4000 Selected Topics in Data Science. The course provides insight into selected contemporary relevant topics within Data Science.
-- IN4080 Natural Language Processing. Probabilistic and machine learning techniques applied to natural language processing.
-- STK-IN4300 Statistical learning methods in Data Science. An advanced introduction to statistical and machine learning. For students with a good mathematics and statistics background.
-- IN3310/4310 Deep Learnig for Image Analysis
-- STK4051 Computational Statistics
-- STK4021 Applied Bayesian Analysis and Numerical Methods
-
diff --git a/doc/pub/week34/html/._week34-bs016.html b/doc/pub/week34/html/._week34-bs016.html
index 99ee3dbc2..0b3545c24 100644
--- a/doc/pub/week34/html/._week34-bs016.html
+++ b/doc/pub/week34/html/._week34-bs016.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,44 +343,18 @@ MathJax.Hub.Config({
-Introduction
+
-Our emphasis throughout this series of lectures
-is on understanding the mathematical aspects of
-different algorithms used in the fields of data analysis and machine learning.
-
+
-However, where possible we will emphasize the
-importance of using available software. We start thus with a hands-on
-and top-down approach to machine learning. The aim is thus to start with
-relevant data or data we have produced
-and use these to introduce statistical data analysis
-concepts and machine learning algorithms before we delve into the
-algorithms themselves. The examples we will use in the beginning, start with simple
-polynomials with random noise added. We will use the Python
-software package Scikit-Learn and
-introduce various machine learning algorithms to make fits of
-the data and predictions. We move thereafter to more interesting
-cases such as data from say experiments (below we will look at experimental nuclear binding energies as an example).
-These are examples where we can easily set up the data and
-then use machine learning algorithms included in for example
-Scikit-Learn.
-
-
-These examples will serve us the purpose of getting
-started. Furthermore, they allow us to catch more than two birds with
-a stone. They will allow us to bring in some programming specific
-topics and tools as well as showing the power of various Python
-libraries for machine learning and statistical data analysis.
-
-
-Although we have projects where you write your own codes, we will also focus on two
-specific Python packages for Machine Learning, Scikit-Learn and
-Tensorflow with Keras (see below for links etc). Moreover, the examples we
-introduce will serve as inputs to many of our discussions later, as
-well as allowing you to set up models and produce your own data and
-get started with programming.
-
@@ -399,7 +381,7 @@ get started with programming.
25
26
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs017.html b/doc/pub/week34/html/._week34-bs017.html
index 731a1423d..974856f5d 100644
--- a/doc/pub/week34/html/._week34-bs017.html
+++ b/doc/pub/week34/html/._week34-bs017.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,76 +343,21 @@ MathJax.Hub.Config({
-What is Machine Learning?
-
-Statistics, data science and machine learning form important fields of
-research in modern science. They describe how to learn and make
-predictions from data, as well as allowing us to extract important
-correlations about physical process and the underlying laws of motion
-in large data sets. The latter, big data sets, appear frequently in
-essentially all disciplines, from the traditional Science, Technology,
-Mathematics and Engineering fields to Life Science, Law, education
-research, the Humanities and the Social Sciences.
-
-
-It has become more
-and more common to see research projects on big data in for example
-the Social Sciences where extracting patterns from complicated survey
-data is one of many research directions. Having a solid grasp of data
-analysis and machine learning is thus becoming central to scientific
-computing in many fields, and competences and skills within the fields
-of machine learning and scientific computing are nowadays strongly
-requested by many potential employers. The latter cannot be
-overstated, familiarity with machine learning has almost become a
-prerequisite for many of the most exciting employment opportunities,
-whether they are in bioinformatics, life science, physics or finance,
-in the private or the public sector. This author has had several
-students or met students who have been hired recently based on their
-skills and competences in scientific computing and data science, often
-with marginal knowledge of machine learning.
-
-
-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. Many of the methods we will study are also
-strongly rooted in basic mathematics and physics research.
-
-
-Ideally, machine learning represents 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. You should however always keep in mind that
-machines and algorithms are to a large extent developed by humans. The
-insights and knowledge we have about a specific system, play a central
-role when we develop a specific machine learning algorithm.
-
-
-Machine learning is an extremely rich field, in spite of its young
-age. The increases we have seen during the last three decades in
-computational capabilities have been followed by developments of
-methods and techniques for analyzing and handling large date sets,
-relying heavily on statistics, computer science and mathematics. The
-field is rather new and developing rapidly. Popular software packages
-written in Python for machine learning like
-Scikit-learn,
-Tensorflow,
-PyTorch and Keras, all
-freely available at their respective GitHub sites, encompass
-communities of developers in the thousands or more. And the number of
-code developers and contributors keeps increasing. Not all the
-algorithms and methods can be given a rigorous mathematical
-justification, opening up thereby large rooms for experimenting and
-trial and error and thereby exciting new developments. However, a
-solid command of linear algebra, multivariate theory, probability
-theory, statistical data analysis, understanding errors and Monte
-Carlo methods are central elements in a proper understanding of many
-of algorithms and methods we will discuss.
-
+Other courses on Data science and Machine Learning at UiO
+The link here https://www.mn.uio.no/english/research/about/centre-focus/innovation/data-science/studies/ gives an excellent overview of courses on Machine learning at UiO.
+
+- FYS5419 Quantum Computing and Quantum Machine Learning
+- FYS5429 Advanced Machine Learning for the Physical Sciences
+- STK2100 Machine learning and statistical methods for prediction and classification.
+- IN3050/4050 Introduction to Artificial Intelligence and Machine Learning. Introductory course in machine learning and AI with an algorithmic approach.
+- STK-INF3000/4000 Selected Topics in Data Science. The course provides insight into selected contemporary relevant topics within Data Science.
+- IN4080 Natural Language Processing. Probabilistic and machine learning techniques applied to natural language processing.
+- STK-IN4300 Statistical learning methods in Data Science. An advanced introduction to statistical and machine learning. For students with a good mathematics and statistics background.
+- IN3310/4310 Deep Learnig for Image Analysis
+- STK4051 Computational Statistics
+- STK4021 Applied Bayesian Analysis and Numerical Methods
+
diff --git a/doc/pub/week34/html/._week34-bs018.html b/doc/pub/week34/html/._week34-bs018.html
index 0fc707830..7487ee078 100644
--- a/doc/pub/week34/html/._week34-bs018.html
+++ b/doc/pub/week34/html/._week34-bs018.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,28 +343,45 @@ MathJax.Hub.Config({
-Types of Machine Learning
+Introduction
-The approaches to machine learning are many, but are often split into
-two main categories. In supervised learning we know the answer to a
-problem, and let the computer deduce the logic behind it. On the other
-hand, unsupervised learning 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
-reinforcement learning. This is a paradigm of learning inspired by
-behavioral psychology, where learning is achieved by trial-and-error,
-solely from rewards and punishment.
+
Our emphasis throughout this series of lectures
+is on understanding the mathematical aspects of
+different algorithms used in the fields of data analysis and machine learning.
-Another way to categorize machine learning tasks is to consider the
-desired output of a system. Some of the most common tasks are:
+
However, where possible we will emphasize the
+importance of using available software. We start thus with a hands-on
+and top-down approach to machine learning. The aim is thus to start with
+relevant data or data we have produced
+and use these to introduce statistical data analysis
+concepts and machine learning algorithms before we delve into the
+algorithms themselves. The examples we will use in the beginning, start with simple
+polynomials with random noise added. We will use the Python
+software package Scikit-Learn and
+introduce various machine learning algorithms to make fits of
+the data and predictions. We move thereafter to more interesting
+cases such as data from say experiments (below we will look at experimental nuclear binding energies as an example).
+These are examples where we can easily set up the data and
+then use machine learning algorithms included in for example
+Scikit-Learn.
+
+
+These examples will serve us the purpose of getting
+started. Furthermore, they allow us to catch more than two birds with
+a stone. They will allow us to bring in some programming specific
+topics and tools as well as showing the power of various Python
+libraries for machine learning and statistical data analysis.
+
+
+Although we have projects where you write your own codes, we will also focus on two
+specific Python packages for Machine Learning, Scikit-Learn and
+Tensorflow with Keras (see below for links etc). Moreover, the examples we
+introduce will serve as inputs to many of our discussions later, as
+well as allowing you to set up models and produce your own data and
+get started with programming.
-
- - 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.
- - 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.
- - Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning.
-
diff --git a/doc/pub/week34/html/._week34-bs019.html b/doc/pub/week34/html/._week34-bs019.html
index ecb4e968d..90bc2f587 100644
--- a/doc/pub/week34/html/._week34-bs019.html
+++ b/doc/pub/week34/html/._week34-bs019.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,18 +343,75 @@ MathJax.Hub.Config({
-Essential elements of ML
+What is Machine Learning?
-The methods we cover have three main topics in common, irrespective of
-whether we deal with supervised or unsupervised learning.
+
Statistics, data science and machine learning form important fields of
+research in modern science. They describe how to learn and make
+predictions from data, as well as allowing us to extract important
+correlations about physical process and the underlying laws of motion
+in large data sets. The latter, big data sets, appear frequently in
+essentially all disciplines, from the traditional Science, Technology,
+Mathematics and Engineering fields to Life Science, Law, education
+research, the Humanities and the Social Sciences.
+
+
+It has become more
+and more common to see research projects on big data in for example
+the Social Sciences where extracting patterns from complicated survey
+data is one of many research directions. Having a solid grasp of data
+analysis and machine learning is thus becoming central to scientific
+computing in many fields, and competences and skills within the fields
+of machine learning and scientific computing are nowadays strongly
+requested by many potential employers. The latter cannot be
+overstated, familiarity with machine learning has almost become a
+prerequisite for many of the most exciting employment opportunities,
+whether they are in bioinformatics, life science, physics or finance,
+in the private or the public sector. This author has had several
+students or met students who have been hired recently based on their
+skills and competences in scientific computing and data science, often
+with marginal knowledge of machine learning.
+
+
+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. Many of the methods we will study are also
+strongly rooted in basic mathematics and physics research.
+
+
+Ideally, machine learning represents 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. You should however always keep in mind that
+machines and algorithms are to a large extent developed by humans. The
+insights and knowledge we have about a specific system, play a central
+role when we develop a specific machine learning algorithm.
+
+
+Machine learning is an extremely rich field, in spite of its young
+age. The increases we have seen during the last three decades in
+computational capabilities have been followed by developments of
+methods and techniques for analyzing and handling large date sets,
+relying heavily on statistics, computer science and mathematics. The
+field is rather new and developing rapidly. Popular software packages
+written in Python for machine learning like
+Scikit-learn,
+Tensorflow,
+PyTorch and Keras, all
+freely available at their respective GitHub sites, encompass
+communities of developers in the thousands or more. And the number of
+code developers and contributors keeps increasing. Not all the
+algorithms and methods can be given a rigorous mathematical
+justification, opening up thereby large rooms for experimenting and
+trial and error and thereby exciting new developments. However, a
+solid command of linear algebra, multivariate theory, probability
+theory, statistical data analysis, understanding errors and Monte
+Carlo methods are central elements in a proper understanding of many
+of algorithms and methods we will discuss.
-
-
-- The first ingredient is normally our data set (which can be subdivided into training, validation and test data). Many find the most difficult part of using Machine Learning to be the set up of your data in a meaningful way.
-- The second item is a model which is normally a function of some parameters. The model reflects our knowledge of the system (or lack thereof). As an example, if we know that our data show a behavior similar to what would be predicted by a polynomial, fitting our data to a polynomial of some degree would then determin our model.
-- The last ingredient is a so-called cost/loss function (or error or risk function) which allows us to present an estimate on how good our model is in reproducing the data it is supposed to train.
-
-
@@ -373,7 +438,7 @@ whether we deal with supervised or unsupervised learning.
28
29
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs020.html b/doc/pub/week34/html/._week34-bs020.html
index bbcbcae60..2a7df2abb 100644
--- a/doc/pub/week34/html/._week34-bs020.html
+++ b/doc/pub/week34/html/._week34-bs020.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,10 +343,28 @@ MathJax.Hub.Config({
-An optimization/minimization problem
+Types of Machine Learning
-At the heart of basically all Machine Learning algorithms we will encounter so-called minimization or optimization algorithms. A large family of such methods are so-called gradient methods.
+The approaches to machine learning are many, but are often split into
+two main categories. In supervised learning we know the answer to a
+problem, and let the computer deduce the logic behind it. On the other
+hand, unsupervised learning 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
+reinforcement learning. This is a paradigm of learning inspired by
+behavioral psychology, where learning is achieved by trial-and-error,
+solely from rewards and punishment.
+
+Another way to categorize machine learning tasks is to consider the
+desired output of a system. Some of the most common tasks are:
+
+
+
+ - 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.
+ - 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.
+ - Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning.
+
diff --git a/doc/pub/week34/html/._week34-bs021.html b/doc/pub/week34/html/._week34-bs021.html
index f7e277367..38f0b19b3 100644
--- a/doc/pub/week34/html/._week34-bs021.html
+++ b/doc/pub/week34/html/._week34-bs021.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,35 +343,18 @@ MathJax.Hub.Config({
-A Frequentist approach to data analysis
+Essential elements of ML
-When you hear phrases like predictions and estimations and
-correlations and causations, what do you think of? May be you think
-of the difference between classifying new data points and generating
-new data points.
-Or perhaps you consider that correlations represent some kind of symmetric statements like
-if \( A \) is correlated with \( B \), then \( B \) is correlated with
-\( A \). Causation on the other hand is directional, that is if \( A \) causes \( B \), \( B \) does not
-necessarily cause \( A \).
-
-
-These concepts are in some sense the difference between machine
-learning and statistics. In machine learning and prediction based
-tasks, we are often interested in developing algorithms that are
-capable of learning patterns from given data in an automated fashion,
-and then using these learned patterns to make predictions or
-assessments of newly given data. In many cases, our primary concern
-is the quality of the predictions or assessments, and we are less
-concerned about the underlying patterns that were learned in order
-to make these predictions.
-
-
-In machine learning we normally use a so-called frequentist approach,
-where the aim is to make predictions and find correlations. We focus
-less on for example extracting a probability distribution function (PDF). The PDF can be
-used in turn to make estimations and find causations such as given \( A \)
-what is the likelihood of finding \( B \).
+
The methods we cover have three main topics in common, irrespective of
+whether we deal with supervised or unsupervised learning.
+
+
+- The first ingredient is normally our data set (which can be subdivided into training, validation and test data). Many find the most difficult part of using Machine Learning to be the set up of your data in a meaningful way.
+- The second item is a model which is normally a function of some parameters. The model reflects our knowledge of the system (or lack thereof). As an example, if we know that our data show a behavior similar to what would be predicted by a polynomial, fitting our data to a polynomial of some degree would then determin our model.
+- The last ingredient is a so-called cost/loss function (or error or risk function) which allows us to present an estimate on how good our model is in reproducing the data it is supposed to train.
+
+
@@ -390,7 +381,7 @@ what is the likelihood of finding \( B \).
30
31
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs022.html b/doc/pub/week34/html/._week34-bs022.html
index 79bcf29c2..052957b8d 100644
--- a/doc/pub/week34/html/._week34-bs022.html
+++ b/doc/pub/week34/html/._week34-bs022.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,32 +343,9 @@ MathJax.Hub.Config({
-What is a good model?
+An optimization/minimization problem
-In science and engineering we often end up in situations where we want to infer (or learn) a
-quantitative model \( M \) for a given set of sample points \( \boldsymbol{X} \in [x_1, x_2,\dots x_N] \).
-
-
-As we will see repeatedely in these lectures, we could try to fit these data points to a model given by a
-straight line, or if we wish to be more sophisticated to a more complex
-function.
-
-
-The reason for inferring such a model is that it
-serves many useful purposes. On the one hand, the model can reveal information
-encoded in the data or underlying mechanisms from which the data were generated. For instance, we could discover important
-corelations that relate interesting physics interpretations.
-
-
-In addition, it can simplify the representation of the given data set and help
-us in making predictions about future data samples.
-
-
-A first important consideration to keep in mind is that inferring the correct model
-for a given data set is an elusive, if not impossible, task. The fundamental difficulty
-is that if we are not specific about what we mean by a correct model, there
-could easily be many different models that fit the given data set equally well.
-
+At the heart of basically all Machine Learning algorithms we will encounter so-called minimization or optimization algorithms. A large family of such methods are so-called gradient methods.
@@ -387,7 +372,7 @@ could easily be many different models that fit the given data set equally we
31
32
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs023.html b/doc/pub/week34/html/._week34-bs023.html
index 1549569bc..fe9dd8108 100644
--- a/doc/pub/week34/html/._week34-bs023.html
+++ b/doc/pub/week34/html/._week34-bs023.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,30 +343,35 @@ MathJax.Hub.Config({
-What is a good model? Can we define it?
+A Frequentist approach to data analysis
-The central question is this: what leads us to say that a model is correct or
-optimal for a given data set? To make the model inference problem well posed, i.e.,
-to guarantee that there is a unique optimal model for the given data, we need to
-impose additional assumptions or restrictions on the class of models considered. To
-this end, we should not be looking for just any model that can describe the data.
-Instead, we should look for a model \( M \) that is the best among a restricted class
-of models. In addition, to make the model inference problem computationally
-tractable, we need to specify how restricted the class of models needs to be. A
-common strategy is to start
-with the simplest possible class of models that is just necessary to describe the data
-or solve the problem at hand. More precisely, the model class should be rich enough
-to contain at least one model that can fit the data to a desired accuracy and yet be
-restricted enough that it is relatively simple to find the best model for the given data.
+
When you hear phrases like predictions and estimations and
+correlations and causations, what do you think of? May be you think
+of the difference between classifying new data points and generating
+new data points.
+Or perhaps you consider that correlations represent some kind of symmetric statements like
+if \( A \) is correlated with \( B \), then \( B \) is correlated with
+\( A \). Causation on the other hand is directional, that is if \( A \) causes \( B \), \( B \) does not
+necessarily cause \( A \).
-Thus, the most popular strategy is to start from the
-simplest class of models and increase the complexity of the models only when the
-simpler models become inadequate. For instance, if we work with a regression problem to fit a set of sample points, one
-may first try the simplest class of models, namely linear models, followed obviously by more complex models.
+
These concepts are in some sense the difference between machine
+learning and statistics. In machine learning and prediction based
+tasks, we are often interested in developing algorithms that are
+capable of learning patterns from given data in an automated fashion,
+and then using these learned patterns to make predictions or
+assessments of newly given data. In many cases, our primary concern
+is the quality of the predictions or assessments, and we are less
+concerned about the underlying patterns that were learned in order
+to make these predictions.
-How to evaluate which model fits best the data is something we will come back to over and over again in these sets of lectures.
+In machine learning we normally use a so-called frequentist approach,
+where the aim is to make predictions and find correlations. We focus
+less on for example extracting a probability distribution function (PDF). The PDF can be
+used in turn to make estimations and find causations such as given \( A \)
+what is the likelihood of finding \( B \).
+
@@ -385,7 +398,7 @@ may first try the simplest class of models, namely linear models, followed obvio
32
33
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs024.html b/doc/pub/week34/html/._week34-bs024.html
index 8a8526070..5d4600ebc 100644
--- a/doc/pub/week34/html/._week34-bs024.html
+++ b/doc/pub/week34/html/._week34-bs024.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,43 +343,32 @@ MathJax.Hub.Config({
-Software and needed installations
+What is a good model?
-We will make extensive use of Python as programming language and its
-myriad of available libraries. You will find
-Jupyter notebooks invaluable in your work. You can run R
-codes in the Jupyter/IPython notebooks, with the immediate benefit of
-visualizing your data. You can also use compiled languages like C++,
-Rust, Julia, Fortran etc if you prefer. The focus in these lectures will be
-on Python.
+
In science and engineering we often end up in situations where we want to infer (or learn) a
+quantitative model \( M \) for a given set of sample points \( \boldsymbol{X} \in [x_1, x_2,\dots x_N] \).
-If you have Python installed (we strongly recommend Python3) and you feel
-pretty familiar with installing different packages, we recommend that
-you install the following Python packages via pip as
+
As we will see repeatedely in these lectures, we could try to fit these data points to a model given by a
+straight line, or if we wish to be more sophisticated to a more complex
+function.
-
-- pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow
-
-For Python3, replace pip with pip3.
-
-For OSX users we recommend, after having installed Xcode, to
-install brew. Brew allows for a seamless installation of additional
-software via for example
+
The reason for inferring such a model is that it
+serves many useful purposes. On the one hand, the model can reveal information
+encoded in the data or underlying mechanisms from which the data were generated. For instance, we could discover important
+corelations that relate interesting physics interpretations.
-
-- brew install python3
-
-For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
-you can use pip as well and simply install Python as
+
In addition, it can simplify the representation of the given data set and help
+us in making predictions about future data samples.
-
-- sudo apt-get install python3 (or python for pyhton2.7)
-
-etc etc.
+A first important consideration to keep in mind is that inferring the correct model
+for a given data set is an elusive, if not impossible, task. The fundamental difficulty
+is that if we are not specific about what we mean by a correct model, there
+could easily be many different models that fit the given data set equally well.
+
@@ -398,7 +395,7 @@ you can use pip as well and simply install Python as
33
34
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs025.html b/doc/pub/week34/html/._week34-bs025.html
index f25a18b9e..7f7b6bcc3 100644
--- a/doc/pub/week34/html/._week34-bs025.html
+++ b/doc/pub/week34/html/._week34-bs025.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,36 +343,30 @@ MathJax.Hub.Config({
-Python installers
+What is a good model? Can we define it?
-If you don't want to perform these operations separately and venture
-into the hassle of exploring how to set up dependencies and paths, we
-recommend two widely used distrubutions which set up all relevant
-dependencies for Python, namely
+
The central question is this: what leads us to say that a model is correct or
+optimal for a given data set? To make the model inference problem well posed, i.e.,
+to guarantee that there is a unique optimal model for the given data, we need to
+impose additional assumptions or restrictions on the class of models considered. To
+this end, we should not be looking for just any model that can describe the data.
+Instead, we should look for a model \( M \) that is the best among a restricted class
+of models. In addition, to make the model inference problem computationally
+tractable, we need to specify how restricted the class of models needs to be. A
+common strategy is to start
+with the simplest possible class of models that is just necessary to describe the data
+or solve the problem at hand. More precisely, the model class should be rich enough
+to contain at least one model that can fit the data to a desired accuracy and yet be
+restricted enough that it is relatively simple to find the best model for the given data.
-
-which is an open source
-distribution of the Python and R programming languages for large-scale
-data processing, predictive analytics, and scientific computing, that
-aims to simplify package management and deployment. Package versions
-are managed by the package management system conda.
+
Thus, the most popular strategy is to start from the
+simplest class of models and increase the complexity of the models only when the
+simpler models become inadequate. For instance, if we work with a regression problem to fit a set of sample points, one
+may first try the simplest class of models, namely linear models, followed obviously by more complex models.
-
-is a Python
-distribution for scientific and analytic computing distribution and
-analysis environment, available for free and under a commercial
-license.
-
-
-Furthermore, Google's Colab is a free Jupyter notebook environment that requires
-no setup and runs entirely in the cloud. Try it out!
-
+How to evaluate which model fits best the data is something we will come back to over and over again in these sets of lectures.
@@ -391,7 +393,7 @@ no setup and runs entirely in the cloud. Try it out!
34
35
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs026.html b/doc/pub/week34/html/._week34-bs026.html
index d1ed46eeb..20248bb28 100644
--- a/doc/pub/week34/html/._week34-bs026.html
+++ b/doc/pub/week34/html/._week34-bs026.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,23 +343,44 @@ MathJax.Hub.Config({
-Useful Python libraries
-Here we list several useful Python libraries we strongly recommend (if you use anaconda many of these are already there)
+Software and needed installations
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Julia, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+If you have Python installed (we strongly recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for pyhton2.7)
+
+etc etc.
-
-- NumPy is a highly popular library for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays
-- The pandas library provides high-performance, easy-to-use data structures and data analysis tools
-- Xarray is a Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!
-- Scipy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering.
-- Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.
-- Autograd can automatically differentiate native Python and Numpy code. It can handle a large subset of Python's features, including loops, ifs, recursion and closures, and it can even take derivatives of derivatives of derivatives
-- JAX has now more or less replaced Autograd. JAX is Autograd and XLA, brought together for high-performance numerical computing and machine learning research. It provides composable transformations of Python+NumPy programs: differentiate, vectorize, parallelize, Just-In-Time compile to GPU/TPU, and more.
-- SymPy is a Python library for symbolic mathematics.
-- scikit-learn has simple and efficient tools for machine learning, data mining and data analysis
-- TensorFlow is a Python library for fast numerical computing created and released by Google
-- Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano
-- And many more such as pytorch, Theano etc
-
diff --git a/doc/pub/week34/html/._week34-bs027.html b/doc/pub/week34/html/._week34-bs027.html
index d1aff13da..d8107bc69 100644
--- a/doc/pub/week34/html/._week34-bs027.html
+++ b/doc/pub/week34/html/._week34-bs027.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,22 +343,35 @@ MathJax.Hub.Config({
-Installing R, C++, cython or Julia
+Python installers
-You will also find it convenient to utilize R. We will mainly
-use Python during our lectures and in various projects and exercises.
-Those of you
-already familiar with R should feel free to continue using R, keeping
-however an eye on the parallel Python set ups. Similarly, if you are a
-Python afecionado, feel free to explore R as well. Jupyter(Julia, Python and R) /Ipython
-notebook allows you to run R codes and Julia codes interactively in your
-browser. The software library R is really tailored for statistical data analysis
-and allows for an easy usage of the tools and algorithms we will discuss in these
-lectures.
+
If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
-To install R with Jupyter notebook
-follow the link here
+
+which is an open source
+distribution of the Python and R programming languages for large-scale
+data processing, predictive analytics, and scientific computing, that
+aims to simplify package management and deployment. Package versions
+are managed by the package management system conda.
+
+
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+Furthermore, Google's Colab is a free Jupyter notebook environment that requires
+no setup and runs entirely in the cloud. Try it out!
@@ -378,7 +399,7 @@ lectures.
36
37
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs028.html b/doc/pub/week34/html/._week34-bs028.html
index 5d204ba8a..78dbf8ffb 100644
--- a/doc/pub/week34/html/._week34-bs028.html
+++ b/doc/pub/week34/html/._week34-bs028.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,54 +343,23 @@ MathJax.Hub.Config({
-Installing R, C++, cython, Numba etc
-
-For the C++ aficionados, 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++ (or Fortran or other compiled languages) as programming
-languages.
-
-
-To add more entropy, cython can also be used when running your
-notebooks. It means that Python with the jupyter notebook
-setup allows you to integrate widely popular softwares and tools for
-scientific computing. Similarly, the
-Numba Python package delivers increased performance
-capabilities with minimal rewrites of your codes. With its
-versatility, including symbolic operations, Python offers a unique
-computational environment. Your jupyter notebook can easily be
-converted into a nicely rendered PDF file or a Latex file for
-further processing. For example, convert to latex as
-
-
-
-
-
-
-And to add more versatility, the Python package SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) and is entirely written in Python.
-
-Finally, we recommend strongly using Autograd or JAX for automatic differentiation.
+Useful Python libraries
+Here we list several useful Python libraries we strongly recommend (if you use anaconda many of these are already there)
+
+- NumPy is a highly popular library for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays
+- The pandas library provides high-performance, easy-to-use data structures and data analysis tools
+- Xarray is a Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!
+- Scipy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering.
+- Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.
+- Autograd can automatically differentiate native Python and Numpy code. It can handle a large subset of Python's features, including loops, ifs, recursion and closures, and it can even take derivatives of derivatives of derivatives
+- JAX has now more or less replaced Autograd. JAX is Autograd and XLA, brought together for high-performance numerical computing and machine learning research. It provides composable transformations of Python+NumPy programs: differentiate, vectorize, parallelize, Just-In-Time compile to GPU/TPU, and more.
+- SymPy is a Python library for symbolic mathematics.
+- scikit-learn has simple and efficient tools for machine learning, data mining and data analysis
+- TensorFlow is a Python library for fast numerical computing created and released by Google
+- Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano
+- And many more such as pytorch, Theano etc
+
diff --git a/doc/pub/week34/html/._week34-bs029.html b/doc/pub/week34/html/._week34-bs029.html
index 375a1c0c6..095d1bfdf 100644
--- a/doc/pub/week34/html/._week34-bs029.html
+++ b/doc/pub/week34/html/._week34-bs029.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,19 +343,24 @@ MathJax.Hub.Config({
-Numpy examples and Important Matrix and vector handling packages
+Installing R, C++, cython or Julia
-There are several central software libraries for linear algebra and eigenvalue problems. Several of the more
-popular ones have been wrapped into ofter software packages like those from the widely used text Numerical Recipes. The original source codes in many of the available packages are often taken from the widely used
-software package LAPACK, which follows two other popular packages
-developed in the 1970s, namely EISPACK and LINPACK. We describe them shortly here.
+
You will also find it convenient to utilize R. We will mainly
+use Python during our lectures and in various projects and exercises.
+Those of you
+already familiar with R should feel free to continue using R, keeping
+however an eye on the parallel Python set ups. Similarly, if you are a
+Python afecionado, feel free to explore R as well. Jupyter(Julia, Python and R) /Ipython
+notebook allows you to run R codes and Julia codes interactively in your
+browser. The software library R is really tailored for statistical data analysis
+and allows for an easy usage of the tools and algorithms we will discuss in these
+lectures.
+
+
+To install R with Jupyter notebook
+follow the link here
-
- - LINPACK: package for linear equations and least square problems.
- - LAPACK:package for solving symmetric, unsymmetric and generalized eigenvalue problems. From LAPACK's website http://www.netlib.org it is possible to download for free all source codes from this library. Both C/C++ and Fortran versions are available.
- - BLAS (I, II and III): (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. Blas I is vector operations, II vector-matrix operations and III matrix-matrix operations. Highly parallelized and efficient codes, all available for download from http://www.netlib.org.
-
diff --git a/doc/pub/week34/html/._week34-bs030.html b/doc/pub/week34/html/._week34-bs030.html
index 6430d9ef8..b784ab532 100644
--- a/doc/pub/week34/html/._week34-bs030.html
+++ b/doc/pub/week34/html/._week34-bs030.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,136 +343,35 @@ MathJax.Hub.Config({
-Numpy and arrays
-Numpy provides an easy way to handle arrays in Python. The standard way to import this library is as
+Installing R, C++, cython, Numba etc
-
-
-
-
-Here follows a simple example where we set up an array of ten elements, all determined by random numbers drawn according to the normal distribution,
-
-
-
-
-We defined a vector \( x \) with \( n=10 \) elements with its values given by the Normal distribution \( N(0,1) \).
-Another alternative is to declare a vector as follows
+
For the C++ aficionados, 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++ (or Fortran or other compiled languages) as programming
+languages.
-
-
-
-Here we have defined a vector with three elements, with \( x_0=1 \), \( x_1=2 \) and \( x_2=3 \). Note that both Python and C++
-start numbering array elements from \( 0 \) and on. This means that a vector with \( n \) elements has a sequence of entities \( x_0, x_1, x_2, \dots, x_{n-1} \). We could also let (recommended) Numpy to compute the logarithms of a specific array as
-
-
-
-
-
-In the last example we used Numpy's unary function \( np.log \). This function is
-highly tuned to compute array elements since the code is vectorized
-and does not require looping. We normaly recommend that you use the
-Numpy intrinsic functions instead of the corresponding log function
-from Python's math module. The looping is done explicitely by the
-np.log function. The alternative, and slower way to compute the
-logarithms of a vector would be to write
+
To add more entropy, cython can also be used when running your
+notebooks. It means that Python with the jupyter notebook
+setup allows you to integrate widely popular softwares and tools for
+scientific computing. Similarly, the
+Numba Python package delivers increased performance
+capabilities with minimal rewrites of your codes. With its
+versatility, including symbolic operations, Python offers a unique
+computational environment. Your jupyter notebook can easily be
+converted into a nicely rendered PDF file or a Latex file for
+further processing. For example, convert to latex as
-
+
-
We note that our code is much longer already and we need to import the log function from the math module.
-The attentive reader will also notice that the output is \( [1, 1, 2] \). Python interprets automagically our numbers as integers (like the automatic keyword in C++). To change this we could define our array elements to be double precision numbers as
-
-
-
-
-
-
or simply write them as double precision numbers (Python uses 64 bits as default for floating point type variables), that is
-
-
-
-
-
To check the number of bytes (remember that one byte contains eight bits for double precision variables), you can use simple use the itemsize functionality (the array \( x \) is actually an object which inherits the functionalities defined in Numpy) as
-
-
-
+
And to add more versatility, the Python package SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) and is entirely written in Python.
+
Finally, we recommend strongly using Autograd or JAX for automatic differentiation.
@@ -586,7 +416,7 @@ x = np.l
39
40
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs031.html b/doc/pub/week34/html/._week34-bs031.html
index 84bd312b1..e60293f93 100644
--- a/doc/pub/week34/html/._week34-bs031.html
+++ b/doc/pub/week34/html/._week34-bs031.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,277 +343,19 @@ MathJax.Hub.Config({
-
Matrices in Python
+
Numpy examples and Important Matrix and vector handling packages
-
Having defined vectors, we are now ready to try out matrices. We can
-define a \( 3 \times 3 \) real matrix \( \boldsymbol{A} \) as (recall that we user
-lowercase letters for vectors and uppercase letters for matrices)
+
There are several central software libraries for linear algebra and eigenvalue problems. Several of the more
+popular ones have been wrapped into ofter software packages like those from the widely used text Numerical Recipes. The original source codes in many of the available packages are often taken from the widely used
+software package LAPACK, which follows two other popular packages
+developed in the 1970s, namely EISPACK and LINPACK. We describe them shortly here.
-
-
-
-
-
If we use the shape function we would get \( (3, 3) \) as output, that is verifying that our matrix is a \( 3\times 3 \) matrix. We can slice the matrix and print for example the first column (Python organized matrix elements in a row-major order, see below) as
-
-
-
-
-
We can continue this was by printing out other columns or rows. The example here prints out the second column
-
-
-
-
-
Numpy contains many other functionalities that allow us to slice, subdivide etc etc arrays. We strongly recommend that you look up the Numpy website for more details. Useful functions when defining a matrix are the np.zeros function which declares a matrix of a given dimension and sets all elements to zero
-
-
-
-
-
or initializing all elements to
-
-
-
-
-
or as unitarily distributed random numbers (see the material on random number generators in the statistics part)
-
-
-
-
-
As we will see throughout these lectures, there are several extremely useful functionalities in Numpy.
-As an example, consider the discussion of the covariance matrix. Suppose we have defined three vectors
-\( \boldsymbol{x}, \boldsymbol{y}, \boldsymbol{z} \) with \( n \) elements each. The covariance matrix is defined as
-
-$$
-\boldsymbol{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\
- \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\
- \sigma_{zx} & \sigma_{zy} & \sigma_{zz}
- \end{bmatrix},
-$$
-
-
where for example
-$$
-\sigma_{xy} =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}).
-$$
-
-
The Numpy function np.cov calculates the covariance elements using the factor \( 1/(n-1) \) instead of \( 1/n \) since it assumes we do not have the exact mean values.
-The following simple function uses the np.vstack function which takes each vector of dimension \( 1\times n \) and produces a \( 3\times n \) matrix \( \boldsymbol{W} \)
-
-$$
-\boldsymbol{W} = \begin{bmatrix} x_0 & x_1 & x_2 & \dots & x_{n-2} & x_{n-1} \\
- y_0 & y_1 & y_2 & \dots & y_{n-2} & y_{n-1} \\
- z_0 & z_1 & z_2 & \dots & z_{n-2} & z_{n-1} \\
- \end{bmatrix},
-$$
-
-
which in turn is converted into into the \( 3\times 3 \) covariance matrix
-\( \boldsymbol{\Sigma} \) via the Numpy function np.cov(). We note that we can also calculate
-the mean value of each set of samples \( \boldsymbol{x} \) etc using the Numpy
-function np.mean(x). We can also extract the eigenvalues of the
-covariance matrix through the np.linalg.eig() function.
-
-
-
-
-
-
-
-
-
-
-
+
+ - LINPACK: package for linear equations and least square problems.
+ - LAPACK:package for solving symmetric, unsymmetric and generalized eigenvalue problems. From LAPACK's website http://www.netlib.org it is possible to download for free all source codes from this library. Both C/C++ and Fortran versions are available.
+ - BLAS (I, II and III): (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. Blas I is vector operations, II vector-matrix operations and III matrix-matrix operations. Highly parallelized and efficient codes, all available for download from http://www.netlib.org.
+
diff --git a/doc/pub/week34/html/._week34-bs032.html b/doc/pub/week34/html/._week34-bs032.html
index cfaccfe40..4ccdf5091 100644
--- a/doc/pub/week34/html/._week34-bs032.html
+++ b/doc/pub/week34/html/._week34-bs032.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,23 +343,8 @@ MathJax.Hub.Config({
-
Meet the Pandas
-
-
-
-
-
-
-
-
Another useful Python package is
-pandas, which is an open source library
-providing high-performance, easy-to-use data structures and data
-analysis tools for Python. pandas stands for panel data, a term borrowed from econometrics and is an efficient library for data analysis with an emphasis on tabular data.
-pandas has two major classes, the DataFrame class with two-dimensional data objects and tabular data organized in columns and the class Series with a focus on one-dimensional data objects. Both classes allow you to index data easily as we will see in the examples below.
-pandas allows you also to perform mathematical operations on the data, spanning from simple reshapings of vectors and matrices to statistical operations.
-
-
-
The following simple example shows how we can, in an easy way make tables of our data. Here we define a data set which includes names, place of birth and date of birth, and displays the data in an easy to read way. We will see repeated use of pandas, in particular in connection with classification of data.
+
Numpy and arrays
+
Numpy provides an easy way to handle arrays in Python. The standard way to import this library is as
@@ -360,15 +353,7 @@ analysis tools for Python.
pandas stands for panel data, a term borrowed
@@ -384,11 +369,7 @@ display(data_pandas)
-
In the above we have imported pandas with the shorthand pd, the latter has become the standard way we import pandas. We make then a list of various variables
-and reorganize the aboves lists into a DataFrame and then print out a neat table with specific column labels as Name, place of birth and date of birth.
-Displaying these results, we see that the indices are given by the default numbers from zero to three.
-pandas is extremely flexible and we can easily change the above indices by defining a new type of indexing as
-
+
Here follows a simple example where we set up an array of ten elements, all determined by random numbers drawn according to the normal distribution,
@@ -396,8 +377,9 @@ Displaying these results, we see that the indices are given by the default numbe
@@ -413,62 +395,8 @@ display(data_pandas)
-
Thereafter we display the content of the row which begins with the index Aragorn
-
-
-
-
-
We can easily append data to this, for example
-
-
-
-
-
Here are other examples where we use the DataFrame functionality to handle arrays, now with more interesting features for us, namely numbers. We set up a matrix
-of dimensionality \( 10\times 5 \) and compute the mean value and standard deviation of each column. Similarly, we can perform mathematial operations like squaring the matrix elements and many other operations.
+
We defined a vector \( x \) with \( n=10 \) elements with its values given by the Normal distribution \( N(0,1) \).
+Another alternative is to declare a vector as follows
@@ -478,18 +406,8 @@ of dimensionality \( 10\times 5 \) and compute the mean value and standard devia
@@ -505,84 +423,152 @@ display(df
**2)
-Thereafter we can select specific columns only and plot final results
-
-
-
-
-We can produce a \( 4\times 4 \) matrix
-
-
-
-
-and many other operations.
-
-The Series class is another important class included in
-pandas. You can view it as a specialization of DataFrame but where
-we have just a single column of data. It shares many of the same features as DataFrame. As with DataFrame,
-most operations are vectorized, achieving thereby a high performance when dealing with computations of arrays, in particular labeled arrays.
-As we will see below it leads also to a very concice code close to the mathematical operations we may be interested in.
-For multidimensional arrays, we recommend strongly xarray. xarray has much of the same flexibility as pandas, but allows for the extension to higher dimensions than two. We will see examples later of the usage of both pandas and xarray.
+
Here we have defined a vector with three elements, with \( x_0=1 \), \( x_1=2 \) and \( x_2=3 \). Note that both Python and C++
+start numbering array elements from \( 0 \) and on. This means that a vector with \( n \) elements has a sequence of entities \( x_0, x_1, x_2, \dots, x_{n-1} \). We could also let (recommended) Numpy to compute the logarithms of a specific array as
+
+
+
+In the last example we used Numpy's unary function \( np.log \). This function is
+highly tuned to compute array elements since the code is vectorized
+and does not require looping. We normaly recommend that you use the
+Numpy intrinsic functions instead of the corresponding log function
+from Python's math module. The looping is done explicitely by the
+np.log function. The alternative, and slower way to compute the
+logarithms of a vector would be to write
+
+
+
+
+
+
+We note that our code is much longer already and we need to import the log function from the math module.
+The attentive reader will also notice that the output is \( [1, 1, 2] \). Python interprets automagically our numbers as integers (like the automatic keyword in C++). To change this we could define our array elements to be double precision numbers as
+
+
+
+
+
+or simply write them as double precision numbers (Python uses 64 bits as default for floating point type variables), that is
+
+
+
+
+To check the number of bytes (remember that one byte contains eight bits for double precision variables), you can use simple use the itemsize functionality (the array \( x \) is actually an object which inherits the functionalities defined in Numpy) as
+
+
+
+
+
diff --git a/doc/pub/week34/html/._week34-bs033.html b/doc/pub/week34/html/._week34-bs033.html
index b9d74b0c5..6b9c8290b 100644
--- a/doc/pub/week34/html/._week34-bs033.html
+++ b/doc/pub/week34/html/._week34-bs033.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,55 +343,209 @@ MathJax.Hub.Config({
-Simple linear regression model using scikit-learn
+Matrices in Python
-We start with perhaps our simplest possible example, using Scikit-Learn to perform linear regression analysis on a data set produced by us.
-
-What follows is a simple Python code where we have defined a function
-\( y \) in terms of the variable \( x \). Both are defined as vectors with \( 100 \) entries.
-The numbers in the vector \( \boldsymbol{x} \) are given
-by random numbers generated with a uniform distribution with entries
-\( x_i \in [0,1] \) (more about probability distribution functions
-later). These values are then used to define a function \( y(x) \)
-(tabulated again as a vector) with a linear dependence on \( x \) plus a
-random noise added via the normal distribution.
+
Having defined vectors, we are now ready to try out matrices. We can
+define a \( 3 \times 3 \) real matrix \( \boldsymbol{A} \) as (recall that we user
+lowercase letters for vectors and uppercase letters for matrices)
-The Numpy functions are imported used the import numpy as np
-statement and the random number generator for the uniform distribution
-is called using the function np.random.rand(), where we specificy
-that we want \( 100 \) random variables. Using Numpy we define
-automatically an array with the specified number of elements, \( 100 \) in
-our case. With the Numpy function randn() we can compute random
-numbers with the normal distribution (mean value \( \mu \) equal to zero and
-variance \( \sigma^2 \) set to one) and produce the values of \( y \) assuming a linear
-dependence as function of \( x \)
-
+
+
+
+If we use the shape function we would get \( (3, 3) \) as output, that is verifying that our matrix is a \( 3\times 3 \) matrix. We can slice the matrix and print for example the first column (Python organized matrix elements in a row-major order, see below) as
+
+
+
+
+We can continue this was by printing out other columns or rows. The example here prints out the second column
+
+
+
+
+Numpy contains many other functionalities that allow us to slice, subdivide etc etc arrays. We strongly recommend that you look up the Numpy website for more details. Useful functions when defining a matrix are the np.zeros function which declares a matrix of a given dimension and sets all elements to zero
+
+
+
+
+or initializing all elements to
+
+
+
+
+or as unitarily distributed random numbers (see the material on random number generators in the statistics part)
+
+
+
+
+As we will see throughout these lectures, there are several extremely useful functionalities in Numpy.
+As an example, consider the discussion of the covariance matrix. Suppose we have defined three vectors
+\( \boldsymbol{x}, \boldsymbol{y}, \boldsymbol{z} \) with \( n \) elements each. The covariance matrix is defined as
+
$$
-y = 2x+N(0,1),
+\boldsymbol{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\
+ \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\
+ \sigma_{zx} & \sigma_{zy} & \sigma_{zz}
+ \end{bmatrix},
$$
-where \( N(0,1) \) represents random numbers generated by the normal
-distribution. From Scikit-Learn we import then the
-LinearRegression functionality and make a prediction \( \tilde{y} =
-\alpha + \beta x \) using the function fit(x,y). We call the set of
-data \( (\boldsymbol{x},\boldsymbol{y}) \) for our training data. The Python package
-scikit-learn has also a functionality which extracts the above
-fitting parameters \( \alpha \) and \( \beta \) (see below). Later we will
-distinguish between training data and test data.
+
where for example
+$$
+\sigma_{xy} =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}).
+$$
+
+The Numpy function np.cov calculates the covariance elements using the factor \( 1/(n-1) \) instead of \( 1/n \) since it assumes we do not have the exact mean values.
+The following simple function uses the np.vstack function which takes each vector of dimension \( 1\times n \) and produces a \( 3\times n \) matrix \( \boldsymbol{W} \)
+
+$$
+\boldsymbol{W} = \begin{bmatrix} x_0 & x_1 & x_2 & \dots & x_{n-2} & x_{n-1} \\
+ y_0 & y_1 & y_2 & \dots & y_{n-2} & y_{n-1} \\
+ z_0 & z_1 & z_2 & \dots & z_{n-2} & z_{n-1} \\
+ \end{bmatrix},
+$$
+
+which in turn is converted into into the \( 3\times 3 \) covariance matrix
+\( \boldsymbol{\Sigma} \) via the Numpy function np.cov(). We note that we can also calculate
+the mean value of each set of samples \( \boldsymbol{x} \) etc using the Numpy
+function np.mean(x). We can also extract the eigenvalues of the
+covariance matrix through the np.linalg.eig() function.
-For plotting we use the Python package
-matplotlib which produces publication
-quality figures. Feel free to explore the extensive
-gallery of examples. In
-this example we plot our original values of \( x \) and \( y \) as well as the
-prediction ypredict (\( \tilde{y} \)), which attempts at fitting our
-data with a straight line.
-
-
-The Python code follows here.
@@ -393,23 +555,19 @@ data with a straight line.
# Importing various packages
import numpy as np
-import matplotlib.pyplot as plt
-from sklearn.linear_model import LinearRegression
-x = np.random.rand(100,1)
-y = 2*x+np.random.randn(100,1)
-linreg = LinearRegression()
-linreg.fit(x,y)
-xnew = np.array([[0],[1]])
-ypredict = linreg.predict(xnew)
-
-plt.plot(xnew, ypredict, "r-")
-plt.plot(x, y ,'ro')
-plt.axis([0,1.0,0, 5.0])
-plt.xlabel(r'$x$')
-plt.ylabel(r'$y$')
-plt.title(r'Simple Linear Regression')
-plt.show()
+n = 100
+x = np.random.normal(size=n)
+print(np.mean(x))
+y = 4+3*x+np.random.normal(size=n)
+print(np.mean(y))
+z = x**3+np.random.normal(size=n)
+print(np.mean(z))
+W = np.vstack((x, y, z))
+Sigma = np.cov(W)
+print(Sigma)
+Eigvals, Eigvecs = np.linalg.eig(Sigma)
+print(Eigvals)
@@ -423,81 +581,6 @@ plt.show()
-
-
-This example serves several aims. It allows us to demonstrate several
-aspects of data analysis and later machine learning algorithms. The
-immediate visualization shows that our linear fit is not
-impressive. It goes through the data points, but there are many
-outliers which are not reproduced by our linear regression. We could
-now play around with this small program and change for example the
-factor in front of \( x \) and the normal distribution. Try to change the
-function \( y \) to
-
-
-$$
-y = 10x+0.01 \times N(0,1),
-$$
-
-where \( x \) is defined as before. Does the fit look better? Indeed, by
-reducing the role of the noise given by the normal distribution we see immediately that
-our linear prediction seemingly reproduces better the training
-set. However, this testing 'by the eye' is obviouly not satisfactory in the
-long run. Here we have only defined the training data and our model, and
-have not discussed a more rigorous approach to the cost function.
-
-
-We need more rigorous criteria in defining whether we have succeeded or
-not in modeling our training data. You will be surprised to see that
-many scientists seldomly venture beyond this 'by the eye' approach. A
-standard approach for the cost function is the so-called \( \chi^2 \)
-function (a variant of the mean-squared error (MSE))
-
-
-$$ \chi^2 = \frac{1}{n}
-\sum_{i=0}^{n-1}\frac{(y_i-\tilde{y}_i)^2}{\sigma_i^2},
-$$
-
-where \( \sigma_i^2 \) is the variance (to be defined later) of the entry
-\( y_i \). We may not know the explicit value of \( \sigma_i^2 \), it serves
-however the aim of scaling the equations and make the cost function
-dimensionless.
-
-
-Minimizing the cost function is a central aspect of
-our discussions to come. Finding its minima as function of the model
-parameters (\( \alpha \) and \( \beta \) in our case) will be a recurring
-theme in these series of lectures. Essentially all machine learning
-algorithms we will discuss center around the minimization of the
-chosen cost function. This depends in turn on our specific
-model for describing the data, a typical situation in supervised
-learning. Automatizing the search for the minima of the cost function is a
-central ingredient in all algorithms. Typical methods which are
-employed are various variants of gradient methods. These will be
-discussed in more detail later. Again, you'll be surprised to hear that
-many practitioners minimize the above function ''by the eye', popularly dubbed as
-'chi by the eye'. That is, change a parameter and see (visually and numerically) that
-the \( \chi^2 \) function becomes smaller.
-
-
-There are many ways to define the cost function. A simpler approach is to look at the relative difference between the training data and the predicted data, that is we define
-the relative error (why would we prefer the MSE instead of the relative error?) as
-
-
-$$
-\epsilon_{\mathrm{relative}}= \frac{\vert \boldsymbol{y} -\boldsymbol{\tilde{y}}\vert}{\vert \boldsymbol{y}\vert}.
-$$
-
-The squared cost function results in an arithmetic mean-unbiased
-estimator, and the absolute-value cost function results in a
-median-unbiased estimator (in the one-dimensional case, and a
-geometric median-unbiased estimator for the multi-dimensional
-case). The squared cost function has the disadvantage that it has the tendency
-to be dominated by outliers.
-
-
-We can modify easily the above Python code and plot the relative error instead
-
-Depending on the parameter in front of the normal distribution, we may
-have a small or larger relative error. Try to play around with
-different training data sets and study (graphically) the value of the
-relative error.
-
-
-As mentioned above, Scikit-Learn has an impressive functionality.
-We can for example extract the values of \( \alpha \) and \( \beta \) and
-their error estimates, or the variance and standard deviation and many
-other properties from the statistical data analysis.
-
-
-Here we show an
-example of the functionality of Scikit-Learn.
-
-
-
-
-
-The function coef gives us the parameter \( \beta \) of our fit while intercept yields
-\( \alpha \). Depending on the constant in front of the normal distribution, we get values near or far from \( \alpha =2 \) and \( \beta =5 \). Try to play around with different parameters in front of the normal distribution. The function meansquarederror gives us the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error or loss defined as
-
-$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
-$$
-
-The smaller the value, the better the fit. Ideally we would like to
-have an MSE equal zero. The attentive reader has probably recognized
-this function as being similar to the \( \chi^2 \) function defined above.
-
-
-The r2score function computes \( R^2 \), the coefficient of
-determination. It provides a measure of how well future samples are
-likely to be predicted by the model. Best possible score is 1.0 and it
-can be negative (because the model can be arbitrarily worse). A
-constant model that always predicts the expected value of \( \boldsymbol{y} \),
-disregarding the input features, would get a \( R^2 \) score of \( 0.0 \).
-
-
-If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
-$$
-R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
-$$
-
-where we have defined the mean value of \( \boldsymbol{y} \) as
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-Another quantity taht we will meet again in our discussions of regression analysis is
- the mean absolute error (MAE), a risk metric corresponding to the expected value of the absolute error loss or what we call the \( l1 \)-norm loss. In our discussion above we presented the relative error.
-The MAE is defined as follows
-
-$$
-\text{MAE}(\boldsymbol{y}, \boldsymbol{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n-1} \left| y_i - \tilde{y}_i \right|.
-$$
-
-We present the
-squared logarithmic (quadratic) error
-
-$$
-\text{MSLE}(\boldsymbol{y}, \boldsymbol{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n - 1} (\log_e (1 + y_i) - \log_e (1 + \tilde{y}_i) )^2,
-$$
-
-where \( \log_e (x) \) stands for the natural logarithm of \( x \). This error
-estimate is best to use when targets having exponential growth, such
-as population counts, average sales of a commodity over a span of
-years etc.
-
-
-Finally, another cost function is the Huber cost function used in robust regression.
-
-The rationale behind this possible cost function is its reduced
-sensitivity to outliers in the data set. In our discussions on
-dimensionality reduction and normalization of data we will meet other
-ways of dealing with outliers.
-
-
-The Huber cost function is defined as
-$$
-H_{\delta}(\boldsymbol{a})=\left\{\begin{array}{cc}\frac{1}{2} \boldsymbol{a}^{2}& \text{for }|\boldsymbol{a}|\leq \delta\\ \delta (|\boldsymbol{a}|-\frac{1}{2}\delta ),&\text{otherwise}.\end{array}\right.
-$$
-
-Here \( \boldsymbol{a}=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
-
-We will discuss in more detail these and other functions in the
-various lectures and lab sessions.
-
-To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
-Let us now dive into nuclear physics and remind ourselves briefly about some basic features about binding
-energies. A basic quantity which can be measured for the ground
-states of nuclei is the atomic mass \( M(N, Z) \) of the neutral atom with
-atomic mass number \( A \) and charge \( Z \). The number of neutrons is \( N \). There are indeed several sophisticated experiments worldwide which allow us to measure this quantity to high precision (parts per million even).
-
-
-Atomic masses are usually tabulated in terms of the mass excess defined by
-$$
-\Delta M(N, Z) = M(N, Z) - uA,
-$$
-
-where \( u \) is the Atomic Mass Unit
-$$
-u = M(^{12}\mathrm{C})/12 = 931.4940954(57) \hspace{0.1cm} \mathrm{MeV}/c^2.
-$$
-
-The nucleon masses are
-$$
-m_p = 1.00727646693(9)u,
-$$
-
-and
-$$
-m_n = 939.56536(8)\hspace{0.1cm} \mathrm{MeV}/c^2 = 1.0086649156(6)u.
-$$
-
-In the 2016 mass evaluation of by W.J.Huang, G.Audi, M.Wang, F.G.Kondev, S.Naimi and X.Xu
-there are data on masses and decays of 3437 nuclei.
-
-
-The nuclear binding energy is defined as the energy required to break
-up a given nucleus into its constituent parts of \( N \) neutrons and \( Z \)
-protons. In terms of the atomic masses \( M(N, Z) \) the binding energy is
-defined by
-
-
-$$
-BE(N, Z) = ZM_H c^2 + Nm_n c^2 - M(N, Z)c^2 ,
-$$
-
-where \( M_H \) is the mass of the hydrogen atom and \( m_n \) is the mass of the neutron.
-In terms of the mass excess the binding energy is given by
-
-$$
-BE(N, Z) = Z\Delta_H c^2 + N\Delta_n c^2 -\Delta(N, Z)c^2 ,
-$$
-
-where \( \Delta_H c^2 = 7.2890 \) MeV and \( \Delta_n c^2 = 8.0713 \) MeV.
-
-A popular and physically intuitive model which can be used to parametrize
-the experimental binding energies as function of \( A \), is the so-called
-liquid drop model. The ansatz is based on the following expression
-
-
-$$
-BE(N,Z) = a_1A-a_2A^{2/3}-a_3\frac{Z^2}{A^{1/3}}-a_4\frac{(N-Z)^2}{A},
-$$
-
-where \( A \) stands for the number of nucleons and the $a_i$s are parameters which are determined by a fit
-to the experimental data.
-
-
-To arrive at the above expression we have assumed that we can make the following assumptions:
-
-
- - There is a volume term \( a_1A \) proportional with the number of nucleons (the energy is also an extensive quantity). When an assembly of nucleons of the same size is packed together into the smallest volume, each interior nucleon has a certain number of other nucleons in contact with it. This contribution is proportional to the volume.
- - There is a surface energy term \( a_2A^{2/3} \). The assumption here is that a nucleon at the surface of a nucleus interacts with fewer other nucleons than one in the interior of the nucleus and hence its binding energy is less. This surface energy term takes that into account and is therefore negative and is proportional to the surface area.
- - There is a Coulomb energy term \( a_3\frac{Z^2}{A^{1/3}} \). The electric repulsion between each pair of protons in a nucleus yields less binding.
- - There is an asymmetry term \( a_4\frac{(N-Z)^2}{A} \). This term is associated with the Pauli exclusion principle and reflects the fact that the proton-neutron interaction is more attractive on the average than the neutron-neutron and proton-proton interactions.
-
-We could also add a so-called pairing term, which is a correction term that
-arises from the tendency of proton pairs and neutron pairs to
-occur. An even number of particles is more stable than an odd number.
-
-Organizing our data
-
-Let us start with reading and organizing our data.
-We start with the compilation of masses and binding energies from 2016.
-After having downloaded this file to our own computer, we are now ready to read the file and start structuring our data.
-
-
-We start with preparing folders for storing our calculations and the data file over masses and binding energies. We import also various modules that we will find useful in order to present various Machine Learning methods. Here we focus mainly on the functionality of scikit-learn.
-
-
-
-
-Before we proceed, we define also a function for making our plots. You can obviously avoid this and simply set up various matplotlib commands every time you need them. You may however find it convenient to collect all such commands in one function and simply call this function.
-
-
-
-
-Our next step is to read the data on experimental binding energies and
-reorganize them as functions of the mass number \( A \), the number of
-protons \( Z \) and neutrons \( N \) using pandas. Before we do this it is
-always useful (unless you have a binary file or other types of compressed
-data) to actually open the file and simply take a look at it!
-
-
-In particular, the program that outputs the final nuclear masses is written in Fortran with a specific format. It means that we need to figure out the format and which columns contain the data we are interested in. Pandas comes with a function that reads formatted output. After having admired the file, we are now ready to start massaging it with pandas. The file begins with some basic format information.
-
-
-
-
-The data we are interested in are in columns 2, 3, 4 and 11, giving us
-the number of neutrons, protons, mass numbers and binding energies,
-respectively. We add also for the sake of completeness the element name. The data are in fixed-width formatted lines and we will
-covert them into the pandas DataFrame structure.
-
-
-
-
-
-
-We have now read in the data, grouped them according to the variables we are interested in.
-We see how easy it is to reorganize the data using pandas. If we
-were to do these operations in C/C++ or Fortran, we would have had to
-write various functions/subroutines which perform the above
-reorganizations for us. Having reorganized the data, we can now start
-to make some simple fits using both the functionalities in numpy and
-Scikit-Learn afterwards.
-
-
-Now we define five variables which contain
-the number of nucleons \( A \), the number of protons \( Z \) and the number of neutrons \( N \), the element name and finally the energies themselves.
-
-
-
-
-
-The next step, and we will define this mathematically later, is to set up the so-called design matrix. We will throughout call this matrix \( \boldsymbol{X} \).
-It has dimensionality \( p\times n \), where \( n \) is the number of data points and \( p \) are the so-called predictors. In our case here they are given by the number of polynomials in \( A \) we wish to include in the fit.
-
-
-
-
-
-With scikitlearn we are now ready to use linear regression and fit our data.
-
-
-
-
-Pretty simple!
-Now we can print measures of how our fit is doing, the coefficients from the fits and plot the final fit together with our data.
-
-
-
-
-And what about using neural networks?
-The seaborn package allows us to visualize data in an efficient way. Note that we use scikit-learn's multi-layer perceptron (or feed forward neural network)
-functionality.
-
-
-
-
-A first summary
-
-The aim behind these introductory words was to present to you various
-Python libraries and their functionalities, in particular libraries like
-numpy, pandas, xarray and matplotlib and other that make our life much easier
-in handling various data sets and visualizing data.
-
-
-Furthermore,
-Scikit-Learn allows us with few lines of code to implement popular
-Machine Learning algorithms for supervised learning. Later we will meet Tensorflow, a powerful library for deep learning.
-Now it is time to dive more into the details of various methods. We will start with linear regression and try to take a deeper look at what it entails.
-
@@ -1161,7 +639,7 @@ Now it is time to dive more into the details of various methods. We will start w
42
43
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs034.html b/doc/pub/week34/html/._week34-bs034.html
index ce6e498af..ba8f13f31 100644
--- a/doc/pub/week34/html/._week34-bs034.html
+++ b/doc/pub/week34/html/._week34-bs034.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,22 +343,252 @@ MathJax.Hub.Config({
-Why Linear Regression (aka Ordinary Least Squares and family)
+Meet the Pandas
-Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\beta} \).
-
-- Method of choice for fitting a continuous function!
-- Gives an excellent introduction to central Machine Learning features with understandable pedagogical links to other methods like Neural Networks, Support Vector Machines etc
-- Analytical expression for the fitting parameters \( \boldsymbol{\beta} \)
-- Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more
-- Analytical relation with probabilistic interpretations
-- Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics
-- Easy to code! And links well with classification problems and logistic regression and neural networks
-- Allows for easy hands-on understanding of gradient descent methods
-- and many more features
-
-For more discussions of Ridge and Lasso regression, Wessel van Wieringen's article is highly recommended.
-Similarly, Mehta et al's article is also recommended.
+
+
+
+
+
+
+Another useful Python package is
+pandas, which is an open source library
+providing high-performance, easy-to-use data structures and data
+analysis tools for Python. pandas stands for panel data, a term borrowed from econometrics and is an efficient library for data analysis with an emphasis on tabular data.
+pandas has two major classes, the DataFrame class with two-dimensional data objects and tabular data organized in columns and the class Series with a focus on one-dimensional data objects. Both classes allow you to index data easily as we will see in the examples below.
+pandas allows you also to perform mathematical operations on the data, spanning from simple reshapings of vectors and matrices to statistical operations.
+
+
+The following simple example shows how we can, in an easy way make tables of our data. Here we define a data set which includes names, place of birth and date of birth, and displays the data in an easy to read way. We will see repeated use of pandas, in particular in connection with classification of data.
+
+
+
+
+
+In the above we have imported pandas with the shorthand pd, the latter has become the standard way we import pandas. We make then a list of various variables
+and reorganize the aboves lists into a DataFrame and then print out a neat table with specific column labels as Name, place of birth and date of birth.
+Displaying these results, we see that the indices are given by the default numbers from zero to three.
+pandas is extremely flexible and we can easily change the above indices by defining a new type of indexing as
+
+
+
+
+
+Thereafter we display the content of the row which begins with the index Aragorn
+
+
+
+
+We can easily append data to this, for example
+
+
+
+
+Here are other examples where we use the DataFrame functionality to handle arrays, now with more interesting features for us, namely numbers. We set up a matrix
+of dimensionality \( 10\times 5 \) and compute the mean value and standard deviation of each column. Similarly, we can perform mathematial operations like squaring the matrix elements and many other operations.
+
+
+
+
+
+Thereafter we can select specific columns only and plot final results
+
+
+
+
+We can produce a \( 4\times 4 \) matrix
+
+
+
+
+and many other operations.
+
+The Series class is another important class included in
+pandas. You can view it as a specialization of DataFrame but where
+we have just a single column of data. It shares many of the same features as DataFrame. As with DataFrame,
+most operations are vectorized, achieving thereby a high performance when dealing with computations of arrays, in particular labeled arrays.
+As we will see below it leads also to a very concice code close to the mathematical operations we may be interested in.
+For multidimensional arrays, we recommend strongly xarray. xarray has much of the same flexibility as pandas, but allows for the extension to higher dimensions than two. We will see examples later of the usage of both pandas and xarray.
@@ -378,7 +616,7 @@ Similarly, Mehta et al
43
44
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs035.html b/doc/pub/week34/html/._week34-bs035.html
index 31dbbae4d..8c8bb6edf 100644
--- a/doc/pub/week34/html/._week34-bs035.html
+++ b/doc/pub/week34/html/._week34-bs035.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,25 +343,806 @@ MathJax.Hub.Config({
-
Regression analysis, overarching aims
-
-
-
+
Simple linear regression model using scikit-learn
-
Regression modeling deals with the description of the sampling distribution of a given random variable \( y \) and how it varies as function of another variable or a set of such variables \( \boldsymbol{x} =[x_0, x_1,\dots, x_{n-1}]^T \).
-The first variable is called the dependent, the outcome or the response variable while the set of variables \( \boldsymbol{x} \) is called the independent variable, or the predictor variable or the explanatory variable.
+
We start with perhaps our simplest possible example, using Scikit-Learn to perform linear regression analysis on a data set produced by us.
+
+
What follows is a simple Python code where we have defined a function
+\( y \) in terms of the variable \( x \). Both are defined as vectors with \( 100 \) entries.
+The numbers in the vector \( \boldsymbol{x} \) are given
+by random numbers generated with a uniform distribution with entries
+\( x_i \in [0,1] \) (more about probability distribution functions
+later). These values are then used to define a function \( y(x) \)
+(tabulated again as a vector) with a linear dependence on \( x \) plus a
+random noise added via the normal distribution.
-
A regression model aims at finding a likelihood function \( p(\boldsymbol{y}\vert \boldsymbol{x}) \), that is the conditional distribution for \( \boldsymbol{y} \) with a given \( \boldsymbol{x} \). The estimation of \( p(\boldsymbol{y}\vert \boldsymbol{x}) \) is made using a data set with
-
-- \( n \) cases \( i = 0, 1, 2, \dots, n-1 \)
-- Response (target, dependent or outcome) variable \( y_i \) with \( i = 0, 1, 2, \dots, n-1 \)
-- \( p \) so-called explanatory (independent or predictor) variables \( \boldsymbol{x}_i=[x_{i0}, x_{i1}, \dots, x_{ip-1}] \) with \( i = 0, 1, 2, \dots, n-1 \) and explanatory variables running from \( 0 \) to \( p-1 \). See below for more explicit examples.
-
-
The goal of the regression analysis is to extract/exploit relationship between \( \boldsymbol{y} \) and \( \boldsymbol{x} \) in or to infer causal dependencies, approximations to the likelihood functions, functional relationships and to make predictions, making fits and many other things.
+
The Numpy functions are imported used the import numpy as np
+statement and the random number generator for the uniform distribution
+is called using the function np.random.rand(), where we specificy
+that we want \( 100 \) random variables. Using Numpy we define
+automatically an array with the specified number of elements, \( 100 \) in
+our case. With the Numpy function randn() we can compute random
+numbers with the normal distribution (mean value \( \mu \) equal to zero and
+variance \( \sigma^2 \) set to one) and produce the values of \( y \) assuming a linear
+dependence as function of \( x \)
+
+
+$$
+y = 2x+N(0,1),
+$$
+
+
where \( N(0,1) \) represents random numbers generated by the normal
+distribution. From Scikit-Learn we import then the
+LinearRegression functionality and make a prediction \( \tilde{y} =
+\alpha + \beta x \) using the function fit(x,y). We call the set of
+data \( (\boldsymbol{x},\boldsymbol{y}) \) for our training data. The Python package
+scikit-learn has also a functionality which extracts the above
+fitting parameters \( \alpha \) and \( \beta \) (see below). Later we will
+distinguish between training data and test data.
+
+
+
For plotting we use the Python package
+matplotlib which produces publication
+quality figures. Feel free to explore the extensive
+gallery of examples. In
+this example we plot our original values of \( x \) and \( y \) as well as the
+prediction ypredict (\( \tilde{y} \)), which attempts at fitting our
+data with a straight line.
+
+
+
The Python code follows here.
+
+
+
+
This example serves several aims. It allows us to demonstrate several
+aspects of data analysis and later machine learning algorithms. The
+immediate visualization shows that our linear fit is not
+impressive. It goes through the data points, but there are many
+outliers which are not reproduced by our linear regression. We could
+now play around with this small program and change for example the
+factor in front of \( x \) and the normal distribution. Try to change the
+function \( y \) to
+
+
+$$
+y = 10x+0.01 \times N(0,1),
+$$
+
+
where \( x \) is defined as before. Does the fit look better? Indeed, by
+reducing the role of the noise given by the normal distribution we see immediately that
+our linear prediction seemingly reproduces better the training
+set. However, this testing 'by the eye' is obviouly not satisfactory in the
+long run. Here we have only defined the training data and our model, and
+have not discussed a more rigorous approach to the cost function.
+
+
+
We need more rigorous criteria in defining whether we have succeeded or
+not in modeling our training data. You will be surprised to see that
+many scientists seldomly venture beyond this 'by the eye' approach. A
+standard approach for the cost function is the so-called \( \chi^2 \)
+function (a variant of the mean-squared error (MSE))
+
+
+$$ \chi^2 = \frac{1}{n}
+\sum_{i=0}^{n-1}\frac{(y_i-\tilde{y}_i)^2}{\sigma_i^2},
+$$
+
+
where \( \sigma_i^2 \) is the variance (to be defined later) of the entry
+\( y_i \). We may not know the explicit value of \( \sigma_i^2 \), it serves
+however the aim of scaling the equations and make the cost function
+dimensionless.
+
+
+
Minimizing the cost function is a central aspect of
+our discussions to come. Finding its minima as function of the model
+parameters (\( \alpha \) and \( \beta \) in our case) will be a recurring
+theme in these series of lectures. Essentially all machine learning
+algorithms we will discuss center around the minimization of the
+chosen cost function. This depends in turn on our specific
+model for describing the data, a typical situation in supervised
+learning. Automatizing the search for the minima of the cost function is a
+central ingredient in all algorithms. Typical methods which are
+employed are various variants of gradient methods. These will be
+discussed in more detail later. Again, you'll be surprised to hear that
+many practitioners minimize the above function ''by the eye', popularly dubbed as
+'chi by the eye'. That is, change a parameter and see (visually and numerically) that
+the \( \chi^2 \) function becomes smaller.
+
+
+
There are many ways to define the cost function. A simpler approach is to look at the relative difference between the training data and the predicted data, that is we define
+the relative error (why would we prefer the MSE instead of the relative error?) as
+
+
+$$
+\epsilon_{\mathrm{relative}}= \frac{\vert \boldsymbol{y} -\boldsymbol{\tilde{y}}\vert}{\vert \boldsymbol{y}\vert}.
+$$
+
+
The squared cost function results in an arithmetic mean-unbiased
+estimator, and the absolute-value cost function results in a
+median-unbiased estimator (in the one-dimensional case, and a
+geometric median-unbiased estimator for the multi-dimensional
+case). The squared cost function has the disadvantage that it has the tendency
+to be dominated by outliers.
+
+
+
We can modify easily the above Python code and plot the relative error instead
+
+
+
+
+
Depending on the parameter in front of the normal distribution, we may
+have a small or larger relative error. Try to play around with
+different training data sets and study (graphically) the value of the
+relative error.
+
+
+
As mentioned above, Scikit-Learn has an impressive functionality.
+We can for example extract the values of \( \alpha \) and \( \beta \) and
+their error estimates, or the variance and standard deviation and many
+other properties from the statistical data analysis.
+
+
+
Here we show an
+example of the functionality of Scikit-Learn.
+
+
+
+
+
+
The function coef gives us the parameter \( \beta \) of our fit while intercept yields
+\( \alpha \). Depending on the constant in front of the normal distribution, we get values near or far from \( \alpha =2 \) and \( \beta =5 \). Try to play around with different parameters in front of the normal distribution. The function meansquarederror gives us the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error or loss defined as
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+
The smaller the value, the better the fit. Ideally we would like to
+have an MSE equal zero. The attentive reader has probably recognized
+this function as being similar to the \( \chi^2 \) function defined above.
+
+
+
The r2score function computes \( R^2 \), the coefficient of
+determination. It provides a measure of how well future samples are
+likely to be predicted by the model. Best possible score is 1.0 and it
+can be negative (because the model can be arbitrarily worse). A
+constant model that always predicts the expected value of \( \boldsymbol{y} \),
+disregarding the input features, would get a \( R^2 \) score of \( 0.0 \).
+
+
+
If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+$$
+R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+$$
+
+
where we have defined the mean value of \( \boldsymbol{y} \) as
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+
Another quantity taht we will meet again in our discussions of regression analysis is
+ the mean absolute error (MAE), a risk metric corresponding to the expected value of the absolute error loss or what we call the \( l1 \)-norm loss. In our discussion above we presented the relative error.
+The MAE is defined as follows
+
+$$
+\text{MAE}(\boldsymbol{y}, \boldsymbol{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n-1} \left| y_i - \tilde{y}_i \right|.
+$$
+
+
We present the
+squared logarithmic (quadratic) error
+
+$$
+\text{MSLE}(\boldsymbol{y}, \boldsymbol{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n - 1} (\log_e (1 + y_i) - \log_e (1 + \tilde{y}_i) )^2,
+$$
+
+
where \( \log_e (x) \) stands for the natural logarithm of \( x \). This error
+estimate is best to use when targets having exponential growth, such
+as population counts, average sales of a commodity over a span of
+years etc.
+
+
+
Finally, another cost function is the Huber cost function used in robust regression.
+
+
The rationale behind this possible cost function is its reduced
+sensitivity to outliers in the data set. In our discussions on
+dimensionality reduction and normalization of data we will meet other
+ways of dealing with outliers.
+
+
+
The Huber cost function is defined as
+$$
+H_{\delta}(\boldsymbol{a})=\left\{\begin{array}{cc}\frac{1}{2} \boldsymbol{a}^{2}& \text{for }|\boldsymbol{a}|\leq \delta\\ \delta (|\boldsymbol{a}|-\frac{1}{2}\delta ),&\text{otherwise}.\end{array}\right.
+$$
+
+
Here \( \boldsymbol{a}=\boldsymbol{y} - \boldsymbol{\tilde{y}} \).
+
+
We will discuss in more detail these and other functions in the
+various lectures and lab sessions.
+
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
+
Let us now dive into nuclear physics and remind ourselves briefly about some basic features about binding
+energies. A basic quantity which can be measured for the ground
+states of nuclei is the atomic mass \( M(N, Z) \) of the neutral atom with
+atomic mass number \( A \) and charge \( Z \). The number of neutrons is \( N \). There are indeed several sophisticated experiments worldwide which allow us to measure this quantity to high precision (parts per million even).
+
+
+
Atomic masses are usually tabulated in terms of the mass excess defined by
+$$
+\Delta M(N, Z) = M(N, Z) - uA,
+$$
+
+
where \( u \) is the Atomic Mass Unit
+$$
+u = M(^{12}\mathrm{C})/12 = 931.4940954(57) \hspace{0.1cm} \mathrm{MeV}/c^2.
+$$
+
+
The nucleon masses are
+$$
+m_p = 1.00727646693(9)u,
+$$
+
+
and
+$$
+m_n = 939.56536(8)\hspace{0.1cm} \mathrm{MeV}/c^2 = 1.0086649156(6)u.
+$$
+
+
In the 2016 mass evaluation of by W.J.Huang, G.Audi, M.Wang, F.G.Kondev, S.Naimi and X.Xu
+there are data on masses and decays of 3437 nuclei.
+
+
+
The nuclear binding energy is defined as the energy required to break
+up a given nucleus into its constituent parts of \( N \) neutrons and \( Z \)
+protons. In terms of the atomic masses \( M(N, Z) \) the binding energy is
+defined by
+
+
+$$
+BE(N, Z) = ZM_H c^2 + Nm_n c^2 - M(N, Z)c^2 ,
+$$
+
+
where \( M_H \) is the mass of the hydrogen atom and \( m_n \) is the mass of the neutron.
+In terms of the mass excess the binding energy is given by
+
+$$
+BE(N, Z) = Z\Delta_H c^2 + N\Delta_n c^2 -\Delta(N, Z)c^2 ,
+$$
+
+
where \( \Delta_H c^2 = 7.2890 \) MeV and \( \Delta_n c^2 = 8.0713 \) MeV.
+
+
A popular and physically intuitive model which can be used to parametrize
+the experimental binding energies as function of \( A \), is the so-called
+liquid drop model. The ansatz is based on the following expression
+
+
+$$
+BE(N,Z) = a_1A-a_2A^{2/3}-a_3\frac{Z^2}{A^{1/3}}-a_4\frac{(N-Z)^2}{A},
+$$
+
+
where \( A \) stands for the number of nucleons and the $a_i$s are parameters which are determined by a fit
+to the experimental data.
+
+
+
To arrive at the above expression we have assumed that we can make the following assumptions:
+
+
+ - There is a volume term \( a_1A \) proportional with the number of nucleons (the energy is also an extensive quantity). When an assembly of nucleons of the same size is packed together into the smallest volume, each interior nucleon has a certain number of other nucleons in contact with it. This contribution is proportional to the volume.
+ - There is a surface energy term \( a_2A^{2/3} \). The assumption here is that a nucleon at the surface of a nucleus interacts with fewer other nucleons than one in the interior of the nucleus and hence its binding energy is less. This surface energy term takes that into account and is therefore negative and is proportional to the surface area.
+ - There is a Coulomb energy term \( a_3\frac{Z^2}{A^{1/3}} \). The electric repulsion between each pair of protons in a nucleus yields less binding.
+ - There is an asymmetry term \( a_4\frac{(N-Z)^2}{A} \). This term is associated with the Pauli exclusion principle and reflects the fact that the proton-neutron interaction is more attractive on the average than the neutron-neutron and proton-proton interactions.
+
+
We could also add a so-called pairing term, which is a correction term that
+arises from the tendency of proton pairs and neutron pairs to
+occur. An even number of particles is more stable than an odd number.
+
+
Organizing our data
+
+
Let us start with reading and organizing our data.
+We start with the compilation of masses and binding energies from 2016.
+After having downloaded this file to our own computer, we are now ready to read the file and start structuring our data.
+
+
+
We start with preparing folders for storing our calculations and the data file over masses and binding energies. We import also various modules that we will find useful in order to present various Machine Learning methods. Here we focus mainly on the functionality of scikit-learn.
+
+
+
+
+
Before we proceed, we define also a function for making our plots. You can obviously avoid this and simply set up various matplotlib commands every time you need them. You may however find it convenient to collect all such commands in one function and simply call this function.
+
+
+
+
+
Our next step is to read the data on experimental binding energies and
+reorganize them as functions of the mass number \( A \), the number of
+protons \( Z \) and neutrons \( N \) using pandas. Before we do this it is
+always useful (unless you have a binary file or other types of compressed
+data) to actually open the file and simply take a look at it!
+
+
+
In particular, the program that outputs the final nuclear masses is written in Fortran with a specific format. It means that we need to figure out the format and which columns contain the data we are interested in. Pandas comes with a function that reads formatted output. After having admired the file, we are now ready to start massaging it with pandas. The file begins with some basic format information.
+
+
+
+
+
The data we are interested in are in columns 2, 3, 4 and 11, giving us
+the number of neutrons, protons, mass numbers and binding energies,
+respectively. We add also for the sake of completeness the element name. The data are in fixed-width formatted lines and we will
+covert them into the pandas DataFrame structure.
+
+
+
+
+
+
+
We have now read in the data, grouped them according to the variables we are interested in.
+We see how easy it is to reorganize the data using pandas. If we
+were to do these operations in C/C++ or Fortran, we would have had to
+write various functions/subroutines which perform the above
+reorganizations for us. Having reorganized the data, we can now start
+to make some simple fits using both the functionalities in numpy and
+Scikit-Learn afterwards.
+
+
+
Now we define five variables which contain
+the number of nucleons \( A \), the number of protons \( Z \) and the number of neutrons \( N \), the element name and finally the energies themselves.
+
+
+
+
+
+
The next step, and we will define this mathematically later, is to set up the so-called design matrix. We will throughout call this matrix \( \boldsymbol{X} \).
+It has dimensionality \( p\times n \), where \( n \) is the number of data points and \( p \) are the so-called predictors. In our case here they are given by the number of polynomials in \( A \) we wish to include in the fit.
+
+
+
+
+
+
With scikitlearn we are now ready to use linear regression and fit our data.
+
+
+
+
+
Pretty simple!
+Now we can print measures of how our fit is doing, the coefficients from the fits and plot the final fit together with our data.
+
+
+
+
+
And what about using neural networks?
+
The seaborn package allows us to visualize data in an efficient way. Note that we use scikit-learn's multi-layer perceptron (or feed forward neural network)
+functionality.
+
+
+
+
+
A first summary
+
+
The aim behind these introductory words was to present to you various
+Python libraries and their functionalities, in particular libraries like
+numpy, pandas, xarray and matplotlib and other that make our life much easier
+in handling various data sets and visualizing data.
+
+
+
Furthermore,
+Scikit-Learn allows us with few lines of code to implement popular
+Machine Learning algorithms for supervised learning. Later we will meet Tensorflow, a powerful library for deep learning.
+Now it is time to dive more into the details of various methods. We will start with linear regression and try to take a deeper look at what it entails.
+
@@ -380,7 +1169,7 @@ The first variable is called the dependent, the outcome or the
44
45
...
- 62
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs036.html b/doc/pub/week34/html/._week34-bs036.html
index cbf6191f6..4a08b23f2 100644
--- a/doc/pub/week34/html/._week34-bs036.html
+++ b/doc/pub/week34/html/._week34-bs036.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,34 +343,24 @@ MathJax.Hub.Config({
-
Regression analysis, overarching aims II
-
-
-
+
Why Linear Regression (aka Ordinary Least Squares and family)
-
Consider an experiment in which \( p \) characteristics of \( n \) samples are
-measured. The data from this experiment, for various explanatory variables \( p \) are normally represented by a matrix
-\( \mathbf{X} \).
+
Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\beta} \).
+
+- Method of choice for fitting a continuous function!
+- Gives an excellent introduction to central Machine Learning features with understandable pedagogical links to other methods like Neural Networks, Support Vector Machines etc
+- Analytical expression for the fitting parameters \( \boldsymbol{\beta} \)
+- Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more
+- Analytical relation with probabilistic interpretations
+- Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics
+- Easy to code! And links well with classification problems and logistic regression and neural networks
+- Allows for easy hands-on understanding of gradient descent methods
+- and many more features
+
+
For more discussions of Ridge and Lasso regression, Wessel van Wieringen's article is highly recommended.
+Similarly, Mehta et al's article is also recommended.
-
The matrix \( \mathbf{X} \) is called the design
-matrix. Additional information of the samples is available in the
-form of \( \boldsymbol{y} \) (also as above). The variable \( \boldsymbol{y} \) is
-generally referred to as the response variable. The aim of
-regression analysis is to explain \( \boldsymbol{y} \) in terms of
-\( \boldsymbol{X} \) through a functional relationship like \( y_i =
-f(\mathbf{X}_{i,\ast}) \). When no prior knowledge on the form of
-\( f(\cdot) \) is available, it is common to assume a linear relationship
-between \( \boldsymbol{X} \) and \( \boldsymbol{y} \). This assumption gives rise to
-the linear regression model where \( \boldsymbol{\beta} = [\beta_0, \ldots,
-\beta_{p-1}]^{T} \) are the regression parameters.
-
-
-
Linear regression gives us a set of analytical equations for the parameters \( \beta_j \).
-
-
-
-
diff --git a/doc/pub/week34/html/._week34-bs037.html b/doc/pub/week34/html/._week34-bs037.html
index d4b7b24fd..77e6d4d44 100644
--- a/doc/pub/week34/html/._week34-bs037.html
+++ b/doc/pub/week34/html/._week34-bs037.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,29 +343,22 @@ MathJax.Hub.Config({
-
Examples
+
Regression analysis, overarching aims
-
In order to understand the relation among the predictors (or features or properties) \( p \), the set of data \( n \) and the target (outcome, output etc) \( \boldsymbol{y} \),
-consider the model we discussed for describing nuclear binding energies.
+
+
Regression modeling deals with the description of the sampling distribution of a given random variable \( y \) and how it varies as function of another variable or a set of such variables \( \boldsymbol{x} =[x_0, x_1,\dots, x_{n-1}]^T \).
+The first variable is called the dependent, the outcome or the response variable while the set of variables \( \boldsymbol{x} \) is called the independent variable, or the predictor variable or the explanatory variable.
-
There we assumed that we could parametrize the data using a polynomial approximation based on the liquid drop model.
-Assuming
-
-$$
-BE(A) = a_0+a_1A+a_2A^{2/3}+a_3A^{-1/3}+a_4A^{-1},
-$$
-
-
we have five predictors, that is the intercept, the \( A \) dependent term, the \( A^{2/3} \) term and the \( A^{-1/3} \) and \( A^{-1} \) terms.
-This gives \( p=0,1,2,3,4 \). Furthermore we have \( n \) entries for each predictor. It means that our design matrix is a
-\( p\times n \) matrix \( \boldsymbol{X} \).
-
-
-
Here the predictors are based on a model we have made. A popular data set which is widely encountered in ML applications is the
-so-called credit card default data from Taiwan. The data set contains data on \( n=30000 \) credit card holders with predictors like gender, marital status, age, profession, education, etc. In total there are \( 24 \) such predictors or attributes leading to a design matrix of dimensionality \( 24 \times 30000 \). This is however a classification problem and we will come back to it when we discuss Logistic Regression.
-
+
A regression model aims at finding a likelihood function \( p(\boldsymbol{y}\vert \boldsymbol{x}) \), that is the conditional distribution for \( \boldsymbol{y} \) with a given \( \boldsymbol{x} \). The estimation of \( p(\boldsymbol{y}\vert \boldsymbol{x}) \) is made using a data set with
+
+- \( n \) cases \( i = 0, 1, 2, \dots, n-1 \)
+- Response (target, dependent or outcome) variable \( y_i \) with \( i = 0, 1, 2, \dots, n-1 \)
+- \( p \) so-called explanatory (independent or predictor) variables \( \boldsymbol{x}_i=[x_{i0}, x_{i1}, \dots, x_{ip-1}] \) with \( i = 0, 1, 2, \dots, n-1 \) and explanatory variables running from \( 0 \) to \( p-1 \). See below for more explicit examples.
+
+
The goal of the regression analysis is to extract/exploit relationship between \( \boldsymbol{y} \) and \( \boldsymbol{x} \) in or to infer causal dependencies, approximations to the likelihood functions, functional relationships and to make predictions, making fits and many other things.
@@ -387,7 +388,7 @@ so-called
46
47
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs038.html b/doc/pub/week34/html/._week34-bs038.html
index 1c16ab3e8..f39f5b1de 100644
--- a/doc/pub/week34/html/._week34-bs038.html
+++ b/doc/pub/week34/html/._week34-bs038.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,18 +343,30 @@ MathJax.Hub.Config({
-
General linear models
+
Regression analysis, overarching aims II
-
Before we proceed let us study a case from linear algebra where we aim at fitting a set of data \( \boldsymbol{y}=[y_0,y_1,\dots,y_{n-1}] \). We could think of these data as a result of an experiment or a complicated numerical experiment. These data are functions of a series of variables \( \boldsymbol{x}=[x_0,x_1,\dots,x_{n-1}] \), that is \( y_i = y(x_i) \) with \( i=0,1,2,\dots,n-1 \). The variables \( x_i \) could represent physical quantities like time, temperature, position etc. We assume that \( y(x) \) is a smooth function.
-
Since obtaining these data points may not be trivial, we want to use these data to fit a function which can allow us to make predictions for values of \( y \) which are not in the present set. The perhaps simplest approach is to assume we can parametrize our function in terms of a polynomial of degree \( n-1 \) with \( n \) points, that is
-$$
-y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \beta_j x_i^j+\epsilon_i,
-$$
+
Consider an experiment in which \( p \) characteristics of \( n \) samples are
+measured. The data from this experiment, for various explanatory variables \( p \) are normally represented by a matrix
+\( \mathbf{X} \).
+
-
where \( \epsilon_i \) is the error in our approximation.
+
The matrix \( \mathbf{X} \) is called the design
+matrix. Additional information of the samples is available in the
+form of \( \boldsymbol{y} \) (also as above). The variable \( \boldsymbol{y} \) is
+generally referred to as the response variable. The aim of
+regression analysis is to explain \( \boldsymbol{y} \) in terms of
+\( \boldsymbol{X} \) through a functional relationship like \( y_i =
+f(\mathbf{X}_{i,\ast}) \). When no prior knowledge on the form of
+\( f(\cdot) \) is available, it is common to assume a linear relationship
+between \( \boldsymbol{X} \) and \( \boldsymbol{y} \). This assumption gives rise to
+the linear regression model where \( \boldsymbol{\beta} = [\beta_0, \ldots,
+\beta_{p-1}]^{T} \) are the regression parameters.
+
+
+
Linear regression gives us a set of analytical equations for the parameters \( \beta_j \).
@@ -376,7 +396,7 @@ $$
47
48
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs039.html b/doc/pub/week34/html/._week34-bs039.html
index 17aa7bf6e..80d27ef6a 100644
--- a/doc/pub/week34/html/._week34-bs039.html
+++ b/doc/pub/week34/html/._week34-bs039.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,20 +343,29 @@ MathJax.Hub.Config({
-
Rewriting the fitting procedure as a linear algebra problem
+
Examples
-
For every set of values \( y_i,x_i \) we have thus the corresponding set of equations
+
In order to understand the relation among the predictors (or features or properties) \( p \), the set of data \( n \) and the target (outcome, output etc) \( \boldsymbol{y} \),
+consider the model we discussed for describing nuclear binding energies.
+
+
+
There we assumed that we could parametrize the data using a polynomial approximation based on the liquid drop model.
+Assuming
+
$$
-\begin{align*}
-y_0&=\beta_0+\beta_1x_0^1+\beta_2x_0^2+\dots+\beta_{n-1}x_0^{n-1}+\epsilon_0\\
-y_1&=\beta_0+\beta_1x_1^1+\beta_2x_1^2+\dots+\beta_{n-1}x_1^{n-1}+\epsilon_1\\
-y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\
-\dots & \dots \\
-y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_{n-1}x_{n-1}^{n-1}+\epsilon_{n-1}.\\
-\end{align*}
+BE(A) = a_0+a_1A+a_2A^{2/3}+a_3A^{-1/3}+a_4A^{-1},
$$
+
+
we have five predictors, that is the intercept, the \( A \) dependent term, the \( A^{2/3} \) term and the \( A^{-1/3} \) and \( A^{-1} \) terms.
+This gives \( p=0,1,2,3,4 \). Furthermore we have \( n \) entries for each predictor. It means that our design matrix is a
+\( p\times n \) matrix \( \boldsymbol{X} \).
+
+
+
Here the predictors are based on a model we have made. A popular data set which is widely encountered in ML applications is the
+so-called credit card default data from Taiwan. The data set contains data on \( n=30000 \) credit card holders with predictors like gender, marital status, age, profession, education, etc. In total there are \( 24 \) such predictors or attributes leading to a design matrix of dimensionality \( 24 \times 30000 \). This is however a classification problem and we will come back to it when we discuss Logistic Regression.
+
@@ -378,7 +395,7 @@ $$
48
49
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs040.html b/doc/pub/week34/html/._week34-bs040.html
index ad3664320..e6ec44909 100644
--- a/doc/pub/week34/html/._week34-bs040.html
+++ b/doc/pub/week34/html/._week34-bs040.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,43 +343,18 @@ MathJax.Hub.Config({
-
Rewriting the fitting procedure as a linear algebra problem, more details
+
General linear models
-
Defining the vectors
+
Before we proceed let us study a case from linear algebra where we aim at fitting a set of data \( \boldsymbol{y}=[y_0,y_1,\dots,y_{n-1}] \). We could think of these data as a result of an experiment or a complicated numerical experiment. These data are functions of a series of variables \( \boldsymbol{x}=[x_0,x_1,\dots,x_{n-1}] \), that is \( y_i = y(x_i) \) with \( i=0,1,2,\dots,n-1 \). The variables \( x_i \) could represent physical quantities like time, temperature, position etc. We assume that \( y(x) \) is a smooth function.
+
+
Since obtaining these data points may not be trivial, we want to use these data to fit a function which can allow us to make predictions for values of \( y \) which are not in the present set. The perhaps simplest approach is to assume we can parametrize our function in terms of a polynomial of degree \( n-1 \) with \( n \) points, that is
$$
-\boldsymbol{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T,
+y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \beta_j x_i^j+\epsilon_i,
$$
-
and
-$$
-\boldsymbol{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T,
-$$
-
-
and
-$$
-\boldsymbol{\epsilon} = [\epsilon_0,\epsilon_1, \epsilon_2,\dots, \epsilon_{n-1}]^T,
-$$
-
-
and the design matrix
-$$
-\boldsymbol{X}=
-\begin{bmatrix}
-1& x_{0}^1 &x_{0}^2& \dots & \dots &x_{0}^{n-1}\\
-1& x_{1}^1 &x_{1}^2& \dots & \dots &x_{1}^{n-1}\\
-1& x_{2}^1 &x_{2}^2& \dots & \dots &x_{2}^{n-1}\\
-\dots& \dots &\dots& \dots & \dots &\dots\\
-1& x_{n-1}^1 &x_{n-1}^2& \dots & \dots &x_{n-1}^{n-1}\\
-\end{bmatrix}
-$$
-
-
we can rewrite our equations as
-$$
-\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta}+\boldsymbol{\epsilon}.
-$$
-
-
The above design matrix is called a Vandermonde matrix.
+
where \( \epsilon_i \) is the error in our approximation.
@@ -401,7 +384,7 @@ $$
49
50
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs041.html b/doc/pub/week34/html/._week34-bs041.html
index 873636cbc..e1941319f 100644
--- a/doc/pub/week34/html/._week34-bs041.html
+++ b/doc/pub/week34/html/._week34-bs041.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,32 +343,20 @@ MathJax.Hub.Config({
-
Generalizing the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem
-
-
We are obviously not limited to the above polynomial expansions. We
-could replace the various powers of \( x \) with elements of Fourier
-series or instead of \( x_i^j \) we could have \( \cos{(j x_i)} \) or \( \sin{(j
-x_i)} \), or time series or other orthogonal functions. For every set
-of values \( y_i,x_i \) we can then generalize the equations to
-
-
+
For every set of values \( y_i,x_i \) we have thus the corresponding set of equations
$$
\begin{align*}
-y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\
-y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\
-y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\
+y_0&=\beta_0+\beta_1x_0^1+\beta_2x_0^2+\dots+\beta_{n-1}x_0^{n-1}+\epsilon_0\\
+y_1&=\beta_0+\beta_1x_1^1+\beta_2x_1^2+\dots+\beta_{n-1}x_1^{n-1}+\epsilon_1\\
+y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\
\dots & \dots \\
-y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\
-\dots & \dots \\
-y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\
+y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_{n-1}x_{n-1}^{n-1}+\epsilon_{n-1}.\\
\end{align*}
$$
-
-
-
Note that we have \( p=n \) here. The matrix is symmetric. This is generally not the case!
@@ -390,7 +386,7 @@ $$
50
51
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs042.html b/doc/pub/week34/html/._week34-bs042.html
index 67ddc608d..478ceb466 100644
--- a/doc/pub/week34/html/._week34-bs042.html
+++ b/doc/pub/week34/html/._week34-bs042.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,28 +343,43 @@ MathJax.Hub.Config({
-
Generalizing the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
-
We redefine in turn the matrix \( \boldsymbol{X} \) as
+
Defining the vectors
+$$
+\boldsymbol{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T,
+$$
+
+
and
+$$
+\boldsymbol{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T,
+$$
+
+
and
+$$
+\boldsymbol{\epsilon} = [\epsilon_0,\epsilon_1, \epsilon_2,\dots, \epsilon_{n-1}]^T,
+$$
+
+
and the design matrix
$$
\boldsymbol{X}=
\begin{bmatrix}
-x_{00}& x_{01} &x_{02}& \dots & \dots &x_{0,n-1}\\
-x_{10}& x_{11} &x_{12}& \dots & \dots &x_{1,n-1}\\
-x_{20}& x_{21} &x_{22}& \dots & \dots &x_{2,n-1}\\
+1& x_{0}^1 &x_{0}^2& \dots & \dots &x_{0}^{n-1}\\
+1& x_{1}^1 &x_{1}^2& \dots & \dots &x_{1}^{n-1}\\
+1& x_{2}^1 &x_{2}^2& \dots & \dots &x_{2}^{n-1}\\
\dots& \dots &\dots& \dots & \dots &\dots\\
-x_{n-1,0}& x_{n-1,1} &x_{n-1,2}& \dots & \dots &x_{n-1,n-1}\\
+1& x_{n-1}^1 &x_{n-1}^2& \dots & \dots &x_{n-1}^{n-1}\\
\end{bmatrix}
$$
-
and without loss of generality we rewrite again our equations as
+
we can rewrite our equations as
$$
\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta}+\boldsymbol{\epsilon}.
$$
-
The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\epsilon} \) and the parameter vector \( \boldsymbol{\beta} \) are our unknow quantities. How can we obtain the optimal set of \( \beta_i \) values?
+
The above design matrix is called a Vandermonde matrix.
@@ -386,7 +409,7 @@ $$
51
52
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs043.html b/doc/pub/week34/html/._week34-bs043.html
index f49f21f94..7d70c9f3e 100644
--- a/doc/pub/week34/html/._week34-bs043.html
+++ b/doc/pub/week34/html/._week34-bs043.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,27 +343,32 @@ MathJax.Hub.Config({
-
Optimizing our parameters
+
Generalizing the fitting procedure as a linear algebra problem
-
We have defined the matrix \( \boldsymbol{X} \) via the equations
+
+
We are obviously not limited to the above polynomial expansions. We
+could replace the various powers of \( x \) with elements of Fourier
+series or instead of \( x_i^j \) we could have \( \cos{(j x_i)} \) or \( \sin{(j
+x_i)} \), or time series or other orthogonal functions. For every set
+of values \( y_i,x_i \) we can then generalize the equations to
+
+
$$
\begin{align*}
y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\
y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\
-y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\
+y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\
\dots & \dots \\
-y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\
+y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\
\dots & \dots \\
y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\
\end{align*}
$$
-
As we noted above, we stayed with a system with the design matrix
- \( \boldsymbol{X}\in {\mathbb{R}}^{n\times n} \), that is we have \( p=n \). For reasons to come later (algorithmic arguments) we will hereafter define
-our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predictors refering to the column numbers and the entries \( n \) being the row elements.
-
+
+
Note that we have \( p=n \) here. The matrix is symmetric. This is generally not the case!
@@ -385,7 +398,7 @@ our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predict
52
53
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs044.html b/doc/pub/week34/html/._week34-bs044.html
index 72fcd2b11..3f25efbdc 100644
--- a/doc/pub/week34/html/._week34-bs044.html
+++ b/doc/pub/week34/html/._week34-bs044.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,108 +343,31 @@ MathJax.Hub.Config({
-
Our model for the nuclear binding energies
-
-
In our introductory notes we looked at the so-called liquid drop model. Let us remind ourselves about what we did by looking at the code.
-
-
We restate the parts of the code we are most interested in.
-
-
-
-
-
With \( \boldsymbol{\beta}\in {\mathbb{R}}^{p\times 1} \), it means that we will hereafter write our equations for the approximation as
+
Generalizing the fitting procedure as a linear algebra problem
+
+
+
+
We redefine in turn the matrix \( \boldsymbol{X} \) as
$$
-\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta},
+\boldsymbol{X}=
+\begin{bmatrix}
+x_{00}& x_{01} &x_{02}& \dots & \dots &x_{0,n-1}\\
+x_{10}& x_{11} &x_{12}& \dots & \dots &x_{1,n-1}\\
+x_{20}& x_{21} &x_{22}& \dots & \dots &x_{2,n-1}\\
+\dots& \dots &\dots& \dots & \dots &\dots\\
+x_{n-1,0}& x_{n-1,1} &x_{n-1,2}& \dots & \dots &x_{n-1,n-1}\\
+\end{bmatrix}
$$
-
throughout these lectures.
+
and without loss of generality we rewrite again our equations as
+$$
+\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta}+\boldsymbol{\epsilon}.
+$$
+
+
The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\epsilon} \) and the parameter vector \( \boldsymbol{\beta} \) are our unknow quantities. How can we obtain the optimal set of \( \beta_i \) values?
+
+
+
@@ -463,7 +394,7 @@ $$
53
54
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs045.html b/doc/pub/week34/html/._week34-bs045.html
index 299eee68f..90caa8fbf 100644
--- a/doc/pub/week34/html/._week34-bs045.html
+++ b/doc/pub/week34/html/._week34-bs045.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,36 +343,27 @@ MathJax.Hub.Config({
-
Optimizing our parameters, more details
+
Optimizing our parameters
-
With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\beta} \) as
+
We have defined the matrix \( \boldsymbol{X} \) via the equations
$$
-\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta},
+\begin{align*}
+y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\
+y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\
+y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\
+\dots & \dots \\
+y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\
+\dots & \dots \\
+y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\
+\end{align*}
$$
-
and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely
-$$
-C(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\},
-$$
-
-
or using the matrix \( \boldsymbol{X} \) and in a more compact matrix-vector notation as
-$$
-C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}.
-$$
-
-
This function is one possible way to define the so-called cost function.
-
-
It is also common to define
-the function \( C \) as
+
As we noted above, we stayed with a system with the design matrix
+ \( \boldsymbol{X}\in {\mathbb{R}}^{n\times n} \), that is we have \( p=n \). For reasons to come later (algorithmic arguments) we will hereafter define
+our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predictors refering to the column numbers and the entries \( n \) being the row elements.
-
-$$
-C(\boldsymbol{\beta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2,
-$$
-
-
since when taking the first derivative with respect to the unknown parameters \( \beta \), the factor of \( 2 \) cancels out.
@@ -394,7 +393,7 @@ $$
54
55
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs046.html b/doc/pub/week34/html/._week34-bs046.html
index dc96babec..cc3550a1b 100644
--- a/doc/pub/week34/html/._week34-bs046.html
+++ b/doc/pub/week34/html/._week34-bs046.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,56 +343,108 @@ MathJax.Hub.Config({
-
Interpretations and optimizing our parameters
-
-
-
+
Our model for the nuclear binding energies
-
The function
-$$
-C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\},
-$$
+
In our introductory notes we looked at the so-called liquid drop model. Let us remind ourselves about what we did by looking at the code.
-
can be linked to the variance of the quantity \( y_i \) if we interpret the latter as the mean value.
-When linking (see the discussion below) with the maximum likelihood approach below, we will indeed interpret \( y_i \) as a mean value
-
-$$
-y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i,
-$$
+
We restate the parts of the code we are most interested in.
-
where \( \langle y_i \rangle \) is the mean value. Keep in mind also that
-till now we have treated \( y_i \) as the exact value. Normally, the
-response (dependent or outcome) variable \( y_i \) the outcome of a
-numerical experiment or another type of experiment and is thus only an
-approximation to the true value. It is then always accompanied by an
-error estimate, often limited to a statistical error estimate given by
-the standard deviation discussed earlier. In the discussion here we
-will treat \( y_i \) as our exact value for the response variable.
-
+
+
+
With \( \boldsymbol{\beta}\in {\mathbb{R}}^{p\times 1} \), it means that we will hereafter write our equations for the approximation as
+$$
+\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta},
+$$
+
+
throughout these lectures.
@@ -411,7 +471,7 @@ $$
55
56
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs047.html b/doc/pub/week34/html/._week34-bs047.html
index 445497db5..bbe11b582 100644
--- a/doc/pub/week34/html/._week34-bs047.html
+++ b/doc/pub/week34/html/._week34-bs047.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,44 +343,36 @@ MathJax.Hub.Config({
-
Interpretations and optimizing our parameters
+
Optimizing our parameters, more details
-
We can rewrite
+
With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\beta} \) as
$$
-\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right),
+\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta},
$$
-
as
+
and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely
$$
-\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta},
+C(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\},
$$
-
and if the matrix \( \boldsymbol{X}^T\boldsymbol{X} \) is invertible we have the solution
+
or using the matrix \( \boldsymbol{X} \) and in a more compact matrix-vector notation as
$$
-\boldsymbol{\beta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}.
+C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}.
$$
-
We note also that since our design matrix is defined as \( \boldsymbol{X}\in
-{\mathbb{R}}^{n\times p} \), the product \( \boldsymbol{X}^T\boldsymbol{X} \in
-{\mathbb{R}}^{p\times p} \). In the above case we have that \( p \ll n \),
-in our case \( p=5 \) meaning that we end up with inverting a small
-\( 5\times 5 \) matrix. This is a rather common situation, in many cases we end up with low-dimensional
-matrices to invert. The methods discussed here and for many other
-supervised learning algorithms like classification with logistic
-regression or support vector machines, exhibit dimensionalities which
-allow for the usage of direct linear algebra methods such as LU decomposition or Singular Value Decomposition (SVD) for finding the inverse of the matrix
-\( \boldsymbol{X}^T\boldsymbol{X} \).
+
This function is one possible way to define the so-called cost function.
+
+
It is also common to define
+the function \( C \) as
-
-
+$$
+C(\boldsymbol{\beta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2,
+$$
-
-
-
-
Small question: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix \( \boldsymbol{X}^T\boldsymbol{X} \)? What kind of problems can we expect?
+
since when taking the first derivative with respect to the unknown parameters \( \beta \), the factor of \( 2 \) cancels out.
@@ -402,7 +402,7 @@ allow for the usage of direct linear algebra methods such as
LU decomposi
56
57
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs048.html b/doc/pub/week34/html/._week34-bs048.html
index 1b95dc910..fbcb95f60 100644
--- a/doc/pub/week34/html/._week34-bs048.html
+++ b/doc/pub/week34/html/._week34-bs048.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,11 +343,56 @@ MathJax.Hub.Config({
-
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
+
+
-
See the handwritten notes at https://github.com/CompPhysics/MachineLearning/blob/master/doc/HandWrittenNotes/2022/NotesExercise5Week452022.pdf
+
The function
+$$
+C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\},
+$$
+
+
can be linked to the variance of the quantity \( y_i \) if we interpret the latter as the mean value.
+When linking (see the discussion below) with the maximum likelihood approach below, we will indeed interpret \( y_i \) as a mean value
+
+$$
+y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i,
+$$
+
+
where \( \langle y_i \rangle \) is the mean value. Keep in mind also that
+till now we have treated \( y_i \) as the exact value. Normally, the
+response (dependent or outcome) variable \( y_i \) the outcome of a
+numerical experiment or another type of experiment and is thus only an
+approximation to the true value. It is then always accompanied by an
+error estimate, often limited to a statistical error estimate given by
+the standard deviation discussed earlier. In the discussion here we
+will treat \( y_i \) as our exact value for the response variable.
+
+
+
In order to find the parameters \( \beta_i \) we will then minimize the spread of \( C(\boldsymbol{\beta}) \), that is we are going to solve the problem
+$$
+{\displaystyle \min_{\boldsymbol{\beta}\in
+{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}.
+$$
+
+
In practical terms it means we will require
+$$
+\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)^2\right]=0,
+$$
+
+
which results in
+$$
+\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)\right]=0,
+$$
+
+
or in a matrix-vector form as
+$$
+\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right).
+$$
+
+
-
These notes will be discussed during one of the lectures.
@@ -366,7 +419,7 @@ MathJax.Hub.Config({
57
58
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs049.html b/doc/pub/week34/html/._week34-bs049.html
index ff24777d5..4d04f888d 100644
--- a/doc/pub/week34/html/._week34-bs049.html
+++ b/doc/pub/week34/html/._week34-bs049.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -339,27 +347,43 @@ MathJax.Hub.Config({
-
The residuals \( \boldsymbol{\epsilon} \) are in turn given by
+
We can rewrite
$$
-\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta},
+\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right),
$$
-
and with
+
as
$$
-\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0,
+\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta},
$$
-
we have
+
and if the matrix \( \boldsymbol{X}^T\boldsymbol{X} \) is invertible we have the solution
$$
-\boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0,
+\boldsymbol{\beta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}.
$$
-
meaning that the solution for \( \boldsymbol{\beta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.
+
We note also that since our design matrix is defined as \( \boldsymbol{X}\in
+{\mathbb{R}}^{n\times p} \), the product \( \boldsymbol{X}^T\boldsymbol{X} \in
+{\mathbb{R}}^{p\times p} \). In the above case we have that \( p \ll n \),
+in our case \( p=5 \) meaning that we end up with inverting a small
+\( 5\times 5 \) matrix. This is a rather common situation, in many cases we end up with low-dimensional
+matrices to invert. The methods discussed here and for many other
+supervised learning algorithms like classification with logistic
+regression or support vector machines, exhibit dimensionalities which
+allow for the usage of direct linear algebra methods such as LU decomposition or Singular Value Decomposition (SVD) for finding the inverse of the matrix
+\( \boldsymbol{X}^T\boldsymbol{X} \).
+
-
Let us now return to our nuclear binding energies and simply code the above equations.
+
+
+
+
Small question: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix \( \boldsymbol{X}^T\boldsymbol{X} \)? What kind of problems can we expect?
+
+
+
@@ -386,7 +410,7 @@ $$
58
59
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs050.html b/doc/pub/week34/html/._week34-bs050.html
index 473b48e58..d394527b6 100644
--- a/doc/pub/week34/html/._week34-bs050.html
+++ b/doc/pub/week34/html/._week34-bs050.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,97 +343,11 @@ MathJax.Hub.Config({
-
Own code for Ordinary Least Squares
+
Some useful matrix and vector expressions
-
It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\beta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to
-write
-
-
-
-
-
-
Alternatively, you can use the least squares functionality in Numpy as
-
-
-
-
-
And finally we plot our fit with and compare with data
-
-
-
+
See the handwritten notes at https://github.com/CompPhysics/MachineLearning/blob/master/doc/HandWrittenNotes/2022/NotesExercise5Week452022.pdf
+
These notes will be discussed during one of the lectures.
@@ -452,7 +374,7 @@ plt.show()
59
60
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs051.html b/doc/pub/week34/html/._week34-bs051.html
index 2a8298132..356d7e69b 100644
--- a/doc/pub/week34/html/._week34-bs051.html
+++ b/doc/pub/week34/html/._week34-bs051.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,113 +343,31 @@ MathJax.Hub.Config({
-
Adding error analysis and training set up
+
Interpretations and optimizing our parameters
+
+
+
+
The residuals \( \boldsymbol{\epsilon} \) are in turn given by
+$$
+\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta},
+$$
-
We can easily test our fit by computing the \( R2 \) score that we discussed in connection with the functionality of Scikit-Learn in the introductory slides.
-Since we are not using Scikit-Learn here we can define our own \( R2 \) function as
-
+
and with
+$$
+\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0,
+$$
-
-
-
and we would be using it as
-
-
-
-
-
We can easily add our MSE score as
-
-
-
-
-
and finally the relative error as
-
-
-
+
Let us now return to our nuclear binding energies and simply code the above equations.
@@ -468,7 +394,7 @@ Since we are not using Scikit-Learn here we can define our own \( R2 \) f
60
61
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs052.html b/doc/pub/week34/html/._week34-bs052.html
index 9df498381..09778a755 100644
--- a/doc/pub/week34/html/._week34-bs052.html
+++ b/doc/pub/week34/html/._week34-bs052.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,31 +343,95 @@ MathJax.Hub.Config({
-
The \( \chi^2 \) function
-
-
-
+
Own code for Ordinary Least Squares
-
Normally, the response (dependent or outcome) variable \( y_i \) is the
-outcome of a numerical experiment or another type of experiment and is
-thus only an approximation to the true value. It is then always
-accompanied by an error estimate, often limited to a statistical error
-estimate given by the standard deviation discussed earlier. In the
-discussion here we will treat \( y_i \) as our exact value for the
-response variable.
+
It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\beta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to
+write
-
Introducing the standard deviation \( \sigma_i \) for each measurement
-\( y_i \), we define now the \( \chi^2 \) function (omitting the \( 1/n \) term)
-as
-
-
-$$
-\chi^2(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\},
-$$
-
-
where the matrix \( \boldsymbol{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as matrix elements.
+
+
+
+
Alternatively, you can use the least squares functionality in Numpy as
+
+
+
+
+
And finally we plot our fit with and compare with data
+
+
+
@@ -387,6 +459,8 @@ $$
60
61
62
+
...
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs053.html b/doc/pub/week34/html/._week34-bs053.html
index ff0386dc0..b8d6d652d 100644
--- a/doc/pub/week34/html/._week34-bs053.html
+++ b/doc/pub/week34/html/._week34-bs053.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,28 +343,111 @@ MathJax.Hub.Config({
-
The \( \chi^2 \) function
-
-
-
+
Adding error analysis and training set up
-
In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\beta}) \) by requiring
-$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0,
-$$
+
We can easily test our fit by computing the \( R2 \) score that we discussed in connection with the functionality of Scikit-Learn in the introductory slides.
+Since we are not using Scikit-Learn here we can define our own \( R2 \) function as
+
-
which results in
-$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0,
-$$
-
-
or in a matrix-vector form as
-$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right).
-$$
-
-
where we have defined the matrix \( \boldsymbol{A} =\boldsymbol{X}/\boldsymbol{\Sigma} \) with matrix elements \( a_{ij} = x_{ij}/\sigma_i \) and the vector \( \boldsymbol{b} \) with elements \( b_i = y_i/\sigma_i \).
+
+
+
+
and we would be using it as
+
+
+
+
+
We can easily add our MSE score as
+
+
+
+
+
and finally the relative error as
+
+
+
@@ -383,6 +474,9 @@ $$
60
61
62
+
63
+
...
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs054.html b/doc/pub/week34/html/._week34-bs054.html
index 18b48cda2..a48882eda 100644
--- a/doc/pub/week34/html/._week34-bs054.html
+++ b/doc/pub/week34/html/._week34-bs054.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -340,20 +348,25 @@ MathJax.Hub.Config({
-
We can rewrite
+
Normally, the response (dependent or outcome) variable \( y_i \) is the
+outcome of a numerical experiment or another type of experiment and is
+thus only an approximation to the true value. It is then always
+accompanied by an error estimate, often limited to a statistical error
+estimate given by the standard deviation discussed earlier. In the
+discussion here we will treat \( y_i \) as our exact value for the
+response variable.
+
+
+
Introducing the standard deviation \( \sigma_i \) for each measurement
+\( y_i \), we define now the \( \chi^2 \) function (omitting the \( 1/n \) term)
+as
+
+
$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right),
+\chi^2(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\},
$$
-
as
-$$
-\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\beta},
-$$
-
-
and if the matrix \( \boldsymbol{A}^T\boldsymbol{A} \) is invertible we have the solution
-$$
-\boldsymbol{\beta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}.
-$$
+
where the matrix \( \boldsymbol{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as matrix elements.
@@ -380,6 +393,8 @@ $$
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs055.html b/doc/pub/week34/html/._week34-bs055.html
index 723ad5e02..ea6a2dae6 100644
--- a/doc/pub/week34/html/._week34-bs055.html
+++ b/doc/pub/week34/html/._week34-bs055.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -340,25 +348,22 @@ MathJax.Hub.Config({
-
If we then introduce the matrix
+
In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\beta}) \) by requiring
$$
-\boldsymbol{H} = \left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1},
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0,
$$
-
we have then the following expression for the parameters \( \beta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))
+
which results in
$$
-\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik}
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0,
$$
-
We state without proof the expression for the uncertainty in the parameters \( \beta_j \) as (we leave this as an exercise)
+
or in a matrix-vector form as
$$
-\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2,
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right).
$$
-
resulting in
-$$
-\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}!
-$$
+
where we have defined the matrix \( \boldsymbol{A} =\boldsymbol{X}/\boldsymbol{\Sigma} \) with matrix elements \( a_{ij} = x_{ij}/\sigma_i \) and the vector \( \boldsymbol{b} \) with elements \( b_i = y_i/\sigma_i \).
@@ -384,6 +389,8 @@ $$
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs056.html b/doc/pub/week34/html/._week34-bs056.html
index 42efdd668..7249cd611 100644
--- a/doc/pub/week34/html/._week34-bs056.html
+++ b/doc/pub/week34/html/._week34-bs056.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -339,19 +347,20 @@ MathJax.Hub.Config({
-
The first step here is to approximate the function \( y \) with a first-order polynomial, that is we write
+
+
We can rewrite
$$
-y=y(x) \rightarrow y(x_i) \approx \beta_0+\beta_1 x_i.
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right),
$$
-
By computing the derivatives of \( \chi^2 \) with respect to \( \beta_0 \) and \( \beta_1 \) show that these are given by
+
as
$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0,
+\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\beta},
$$
-
and
+
and if the matrix \( \boldsymbol{A}^T\boldsymbol{A} \) is invertible we have the solution
$$
-\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0.
+\boldsymbol{\beta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}.
$$
@@ -377,6 +386,8 @@ $$
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs057.html b/doc/pub/week34/html/._week34-bs057.html
index 4b7b322f7..4dd7dccf5 100644
--- a/doc/pub/week34/html/._week34-bs057.html
+++ b/doc/pub/week34/html/._week34-bs057.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -340,49 +348,25 @@ MathJax.Hub.Config({
-
For a linear fit (a first-order polynomial) we don't need to invert a matrix!!
-Defining
-
+
If we then introduce the matrix
$$
-\gamma = \sum_{i=0}^{n-1}\frac{1}{\sigma_i^2},
+\boldsymbol{H} = \left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1},
$$
-
+
we have then the following expression for the parameters \( \beta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))
$$
-\gamma_x = \sum_{i=0}^{n-1}\frac{x_{i}}{\sigma_i^2},
+\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik}
$$
-
+
We state without proof the expression for the uncertainty in the parameters \( \beta_j \) as (we leave this as an exercise)
$$
-\gamma_y = \sum_{i=0}^{n-1}\left(\frac{y_i}{\sigma_i^2}\right),
+\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2,
$$
-
+
resulting in
$$
-\gamma_{xx} = \sum_{i=0}^{n-1}\frac{x_ix_{i}}{\sigma_i^2},
+\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}!
$$
-
-
-$$
-\gamma_{xy} = \sum_{i=0}^{n-1}\frac{y_ix_{i}}{\sigma_i^2},
-$$
-
-
we obtain
-
-$$
-\beta_0 = \frac{\gamma_{xx}\gamma_y-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2},
-$$
-
-
-$$
-\beta_1 = \frac{\gamma_{xy}\gamma-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}.
-$$
-
-
This approach (different linear and non-linear regression) suffers
-often from both being underdetermined and overdetermined in the
-unknown coefficients \( \beta_i \). A better approach is to use the
-Singular Value Decomposition (SVD) method discussed next week.
-
@@ -406,6 +390,8 @@ Singular Value Decomposition (SVD) method discussed next week.
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs058.html b/doc/pub/week34/html/._week34-bs058.html
index b07af483e..d11ef191a 100644
--- a/doc/pub/week34/html/._week34-bs058.html
+++ b/doc/pub/week34/html/._week34-bs058.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,27 +343,27 @@ MathJax.Hub.Config({
-
Fitting an Equation of State for Dense Nuclear Matter
+
The \( \chi^2 \) function
+
+
+
+
The first step here is to approximate the function \( y \) with a first-order polynomial, that is we write
+$$
+y=y(x) \rightarrow y(x_i) \approx \beta_0+\beta_1 x_i.
+$$
-
Before we continue, let us introduce yet another example. We are going to fit the
-nuclear equation of state using results from many-body calculations.
-The equation of state we have made available here, as function of
-density, has been derived using modern nucleon-nucleon potentials with
-the addition of three-body
-forces. This
-time the file is presented as a standard csv file.
-
+
By computing the derivatives of \( \chi^2 \) with respect to \( \beta_0 \) and \( \beta_1 \) show that these are given by
+$$
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0,
+$$
-
The beginning of the Python code here is similar to what you have seen
-before, with the same initializations and declarations. We use also
-pandas again, rather extensively in order to organize our data.
-
+
and
+$$
+\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0.
+$$
+
+
-
The difference now is that we use Scikit-Learn's regression tools
-instead of our own matrix inversion implementation. Furthermore, we
-sneak in Ridge regression (to be discussed below) which includes a
-hyperparameter \( \lambda \), also to be explained below.
-
@@ -375,6 +383,8 @@ hyperparameter \( \lambda \), also to be explained below.
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs059.html b/doc/pub/week34/html/._week34-bs059.html
index 0dd2d071f..36bbcfe9f 100644
--- a/doc/pub/week34/html/._week34-bs059.html
+++ b/doc/pub/week34/html/._week34-bs059.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,123 +343,57 @@ MathJax.Hub.Config({
-
The code
+
The \( \chi^2 \) function
+
+
+
+
+
For a linear fit (a first-order polynomial) we don't need to invert a matrix!!
+Defining
+
+$$
+\gamma = \sum_{i=0}^{n-1}\frac{1}{\sigma_i^2},
+$$
-
-
-
The above simple polynomial in density \( \rho \) gives an excellent fit
-to the data.
-
-
-
We note also that there is a small deviation between the
-standard OLS and the Ridge regression at higher densities. We discuss this in more detail
-below.
-
@@ -470,6 +412,8 @@ below.
60
61
62
+
63
+
64
»
diff --git a/doc/pub/week34/html/._week34-bs060.html b/doc/pub/week34/html/._week34-bs060.html
index 60e7d6219..1d4aefaf2 100644
--- a/doc/pub/week34/html/._week34-bs060.html
+++ b/doc/pub/week34/html/._week34-bs060.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -335,106 +343,27 @@ MathJax.Hub.Config({
-
Splitting our Data in Training and Test data
+
Fitting an Equation of State for Dense Nuclear Matter
-
It is normal in essentially all Machine Learning studies to split the
-data in a training set and a test set (sometimes also an additional
-validation set). Scikit-Learn has an own function for this. There
-is no explicit recipe for how much data should be included as training
-data and say test data. An accepted rule of thumb is to use
-approximately \( 2/3 \) to \( 4/5 \) of the data as training data. We will
-postpone a discussion of this splitting to the end of these notes and
-our discussion of the so-called bias-variance tradeoff. Here we
-limit ourselves to repeat the above equation of state fitting example
-but now splitting the data into a training set and a test set.
+
Before we continue, let us introduce yet another example. We are going to fit the
+nuclear equation of state using results from many-body calculations.
+The equation of state we have made available here, as function of
+density, has been derived using modern nucleon-nucleon potentials with
+the addition of three-body
+forces. This
+time the file is presented as a standard csv file.
+
The beginning of the Python code here is similar to what you have seen
+before, with the same initializations and declarations. We use also
+pandas again, rather extensively in order to organize our data.
+
-
-
-
+
The difference now is that we use Scikit-Learn's regression tools
+instead of our own matrix inversion implementation. Furthermore, we
+sneak in Ridge regression (to be discussed below) which includes a
+hyperparameter \( \lambda \), also to be explained below.
+
@@ -452,6 +381,8 @@ ypredict = X_test 60
61
62
+ 63
+ 64
»
diff --git a/doc/pub/week34/html/._week34-bs061.html b/doc/pub/week34/html/._week34-bs061.html
index e49663ca8..75d925542 100644
--- a/doc/pub/week34/html/._week34-bs061.html
+++ b/doc/pub/week34/html/._week34-bs061.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
- Schedule first week
- Reading Recommendations
- Lectures and ComputerLab
- Communication channels
- Course Format
- Teachers
- Deadlines for projects (tentative)
- Recommended textbooks
- Prerequisites
- Learning outcomes
- Topics covered in this course: Statistical analysis and optimization of data
- Topics covered in this course
- Extremely useful tools, strongly recommended
- Other courses on Data science and Machine Learning at UiO
- Introduction
- What is Machine Learning?
- Types of Machine Learning
- Essential elements of ML
- An optimization/minimization problem
- A Frequentist approach to data analysis
- What is a good model?
- What is a good model? Can we define it?
- Software and needed installations
- Python installers
- Useful Python libraries
- Installing R, C++, cython or Julia
- Installing R, C++, cython, Numba etc
- Numpy examples and Important Matrix and vector handling packages
- Numpy and arrays
- Matrices in Python
- Meet the Pandas
- Simple linear regression model using scikit-learn
- To our real data: nuclear binding energies. Brief reminder on masses and binding energies
- Organizing our data
- And what about using neural networks?
- A first summary
- Why Linear Regression (aka Ordinary Least Squares and family)
- Regression analysis, overarching aims
- Regression analysis, overarching aims II
- Examples
- General linear models
- Rewriting the fitting procedure as a linear algebra problem
- Rewriting the fitting procedure as a linear algebra problem, more details
- Generalizing the fitting procedure as a linear algebra problem
- Generalizing the fitting procedure as a linear algebra problem
- Optimizing our parameters
- Our model for the nuclear binding energies
- Optimizing our parameters, more details
- Interpretations and optimizing our parameters
- Interpretations and optimizing our parameters
- Some useful matrix and vector expressions
- Interpretations and optimizing our parameters
- Own code for Ordinary Least Squares
- Adding error analysis and training set up
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- The \( \chi^2 \) function
- Fitting an Equation of State for Dense Nuclear Matter
- The code
- Splitting our Data in Training and Test data
- Exercises
- Exercise 1: Setting up various Python environments
- Exercise 2: making your own data and exploring scikit-learn
- Exercise 3: Split data in test and training data
+ AI/ML and some statements you may have heard (and what do they mean?)
+ Schedule first week
+ Reading Recommendations
+ Lectures and ComputerLab
+ Communication channels
+ Course Format
+ Teachers
+ Deadlines for projects (tentative)
+ Grading and deadlines
+ Recommended textbooks
+ Prerequisites
+ Learning outcomes
+ Topics covered in this course: Statistical analysis and optimization of data
+ Topics covered in this course
+ Extremely useful tools, strongly recommended
+ Other courses on Data science and Machine Learning at UiO
+ Introduction
+ What is Machine Learning?
+ Types of Machine Learning
+ Essential elements of ML
+ An optimization/minimization problem
+ A Frequentist approach to data analysis
+ What is a good model?
+ What is a good model? Can we define it?
+ Software and needed installations
+ Python installers
+ Useful Python libraries
+ Installing R, C++, cython or Julia
+ Installing R, C++, cython, Numba etc
+ Numpy examples and Important Matrix and vector handling packages
+ Numpy and arrays
+ Matrices in Python
+ Meet the Pandas
+ Simple linear regression model using scikit-learn
+ To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+ Organizing our data
+ And what about using neural networks?
+ A first summary
+ Why Linear Regression (aka Ordinary Least Squares and family)
+ Regression analysis, overarching aims
+ Regression analysis, overarching aims II
+ Examples
+ General linear models
+ Rewriting the fitting procedure as a linear algebra problem
+ Rewriting the fitting procedure as a linear algebra problem, more details
+ Generalizing the fitting procedure as a linear algebra problem
+ Generalizing the fitting procedure as a linear algebra problem
+ Optimizing our parameters
+ Our model for the nuclear binding energies
+ Optimizing our parameters, more details
+ Interpretations and optimizing our parameters
+ Interpretations and optimizing our parameters
+ Some useful matrix and vector expressions
+ Interpretations and optimizing our parameters
+ Own code for Ordinary Least Squares
+ Adding error analysis and training set up
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ The \( \chi^2 \) function
+ Fitting an Equation of State for Dense Nuclear Matter
+ The code
+ Splitting our Data in Training and Test data
+ Exercises
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Split data in test and training data
@@ -335,93 +343,8 @@ MathJax.Hub.Config({
-Exercises
+The code
-Here are three possible exercises for week 34
-
-
-Exercise 1: Setting up various Python environments
-
-The first exercise here is of a mere technical art. We want you to have
-
-- git as a version control software and to establish a user account on a provider like GitHub. Other providers like GitLab etc are equally fine. You can also use the University of Oslo GitHub facilities.
-- Install various Python packages
-
-We will make extensive use of Python as programming language and its
-myriad of available libraries. You will find
-IPython/Jupyter notebooks invaluable in your work. You can run R
-codes in the Jupyter/IPython notebooks, with the immediate benefit of
-visualizing your data. You can also use compiled languages like C++,
-Rust, Fortran etc if you prefer. The focus in these lectures will be
-on Python.
-
-
-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 pip as
-
-
-
-- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
-
-For Tensorflow, we recommend following the instructions in the text of
-Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
-
-
-We will come back to tensorflow later.
-
-For Python3, replace pip with pip3.
-
-For OSX users we recommend, after having installed Xcode, to
-install brew. Brew allows for a seamless installation of additional
-software via for example
-
-
-
-- brew install python3
-
-For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
-you can use pip as well and simply install Python as
-
-
-
-- sudo apt-get install python3 (or python for Python2.7)
-
-If you don't want to perform these operations separately and venture
-into the hassle of exploring how to set up dependencies and paths, we
-recommend two widely used distrubutions which set up all relevant
-dependencies for Python, namely
-
-
-
-which is an open source
-distribution of the Python and R programming languages for large-scale
-data processing, predictive analytics, and scientific computing, that
-aims to simplify package management and deployment. Package versions
-are managed by the package management system conda.
-
-
-
-is a Python
-distribution for scientific and analytic computing distribution and
-analysis environment, available for free and under a commercial
-license.
-
-
-We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
-
-
-
-
-Exercise 2: making your own data and exploring scikit-learn
-
-We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
-The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
-
@@ -429,8 +352,91 @@ The following simple Python instructions define our \( x \) and \( y \) values (
@@ -446,99 +452,15 @@ y
= 2.0+5*
-
-
-- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
-- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
-- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
-
-$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
-$$
-
-
and the \( R^2 \) score function.
-If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
-
-$$
-R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
-$$
-
-
where we have defined the mean value of \( \boldsymbol{y} \) as
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-
You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
-Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits.
+
The above simple polynomial in density \( \rho \) gives an excellent fit
+to the data.
-
-
-
-
Exercise 3: Split data in test and training data
-
-
In this exercise we want you to to compute the MSE for the training
-data and the test data as function of the complexity of a polynomial,
-that is the degree of a given polynomial.
+
We note also that there is a small deviation between the
+standard OLS and the Ridge regression at higher densities. We discuss this in more detail
+below.
-
The aim is to reproduce Figure 2.11 of Hastie et al.
-
-
Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.
-
-
-
-
-
where \( y \) is the function we want to fit with a given polynomial.
-
-
-
-a)
-Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial and split your data set in training and test data.
-
-
-
-
-
-
-b)
-Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
-
-
-
-
-
-
-c)
-Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
-
-
-
-
-
diff --git a/doc/pub/week34/html/._week34-bs062.html b/doc/pub/week34/html/._week34-bs062.html
index e95c0c06b..d71488bad 100644
--- a/doc/pub/week34/html/._week34-bs062.html
+++ b/doc/pub/week34/html/._week34-bs062.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
@@ -268,78 +263,75 @@ MathJax.Hub.Config({
Contents
@@ -351,27 +343,106 @@ MathJax.Hub.Config({
-Fitting an Equation of State for Dense Nuclear Matter
+Splitting our Data in Training and Test data
-Before we continue, let us introduce yet another example. We are going to fit the
-nuclear equation of state using results from many-body calculations.
-The equation of state we have made available here, as function of
-density, has been derived using modern nucleon-nucleon potentials with
-the addition of three-body
-forces. This
-time the file is presented as a standard csv file.
+
It is normal in essentially all Machine Learning studies to split the
+data in a training set and a test set (sometimes also an additional
+validation set). Scikit-Learn has an own function for this. There
+is no explicit recipe for how much data should be included as training
+data and say test data. An accepted rule of thumb is to use
+approximately \( 2/3 \) to \( 4/5 \) of the data as training data. We will
+postpone a discussion of this splitting to the end of these notes and
+our discussion of the so-called bias-variance tradeoff. Here we
+limit ourselves to repeat the above equation of state fitting example
+but now splitting the data into a training set and a test set.
-The beginning of the Python code here is similar to what you have seen
-before, with the same initializations and declarations. We use also
-pandas again, rather extensively in order to organize our data.
-
-The difference now is that we use Scikit-Learn's regression tools
-instead of our own matrix inversion implementation. Furthermore, we
-sneak in Ridge regression (to be discussed below) which includes a
-hyperparameter \( \lambda \), also to be explained below.
-
+
+
+
@@ -389,8 +460,6 @@ hyperparameter \( \lambda \), also to be explained below.
62
63
64
- 65
- 66
»
diff --git a/doc/pub/week34/html/._week34-bs063.html b/doc/pub/week34/html/._week34-bs063.html
index c5a242845..2af25ac1e 100644
--- a/doc/pub/week34/html/._week34-bs063.html
+++ b/doc/pub/week34/html/._week34-bs063.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
@@ -268,78 +263,75 @@ MathJax.Hub.Config({
Contents
@@ -351,8 +343,93 @@ MathJax.Hub.Config({
-The code
+Exercises
+Here are three possible exercises for week 34
+
+
+Exercise 1: Setting up various Python environments
+
+The first exercise here is of a mere technical art. We want you to have
+
+- git as a version control software and to establish a user account on a provider like GitHub. Other providers like GitLab etc are equally fine. You can also use the University of Oslo GitHub facilities.
+- Install various Python packages
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+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 pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+For Tensorflow, we recommend following the instructions in the text of
+Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
+
+
+We will come back to tensorflow later.
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for Python2.7)
+
+If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+
+
+which is an open source
+distribution of the Python and R programming languages for large-scale
+data processing, predictive analytics, and scientific computing, that
+aims to simplify package management and deployment. Package versions
+are managed by the package management system conda.
+
+
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
+
+
+
+
+Exercise 2: making your own data and exploring scikit-learn
+
+We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
+The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
+
@@ -360,91 +437,8 @@ MathJax.Hub.Config({
@@ -460,15 +454,99 @@ plt
.show()
-The above simple polynomial in density \( \rho \) gives an excellent fit
-to the data.
+
+
+- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
+- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
+- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+and the \( R^2 \) score function.
+If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+
+$$
+R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+$$
+
+where we have defined the mean value of \( \boldsymbol{y} \) as
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits.
-We note also that there is a small deviation between the
-standard OLS and the Ridge regression at higher densities. We discuss this in more detail
-below.
+
+
+
+
Exercise 3: Split data in test and training data
+
+In this exercise we want you to to compute the MSE for the training
+data and the test data as function of the complexity of a polynomial,
+that is the degree of a given polynomial.
+The aim is to reproduce Figure 2.11 of Hastie et al.
+
+Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.
+
+
+
+
+where \( y \) is the function we want to fit with a given polynomial.
+
+
+
+a)
+Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial and split your data set in training and test data.
+
+
+
+
+
+
+b)
+Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
+
+
+
+
+
+
+c)
+Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+
+
+
+
diff --git a/doc/pub/week34/html/week34-bs.html b/doc/pub/week34/html/week34-bs.html
index 19b4a2d84..9eaa31e80 100644
--- a/doc/pub/week34/html/week34-bs.html
+++ b/doc/pub/week34/html/week34-bs.html
@@ -37,6 +37,11 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d
Overview of first week
-
Schedule first week
-
Reading Recommendations
-
Lectures and ComputerLab
-
Communication channels
-
Course Format
-
Teachers
-
Deadlines for projects (tentative)
-
Recommended textbooks
-
Prerequisites
-
Learning outcomes
-
Topics covered in this course: Statistical analysis and optimization of data
-
Topics covered in this course
-
Extremely useful tools, strongly recommended
-
Other courses on Data science and Machine Learning at UiO
-
Introduction
-
What is Machine Learning?
-
Types of Machine Learning
-
Essential elements of ML
-
An optimization/minimization problem
-
A Frequentist approach to data analysis
-
What is a good model?
-
What is a good model? Can we define it?
-
Software and needed installations
-
Python installers
-
Useful Python libraries
-
Installing R, C++, cython or Julia
-
Installing R, C++, cython, Numba etc
-
Numpy examples and Important Matrix and vector handling packages
-
Numpy and arrays
-
Matrices in Python
-
Meet the Pandas
-
Simple linear regression model using scikit-learn
-
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
-
Organizing our data
-
And what about using neural networks?
-
A first summary
-
Why Linear Regression (aka Ordinary Least Squares and family)
-
Regression analysis, overarching aims
-
Regression analysis, overarching aims II
-
Examples
-
General linear models
-
Rewriting the fitting procedure as a linear algebra problem
-
Rewriting the fitting procedure as a linear algebra problem, more details
-
Generalizing the fitting procedure as a linear algebra problem
-
Generalizing the fitting procedure as a linear algebra problem
-
Optimizing our parameters
-
Our model for the nuclear binding energies
-
Optimizing our parameters, more details
-
Interpretations and optimizing our parameters
-
Interpretations and optimizing our parameters
-
Some useful matrix and vector expressions
-
Interpretations and optimizing our parameters
-
Own code for Ordinary Least Squares
-
Adding error analysis and training set up
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
The \( \chi^2 \) function
-
Fitting an Equation of State for Dense Nuclear Matter
-
The code
-
Splitting our Data in Training and Test data
-
Exercises
-
Exercise 1: Setting up various Python environments
-
Exercise 2: making your own data and exploring scikit-learn
-
Exercise 3: Split data in test and training data
+
AI/ML and some statements you may have heard (and what do they mean?)
+
Schedule first week
+
Reading Recommendations
+
Lectures and ComputerLab
+
Communication channels
+
Course Format
+
Teachers
+
Deadlines for projects (tentative)
+
Grading and deadlines
+
Recommended textbooks
+
Prerequisites
+
Learning outcomes
+
Topics covered in this course: Statistical analysis and optimization of data
+
Topics covered in this course
+
Extremely useful tools, strongly recommended
+
Other courses on Data science and Machine Learning at UiO
+
Introduction
+
What is Machine Learning?
+
Types of Machine Learning
+
Essential elements of ML
+
An optimization/minimization problem
+
A Frequentist approach to data analysis
+
What is a good model?
+
What is a good model? Can we define it?
+
Software and needed installations
+
Python installers
+
Useful Python libraries
+
Installing R, C++, cython or Julia
+
Installing R, C++, cython, Numba etc
+
Numpy examples and Important Matrix and vector handling packages
+
Numpy and arrays
+
Matrices in Python
+
Meet the Pandas
+
Simple linear regression model using scikit-learn
+
To our real data: nuclear binding energies. Brief reminder on masses and binding energies
+
Organizing our data
+
And what about using neural networks?
+
A first summary
+
Why Linear Regression (aka Ordinary Least Squares and family)
+
Regression analysis, overarching aims
+
Regression analysis, overarching aims II
+
Examples
+
General linear models
+
Rewriting the fitting procedure as a linear algebra problem
+
Rewriting the fitting procedure as a linear algebra problem, more details
+
Generalizing the fitting procedure as a linear algebra problem
+
Generalizing the fitting procedure as a linear algebra problem
+
Optimizing our parameters
+
Our model for the nuclear binding energies
+
Optimizing our parameters, more details
+
Interpretations and optimizing our parameters
+
Interpretations and optimizing our parameters
+
Some useful matrix and vector expressions
+
Interpretations and optimizing our parameters
+
Own code for Ordinary Least Squares
+
Adding error analysis and training set up
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
The \( \chi^2 \) function
+
Fitting an Equation of State for Dense Nuclear Matter
+
The code
+
Splitting our Data in Training and Test data
+
Exercises
+
Exercise 1: Setting up various Python environments
+
Exercise 2: making your own data and exploring scikit-learn
+
Exercise 3: Split data in test and training data
@@ -378,7 +386,7 @@ MathJax.Hub.Config({
9
10
...
-
62
+
64
»
diff --git a/doc/pub/week34/html/week34-reveal.html b/doc/pub/week34/html/week34-reveal.html
index 8097d58aa..f03b8ab19 100644
--- a/doc/pub/week34/html/week34-reveal.html
+++ b/doc/pub/week34/html/week34-reveal.html
@@ -224,6 +224,20 @@ linear algebra and elements of statistics needed for the course.
+
+AI/ML and some statements you may have heard (and what do they mean?)
+
+
+- Fei-Fei Li on ImageNet: map out the entire world of objects (The data that transformed AI research)
+- Russell and Norvig in their popular textbook: relevant to any intellectual task; it is truly a universal field (Artificial Intelligence, A modern approach)
+- Woody Bledsoe puts it more bluntly: in the long run, AI is the only science (quoted in Pamilla McCorduck, Machines who think)
+
+
+
If you wish to have a critical read on AI/ML from a societal point of view, see Kate Crawford's recent text Atlas of AI
+
+Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis
+
+
Schedule first week
@@ -368,6 +382,23 @@ linear algebra and elements of statistics needed for the course.
+
+Grading and deadlines
+
+
+
Activity and Percentage of total score
+
+
+- First project, due October 9, 1/3%
+- Second project, due November 6, 1/3%
+- Third project, due December 11, 1/3%
+- Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score
+
+
+
+The extra credit assignments are due each Friday and can be uploaed to canvas in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35.
+
+
Recommended textbooks
diff --git a/doc/pub/week34/html/week34-solarized.html b/doc/pub/week34/html/week34-solarized.html
index 66e36d1c2..eab32a2c0 100644
--- a/doc/pub/week34/html/week34-solarized.html
+++ b/doc/pub/week34/html/week34-solarized.html
@@ -64,6 +64,11 @@ div.toc p,a {
+AI/ML and some statements you may have heard (and what do they mean?)
+
+
+- Fei-Fei Li on ImageNet: map out the entire world of objects (The data that transformed AI research)
+- Russell and Norvig in their popular textbook: relevant to any intellectual task; it is truly a universal field (Artificial Intelligence, A modern approach)
+- Woody Bledsoe puts it more bluntly: in the long run, AI is the only science (quoted in Pamilla McCorduck, Machines who think)
+
+If you wish to have a critical read on AI/ML from a societal point of view, see Kate Crawford's recent text Atlas of AI
+
+Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis
+
Schedule first week
@@ -432,6 +450,23 @@ linear algebra and elements of statistics needed for the course.
+
+
Grading and deadlines
+
+
+
Activity and Percentage of total score
+
+
+- First project, due October 9, 1/3%
+- Second project, due November 6, 1/3%
+- Third project, due December 11, 1/3%
+- Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score
+
+
+
+
+
The extra credit assignments are due each Friday and can be uploaed to canvas in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35.
+
Recommended textbooks
diff --git a/doc/pub/week34/html/week34.html b/doc/pub/week34/html/week34.html
index 10ecdf4a1..df19c41e3 100644
--- a/doc/pub/week34/html/week34.html
+++ b/doc/pub/week34/html/week34.html
@@ -141,6 +141,11 @@ div.toc p,a {
+
AI/ML and some statements you may have heard (and what do they mean?)
+
+
+- Fei-Fei Li on ImageNet: map out the entire world of objects (The data that transformed AI research)
+- Russell and Norvig in their popular textbook: relevant to any intellectual task; it is truly a universal field (Artificial Intelligence, A modern approach)
+- Woody Bledsoe puts it more bluntly: in the long run, AI is the only science (quoted in Pamilla McCorduck, Machines who think)
+
+
If you wish to have a critical read on AI/ML from a societal point of view, see Kate Crawford's recent text Atlas of AI
+
+
Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis
+
Schedule first week
@@ -509,6 +527,23 @@ linear algebra and elements of statistics needed for the course.
+
+
Grading and deadlines
+
+
+
Activity and Percentage of total score
+
+
+- First project, due October 9, 1/3%
+- Second project, due November 6, 1/3%
+- Third project, due December 11, 1/3%
+- Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score
+
+
+
+
+
The extra credit assignments are due each Friday and can be uploaed to canvas in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35.
+
Recommended textbooks
diff --git a/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz b/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz
index a5cad011f..b9d7c27cf 100644
Binary files a/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz and b/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz differ
diff --git a/doc/pub/week34/ipynb/week34.ipynb b/doc/pub/week34/ipynb/week34.ipynb
index bfd4fe302..8b6b0c7df 100644
--- a/doc/pub/week34/ipynb/week34.ipynb
+++ b/doc/pub/week34/ipynb/week34.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "21c9031e",
+ "id": "3f38855c",
"metadata": {
"editable": true
},
@@ -14,7 +14,7 @@
},
{
"cell_type": "markdown",
- "id": "3709ee9e",
+ "id": "4b5ae295",
"metadata": {
"editable": true
},
@@ -27,7 +27,7 @@
},
{
"cell_type": "markdown",
- "id": "422a9c6c",
+ "id": "083a7495",
"metadata": {
"editable": true
},
@@ -56,7 +56,27 @@
},
{
"cell_type": "markdown",
- "id": "59e44452",
+ "id": "5f932542",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "## AI/ML and some statements you may have heard (and what do they mean?)\n",
+ "\n",
+ "1. Fei-Fei Li on ImageNet: **map out the entire world of objects** ([The data that transformed AI research](https://cacm.acm.org/news/219702-the-data-that-transformed-ai-research-and-possibly-the-world/fulltext))\n",
+ "\n",
+ "2. Russell and Norvig in their popular textbook: **relevant to any intellectual task; it is truly a universal field** ([Artificial Intelligence, A modern approach](http://aima.cs.berkeley.edu/))\n",
+ "\n",
+ "3. Woody Bledsoe puts it more bluntly: **in the long run, AI is the only science** (quoted in Pamilla McCorduck, [Machines who think](https://www.pamelamccorduck.com/machines-who-think))\n",
+ "\n",
+ "If you wish to have a critical read on AI/ML from a societal point of view, see [Kate Crawford's recent text Atlas of AI](https://www.katecrawford.net/)\n",
+ "\n",
+ "**Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis**"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "8aea86c5",
"metadata": {
"editable": true
},
@@ -72,7 +92,7 @@
},
{
"cell_type": "markdown",
- "id": "9d432cae",
+ "id": "66200075",
"metadata": {
"editable": true
},
@@ -95,7 +115,7 @@
},
{
"cell_type": "markdown",
- "id": "f8072ad5",
+ "id": "0e39e074",
"metadata": {
"editable": true
},
@@ -119,7 +139,7 @@
},
{
"cell_type": "markdown",
- "id": "ae6eebe2",
+ "id": "d68cda87",
"metadata": {
"editable": true
},
@@ -133,7 +153,7 @@
},
{
"cell_type": "markdown",
- "id": "16a4c893",
+ "id": "0cf38f7d",
"metadata": {
"editable": true
},
@@ -157,7 +177,7 @@
},
{
"cell_type": "markdown",
- "id": "a416b4fc",
+ "id": "c0d1933e",
"metadata": {
"editable": true
},
@@ -188,7 +208,7 @@
},
{
"cell_type": "markdown",
- "id": "8bbfc706",
+ "id": "08edc708",
"metadata": {
"editable": true
},
@@ -206,7 +226,29 @@
},
{
"cell_type": "markdown",
- "id": "c205c17f",
+ "id": "81fa82d1",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "## Grading and deadlines\n",
+ "\n",
+ "**Activity and Percentage of total score.**\n",
+ "\n",
+ "1. First project, **due October 9**, 1/3% \n",
+ "\n",
+ "2. Second project, **due November 6**, 1/3% \n",
+ "\n",
+ "3. Third project, **due December 11**, 1/3% \n",
+ "\n",
+ "4. Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score\n",
+ "\n",
+ "The extra credit assignments are due each Friday and can be uploaed to **canvas** in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "dd9a17d3",
"metadata": {
"editable": true
},
@@ -230,7 +272,7 @@
},
{
"cell_type": "markdown",
- "id": "dd64c71c",
+ "id": "dc1a3b8b",
"metadata": {
"editable": true
},
@@ -250,7 +292,7 @@
},
{
"cell_type": "markdown",
- "id": "bc6ba9d0",
+ "id": "73403d65",
"metadata": {
"editable": true
},
@@ -294,7 +336,7 @@
},
{
"cell_type": "markdown",
- "id": "7afad675",
+ "id": "76f2ff83",
"metadata": {
"editable": true
},
@@ -329,7 +371,7 @@
},
{
"cell_type": "markdown",
- "id": "cee1b5a4",
+ "id": "7a3fd82d",
"metadata": {
"editable": true
},
@@ -367,7 +409,7 @@
},
{
"cell_type": "markdown",
- "id": "5525a9e7",
+ "id": "a53d12c7",
"metadata": {
"editable": true
},
@@ -383,7 +425,7 @@
},
{
"cell_type": "markdown",
- "id": "f430738b",
+ "id": "62c90f42",
"metadata": {
"editable": true
},
@@ -414,7 +456,7 @@
},
{
"cell_type": "markdown",
- "id": "da8be362",
+ "id": "a2604be4",
"metadata": {
"editable": true
},
@@ -457,7 +499,7 @@
},
{
"cell_type": "markdown",
- "id": "aff98b7f",
+ "id": "ce447139",
"metadata": {
"editable": true
},
@@ -530,7 +572,7 @@
},
{
"cell_type": "markdown",
- "id": "95a497f1",
+ "id": "962a72d6",
"metadata": {
"editable": true
},
@@ -559,7 +601,7 @@
},
{
"cell_type": "markdown",
- "id": "2e60540b",
+ "id": "d1cb6f64",
"metadata": {
"editable": true
},
@@ -577,7 +619,7 @@
},
{
"cell_type": "markdown",
- "id": "d958bfc0",
+ "id": "5ea772f0",
"metadata": {
"editable": true
},
@@ -589,7 +631,7 @@
},
{
"cell_type": "markdown",
- "id": "baf32320",
+ "id": "38e2a9be",
"metadata": {
"editable": true
},
@@ -624,7 +666,7 @@
},
{
"cell_type": "markdown",
- "id": "1f29d047",
+ "id": "45efedd3",
"metadata": {
"editable": true
},
@@ -654,7 +696,7 @@
},
{
"cell_type": "markdown",
- "id": "05cbf628",
+ "id": "614d1fc3",
"metadata": {
"editable": true
},
@@ -685,7 +727,7 @@
},
{
"cell_type": "markdown",
- "id": "4cd8353c",
+ "id": "92c69cc6",
"metadata": {
"editable": true
},
@@ -724,7 +766,7 @@
},
{
"cell_type": "markdown",
- "id": "12d1e186",
+ "id": "2f38a5da",
"metadata": {
"editable": true
},
@@ -757,7 +799,7 @@
},
{
"cell_type": "markdown",
- "id": "3edb3ae7",
+ "id": "efb7e0dd",
"metadata": {
"editable": true
},
@@ -792,7 +834,7 @@
},
{
"cell_type": "markdown",
- "id": "833aa93b",
+ "id": "8e0168fe",
"metadata": {
"editable": true
},
@@ -816,7 +858,7 @@
},
{
"cell_type": "markdown",
- "id": "2e1e41d9",
+ "id": "d83a2a5c",
"metadata": {
"editable": true
},
@@ -843,7 +885,7 @@
},
{
"cell_type": "markdown",
- "id": "51db2568",
+ "id": "107024f6",
"metadata": {
"editable": true
},
@@ -853,7 +895,7 @@
},
{
"cell_type": "markdown",
- "id": "5cef08e1",
+ "id": "380c8f9e",
"metadata": {
"editable": true
},
@@ -865,7 +907,7 @@
},
{
"cell_type": "markdown",
- "id": "f981309c",
+ "id": "c268cf31",
"metadata": {
"editable": true
},
@@ -886,7 +928,7 @@
},
{
"cell_type": "markdown",
- "id": "5cb88644",
+ "id": "f9c5645f",
"metadata": {
"editable": true
},
@@ -898,7 +940,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "id": "968b36e0",
+ "id": "a228355c",
"metadata": {
"collapsed": false,
"editable": true
@@ -910,7 +952,7 @@
},
{
"cell_type": "markdown",
- "id": "3c204886",
+ "id": "d2ad5f10",
"metadata": {
"editable": true
},
@@ -921,7 +963,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "d18a9e33",
+ "id": "b6f7455b",
"metadata": {
"collapsed": false,
"editable": true
@@ -935,7 +977,7 @@
},
{
"cell_type": "markdown",
- "id": "dedaa27e",
+ "id": "01e8e97d",
"metadata": {
"editable": true
},
@@ -947,7 +989,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "id": "87323a6b",
+ "id": "efd83ca4",
"metadata": {
"collapsed": false,
"editable": true
@@ -961,7 +1003,7 @@
},
{
"cell_type": "markdown",
- "id": "9d382236",
+ "id": "fcdeb2ad",
"metadata": {
"editable": true
},
@@ -973,7 +1015,7 @@
{
"cell_type": "code",
"execution_count": 4,
- "id": "4e6a7f77",
+ "id": "0b5f8a8e",
"metadata": {
"collapsed": false,
"editable": true
@@ -987,7 +1029,7 @@
},
{
"cell_type": "markdown",
- "id": "a2037de9",
+ "id": "f3ed6c0f",
"metadata": {
"editable": true
},
@@ -1004,7 +1046,7 @@
{
"cell_type": "code",
"execution_count": 5,
- "id": "f09dde37",
+ "id": "946c1f60",
"metadata": {
"collapsed": false,
"editable": true
@@ -1021,7 +1063,7 @@
},
{
"cell_type": "markdown",
- "id": "9a65330f",
+ "id": "8bb1219a",
"metadata": {
"editable": true
},
@@ -1033,7 +1075,7 @@
{
"cell_type": "code",
"execution_count": 6,
- "id": "0e8edadf",
+ "id": "ed3fc845",
"metadata": {
"collapsed": false,
"editable": true
@@ -1047,7 +1089,7 @@
},
{
"cell_type": "markdown",
- "id": "37507452",
+ "id": "796eaba6",
"metadata": {
"editable": true
},
@@ -1058,7 +1100,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "id": "0fe14d17",
+ "id": "281b325c",
"metadata": {
"collapsed": false,
"editable": true
@@ -1072,7 +1114,7 @@
},
{
"cell_type": "markdown",
- "id": "6a8ea0ab",
+ "id": "d9f6835d",
"metadata": {
"editable": true
},
@@ -1083,7 +1125,7 @@
{
"cell_type": "code",
"execution_count": 8,
- "id": "32da8979",
+ "id": "c6bbc34e",
"metadata": {
"collapsed": false,
"editable": true
@@ -1097,7 +1139,7 @@
},
{
"cell_type": "markdown",
- "id": "d988c21d",
+ "id": "9838d355",
"metadata": {
"editable": true
},
@@ -1112,7 +1154,7 @@
{
"cell_type": "code",
"execution_count": 9,
- "id": "c5e28c57",
+ "id": "4662af5c",
"metadata": {
"collapsed": false,
"editable": true
@@ -1126,7 +1168,7 @@
},
{
"cell_type": "markdown",
- "id": "9009c07b",
+ "id": "3d12dbe1",
"metadata": {
"editable": true
},
@@ -1137,7 +1179,7 @@
{
"cell_type": "code",
"execution_count": 10,
- "id": "0acc6a90",
+ "id": "620afe59",
"metadata": {
"collapsed": false,
"editable": true
@@ -1152,7 +1194,7 @@
},
{
"cell_type": "markdown",
- "id": "90b5b508",
+ "id": "cb5fe41d",
"metadata": {
"editable": true
},
@@ -1163,7 +1205,7 @@
{
"cell_type": "code",
"execution_count": 11,
- "id": "edfee4ad",
+ "id": "3c7fa605",
"metadata": {
"collapsed": false,
"editable": true
@@ -1178,7 +1220,7 @@
},
{
"cell_type": "markdown",
- "id": "b0d3239b",
+ "id": "17c5a340",
"metadata": {
"editable": true
},
@@ -1189,7 +1231,7 @@
{
"cell_type": "code",
"execution_count": 12,
- "id": "7383dfe5",
+ "id": "30caf737",
"metadata": {
"collapsed": false,
"editable": true
@@ -1205,7 +1247,7 @@
},
{
"cell_type": "markdown",
- "id": "37c60821",
+ "id": "67055c40",
"metadata": {
"editable": true
},
@@ -1216,7 +1258,7 @@
{
"cell_type": "code",
"execution_count": 13,
- "id": "3b091264",
+ "id": "f3bee1cd",
"metadata": {
"collapsed": false,
"editable": true
@@ -1232,7 +1274,7 @@
},
{
"cell_type": "markdown",
- "id": "aabcfad5",
+ "id": "2a99e698",
"metadata": {
"editable": true
},
@@ -1243,7 +1285,7 @@
{
"cell_type": "code",
"execution_count": 14,
- "id": "e4d1a086",
+ "id": "6f716c40",
"metadata": {
"collapsed": false,
"editable": true
@@ -1259,7 +1301,7 @@
},
{
"cell_type": "markdown",
- "id": "06a565c7",
+ "id": "35c27447",
"metadata": {
"editable": true
},
@@ -1271,7 +1313,7 @@
},
{
"cell_type": "markdown",
- "id": "044ac6d9",
+ "id": "a90c1e11",
"metadata": {
"editable": true
},
@@ -1286,7 +1328,7 @@
},
{
"cell_type": "markdown",
- "id": "65ba46fd",
+ "id": "36ff8743",
"metadata": {
"editable": true
},
@@ -1296,7 +1338,7 @@
},
{
"cell_type": "markdown",
- "id": "2ff3fb83",
+ "id": "1d0b320f",
"metadata": {
"editable": true
},
@@ -1308,7 +1350,7 @@
},
{
"cell_type": "markdown",
- "id": "d319fa97",
+ "id": "8dbae3d8",
"metadata": {
"editable": true
},
@@ -1319,7 +1361,7 @@
},
{
"cell_type": "markdown",
- "id": "2deb08fd",
+ "id": "85b18e76",
"metadata": {
"editable": true
},
@@ -1334,7 +1376,7 @@
},
{
"cell_type": "markdown",
- "id": "440aefd9",
+ "id": "23e2cdde",
"metadata": {
"editable": true
},
@@ -1349,7 +1391,7 @@
{
"cell_type": "code",
"execution_count": 15,
- "id": "6ab6dc55",
+ "id": "177958f4",
"metadata": {
"collapsed": false,
"editable": true
@@ -1376,7 +1418,7 @@
{
"cell_type": "code",
"execution_count": 16,
- "id": "38b70a6c",
+ "id": "6054c119",
"metadata": {
"collapsed": false,
"editable": true
@@ -1400,7 +1442,7 @@
},
{
"cell_type": "markdown",
- "id": "8f185fa0",
+ "id": "3512c3d9",
"metadata": {
"editable": true
},
@@ -1426,7 +1468,7 @@
{
"cell_type": "code",
"execution_count": 17,
- "id": "e81d3a14",
+ "id": "151d1d83",
"metadata": {
"collapsed": false,
"editable": true
@@ -1446,7 +1488,7 @@
},
{
"cell_type": "markdown",
- "id": "d3457595",
+ "id": "df9199cf",
"metadata": {
"editable": true
},
@@ -1460,7 +1502,7 @@
{
"cell_type": "code",
"execution_count": 18,
- "id": "3d6380e1",
+ "id": "99604f3c",
"metadata": {
"collapsed": false,
"editable": true
@@ -1473,7 +1515,7 @@
},
{
"cell_type": "markdown",
- "id": "816bbfa2",
+ "id": "ce43f7ab",
"metadata": {
"editable": true
},
@@ -1484,7 +1526,7 @@
{
"cell_type": "code",
"execution_count": 19,
- "id": "c830a5a7",
+ "id": "0e73a972",
"metadata": {
"collapsed": false,
"editable": true
@@ -1496,7 +1538,7 @@
},
{
"cell_type": "markdown",
- "id": "9ce2aeb4",
+ "id": "fd14684a",
"metadata": {
"editable": true
},
@@ -1507,7 +1549,7 @@
{
"cell_type": "code",
"execution_count": 20,
- "id": "bf68a86d",
+ "id": "56787250",
"metadata": {
"collapsed": false,
"editable": true
@@ -1525,7 +1567,7 @@
},
{
"cell_type": "markdown",
- "id": "6b549053",
+ "id": "1f298841",
"metadata": {
"editable": true
},
@@ -1537,7 +1579,7 @@
{
"cell_type": "code",
"execution_count": 21,
- "id": "9afc6b72",
+ "id": "010412ef",
"metadata": {
"collapsed": false,
"editable": true
@@ -1561,7 +1603,7 @@
},
{
"cell_type": "markdown",
- "id": "7f2fc375",
+ "id": "7ce88191",
"metadata": {
"editable": true
},
@@ -1572,7 +1614,7 @@
{
"cell_type": "code",
"execution_count": 22,
- "id": "cbc85bec",
+ "id": "a4d5242e",
"metadata": {
"collapsed": false,
"editable": true
@@ -1601,7 +1643,7 @@
},
{
"cell_type": "markdown",
- "id": "b337f90a",
+ "id": "ba84ea2f",
"metadata": {
"editable": true
},
@@ -1612,7 +1654,7 @@
{
"cell_type": "code",
"execution_count": 23,
- "id": "76726d66",
+ "id": "a103cdb2",
"metadata": {
"collapsed": false,
"editable": true
@@ -1627,7 +1669,7 @@
},
{
"cell_type": "markdown",
- "id": "6ff77496",
+ "id": "02bc34d7",
"metadata": {
"editable": true
},
@@ -1644,7 +1686,7 @@
},
{
"cell_type": "markdown",
- "id": "ea702c20",
+ "id": "d68103fb",
"metadata": {
"editable": true
},
@@ -1675,7 +1717,7 @@
},
{
"cell_type": "markdown",
- "id": "0163eb8a",
+ "id": "5e2025d2",
"metadata": {
"editable": true
},
@@ -1687,7 +1729,7 @@
},
{
"cell_type": "markdown",
- "id": "0209e4d8",
+ "id": "11992e75",
"metadata": {
"editable": true
},
@@ -1715,7 +1757,7 @@
{
"cell_type": "code",
"execution_count": 24,
- "id": "41d73769",
+ "id": "85077eaf",
"metadata": {
"collapsed": false,
"editable": true
@@ -1745,7 +1787,7 @@
},
{
"cell_type": "markdown",
- "id": "68af9dfc",
+ "id": "7361b098",
"metadata": {
"editable": true
},
@@ -1762,7 +1804,7 @@
},
{
"cell_type": "markdown",
- "id": "479a081e",
+ "id": "37c9f040",
"metadata": {
"editable": true
},
@@ -1774,7 +1816,7 @@
},
{
"cell_type": "markdown",
- "id": "d6b186d7",
+ "id": "e099e855",
"metadata": {
"editable": true
},
@@ -1795,7 +1837,7 @@
},
{
"cell_type": "markdown",
- "id": "3fc1b8f2",
+ "id": "bfa670a8",
"metadata": {
"editable": true
},
@@ -1808,7 +1850,7 @@
},
{
"cell_type": "markdown",
- "id": "54687f81",
+ "id": "434bc077",
"metadata": {
"editable": true
},
@@ -1839,7 +1881,7 @@
},
{
"cell_type": "markdown",
- "id": "9485eaba",
+ "id": "eb86f88b",
"metadata": {
"editable": true
},
@@ -1851,7 +1893,7 @@
},
{
"cell_type": "markdown",
- "id": "44214414",
+ "id": "9a06387f",
"metadata": {
"editable": true
},
@@ -1869,7 +1911,7 @@
{
"cell_type": "code",
"execution_count": 25,
- "id": "a2a65064",
+ "id": "acd64adc",
"metadata": {
"collapsed": false,
"editable": true
@@ -1896,7 +1938,7 @@
},
{
"cell_type": "markdown",
- "id": "454cec21",
+ "id": "98086fd8",
"metadata": {
"editable": true
},
@@ -1918,7 +1960,7 @@
{
"cell_type": "code",
"execution_count": 26,
- "id": "acd8f3fd",
+ "id": "e207ded5",
"metadata": {
"collapsed": false,
"editable": true
@@ -1956,7 +1998,7 @@
},
{
"cell_type": "markdown",
- "id": "16475736",
+ "id": "8ebb5f42",
"metadata": {
"editable": true
},
@@ -1967,7 +2009,7 @@
},
{
"cell_type": "markdown",
- "id": "3b5b788d",
+ "id": "4859e43d",
"metadata": {
"editable": true
},
@@ -1980,7 +2022,7 @@
},
{
"cell_type": "markdown",
- "id": "f208e562",
+ "id": "0d4114d0",
"metadata": {
"editable": true
},
@@ -2001,7 +2043,7 @@
},
{
"cell_type": "markdown",
- "id": "45046c79",
+ "id": "78b3ad0a",
"metadata": {
"editable": true
},
@@ -2013,7 +2055,7 @@
},
{
"cell_type": "markdown",
- "id": "819c4bb4",
+ "id": "aabc7214",
"metadata": {
"editable": true
},
@@ -2023,7 +2065,7 @@
},
{
"cell_type": "markdown",
- "id": "6aa03642",
+ "id": "2aac86cb",
"metadata": {
"editable": true
},
@@ -2035,7 +2077,7 @@
},
{
"cell_type": "markdown",
- "id": "4c5dff94",
+ "id": "ac79d9d0",
"metadata": {
"editable": true
},
@@ -2047,7 +2089,7 @@
},
{
"cell_type": "markdown",
- "id": "815c742c",
+ "id": "31f0eb04",
"metadata": {
"editable": true
},
@@ -2059,7 +2101,7 @@
},
{
"cell_type": "markdown",
- "id": "2ffa89ec",
+ "id": "e00bb3ab",
"metadata": {
"editable": true
},
@@ -2070,7 +2112,7 @@
},
{
"cell_type": "markdown",
- "id": "be1b15a4",
+ "id": "d4765e0e",
"metadata": {
"editable": true
},
@@ -2082,7 +2124,7 @@
},
{
"cell_type": "markdown",
- "id": "6b717384",
+ "id": "c5f5fb0c",
"metadata": {
"editable": true
},
@@ -2104,7 +2146,7 @@
},
{
"cell_type": "markdown",
- "id": "ba22d919",
+ "id": "0a8be4a0",
"metadata": {
"editable": true
},
@@ -2116,7 +2158,7 @@
},
{
"cell_type": "markdown",
- "id": "12d9ca40",
+ "id": "30e2636c",
"metadata": {
"editable": true
},
@@ -2129,7 +2171,7 @@
},
{
"cell_type": "markdown",
- "id": "d2082fed",
+ "id": "a512a151",
"metadata": {
"editable": true
},
@@ -2146,7 +2188,7 @@
},
{
"cell_type": "markdown",
- "id": "8cdda555",
+ "id": "6ecd4798",
"metadata": {
"editable": true
},
@@ -2158,7 +2200,7 @@
},
{
"cell_type": "markdown",
- "id": "478a8dfd",
+ "id": "2c6b8380",
"metadata": {
"editable": true
},
@@ -2168,7 +2210,7 @@
},
{
"cell_type": "markdown",
- "id": "0325080a",
+ "id": "843d9187",
"metadata": {
"editable": true
},
@@ -2180,7 +2222,7 @@
},
{
"cell_type": "markdown",
- "id": "0d1536d1",
+ "id": "2f6f5ff7",
"metadata": {
"editable": true
},
@@ -2190,7 +2232,7 @@
},
{
"cell_type": "markdown",
- "id": "08e275b6",
+ "id": "b4b5b297",
"metadata": {
"editable": true
},
@@ -2202,7 +2244,7 @@
},
{
"cell_type": "markdown",
- "id": "900e3c55",
+ "id": "13988aae",
"metadata": {
"editable": true
},
@@ -2212,7 +2254,7 @@
},
{
"cell_type": "markdown",
- "id": "6facc4f8",
+ "id": "24fc5034",
"metadata": {
"editable": true
},
@@ -2224,7 +2266,7 @@
},
{
"cell_type": "markdown",
- "id": "0cd149b4",
+ "id": "ab016ba1",
"metadata": {
"editable": true
},
@@ -2240,7 +2282,7 @@
},
{
"cell_type": "markdown",
- "id": "9ccdfd7b",
+ "id": "17f20239",
"metadata": {
"editable": true
},
@@ -2252,7 +2294,7 @@
},
{
"cell_type": "markdown",
- "id": "4b508cb1",
+ "id": "58cfb00d",
"metadata": {
"editable": true
},
@@ -2263,7 +2305,7 @@
},
{
"cell_type": "markdown",
- "id": "e12ee8a7",
+ "id": "68641403",
"metadata": {
"editable": true
},
@@ -2275,7 +2317,7 @@
},
{
"cell_type": "markdown",
- "id": "1b25bfb9",
+ "id": "15c94577",
"metadata": {
"editable": true
},
@@ -2289,7 +2331,7 @@
},
{
"cell_type": "markdown",
- "id": "2940e11c",
+ "id": "88483594",
"metadata": {
"editable": true
},
@@ -2301,7 +2343,7 @@
},
{
"cell_type": "markdown",
- "id": "5169d12e",
+ "id": "42f817c5",
"metadata": {
"editable": true
},
@@ -2326,7 +2368,7 @@
},
{
"cell_type": "markdown",
- "id": "1c420810",
+ "id": "075c12e4",
"metadata": {
"editable": true
},
@@ -2343,7 +2385,7 @@
{
"cell_type": "code",
"execution_count": 27,
- "id": "4eb4abff",
+ "id": "0a3b3e19",
"metadata": {
"collapsed": false,
"editable": true
@@ -2387,7 +2429,7 @@
},
{
"cell_type": "markdown",
- "id": "82f01e78",
+ "id": "ea0efa85",
"metadata": {
"editable": true
},
@@ -2398,7 +2440,7 @@
{
"cell_type": "code",
"execution_count": 28,
- "id": "c709fcd5",
+ "id": "be0f4bee",
"metadata": {
"collapsed": false,
"editable": true
@@ -2420,7 +2462,7 @@
},
{
"cell_type": "markdown",
- "id": "b7491475",
+ "id": "dd531dd4",
"metadata": {
"editable": true
},
@@ -2437,7 +2479,7 @@
{
"cell_type": "code",
"execution_count": 29,
- "id": "a215d75e",
+ "id": "e379d60d",
"metadata": {
"collapsed": false,
"editable": true
@@ -2458,7 +2500,7 @@
},
{
"cell_type": "markdown",
- "id": "e1aaee3d",
+ "id": "cd59bf0f",
"metadata": {
"editable": true
},
@@ -2472,7 +2514,7 @@
{
"cell_type": "code",
"execution_count": 30,
- "id": "1d19ba3e",
+ "id": "865e271b",
"metadata": {
"collapsed": false,
"editable": true
@@ -2501,7 +2543,7 @@
},
{
"cell_type": "markdown",
- "id": "15725a2a",
+ "id": "e888bd58",
"metadata": {
"editable": true
},
@@ -2521,7 +2563,7 @@
{
"cell_type": "code",
"execution_count": 31,
- "id": "0e788b8f",
+ "id": "58051452",
"metadata": {
"collapsed": false,
"editable": true
@@ -2538,7 +2580,7 @@
},
{
"cell_type": "markdown",
- "id": "35635ebf",
+ "id": "2b148727",
"metadata": {
"editable": true
},
@@ -2550,7 +2592,7 @@
{
"cell_type": "code",
"execution_count": 32,
- "id": "d3830053",
+ "id": "3898e394",
"metadata": {
"collapsed": false,
"editable": true
@@ -2568,7 +2610,7 @@
},
{
"cell_type": "markdown",
- "id": "ade216b4",
+ "id": "ade766c2",
"metadata": {
"editable": true
},
@@ -2579,7 +2621,7 @@
{
"cell_type": "code",
"execution_count": 33,
- "id": "ecdbe0d1",
+ "id": "f2285a69",
"metadata": {
"collapsed": false,
"editable": true
@@ -2592,7 +2634,7 @@
},
{
"cell_type": "markdown",
- "id": "2fd80a52",
+ "id": "5d3b479c",
"metadata": {
"editable": true
},
@@ -2604,7 +2646,7 @@
{
"cell_type": "code",
"execution_count": 34,
- "id": "4399220f",
+ "id": "74bdf81b",
"metadata": {
"collapsed": false,
"editable": true
@@ -2635,7 +2677,7 @@
},
{
"cell_type": "markdown",
- "id": "d76393b3",
+ "id": "0d4e0363",
"metadata": {
"editable": true
},
@@ -2649,7 +2691,7 @@
{
"cell_type": "code",
"execution_count": 35,
- "id": "e56d7137",
+ "id": "cb71938c",
"metadata": {
"collapsed": false,
"editable": true
@@ -2689,7 +2731,7 @@
},
{
"cell_type": "markdown",
- "id": "4ff1fcc6",
+ "id": "7e02b0a1",
"metadata": {
"editable": true
},
@@ -2709,7 +2751,7 @@
},
{
"cell_type": "markdown",
- "id": "2317890c",
+ "id": "6dff51fd",
"metadata": {
"editable": true
},
@@ -2741,7 +2783,7 @@
},
{
"cell_type": "markdown",
- "id": "d09b810e",
+ "id": "359f6397",
"metadata": {
"editable": true
},
@@ -2763,7 +2805,7 @@
},
{
"cell_type": "markdown",
- "id": "c4721818",
+ "id": "bb5de61f",
"metadata": {
"editable": true
},
@@ -2791,7 +2833,7 @@
},
{
"cell_type": "markdown",
- "id": "5ad75777",
+ "id": "de6fb705",
"metadata": {
"editable": true
},
@@ -2806,7 +2848,7 @@
},
{
"cell_type": "markdown",
- "id": "5b7b9b00",
+ "id": "b0bb0c1e",
"metadata": {
"editable": true
},
@@ -2818,7 +2860,7 @@
},
{
"cell_type": "markdown",
- "id": "213b962e",
+ "id": "8f07cc73",
"metadata": {
"editable": true
},
@@ -2833,7 +2875,7 @@
},
{
"cell_type": "markdown",
- "id": "87d01a78",
+ "id": "b352b480",
"metadata": {
"editable": true
},
@@ -2846,7 +2888,7 @@
},
{
"cell_type": "markdown",
- "id": "41b5c639",
+ "id": "1a560c74",
"metadata": {
"editable": true
},
@@ -2858,7 +2900,7 @@
},
{
"cell_type": "markdown",
- "id": "f2acb49d",
+ "id": "2e1820f1",
"metadata": {
"editable": true
},
@@ -2868,7 +2910,7 @@
},
{
"cell_type": "markdown",
- "id": "3098dc4c",
+ "id": "c93a7bc1",
"metadata": {
"editable": true
},
@@ -2879,7 +2921,7 @@
},
{
"cell_type": "markdown",
- "id": "d5305090",
+ "id": "3e452e14",
"metadata": {
"editable": true
},
@@ -2897,7 +2939,7 @@
},
{
"cell_type": "markdown",
- "id": "95c67e77",
+ "id": "1ed0dfa4",
"metadata": {
"editable": true
},
@@ -2908,7 +2950,7 @@
},
{
"cell_type": "markdown",
- "id": "bfe8e242",
+ "id": "dfa05ce5",
"metadata": {
"editable": true
},
@@ -2920,7 +2962,7 @@
},
{
"cell_type": "markdown",
- "id": "860a44f3",
+ "id": "dab3d06b",
"metadata": {
"editable": true
},
@@ -2930,7 +2972,7 @@
},
{
"cell_type": "markdown",
- "id": "7274dfa4",
+ "id": "b16a97e0",
"metadata": {
"editable": true
},
@@ -2942,7 +2984,7 @@
},
{
"cell_type": "markdown",
- "id": "8e52a6d8",
+ "id": "961bda9a",
"metadata": {
"editable": true
},
@@ -2952,7 +2994,7 @@
},
{
"cell_type": "markdown",
- "id": "328a3a9c",
+ "id": "586ee350",
"metadata": {
"editable": true
},
@@ -2964,7 +3006,7 @@
},
{
"cell_type": "markdown",
- "id": "84556cf1",
+ "id": "e6622150",
"metadata": {
"editable": true
},
@@ -2974,7 +3016,7 @@
},
{
"cell_type": "markdown",
- "id": "8c5c598e",
+ "id": "cbee01d2",
"metadata": {
"editable": true
},
@@ -2993,7 +3035,7 @@
},
{
"cell_type": "markdown",
- "id": "05689d0a",
+ "id": "21bf5124",
"metadata": {
"editable": true
},
@@ -3003,7 +3045,7 @@
},
{
"cell_type": "markdown",
- "id": "9cc073a6",
+ "id": "685dd5ed",
"metadata": {
"editable": true
},
@@ -3015,7 +3057,7 @@
},
{
"cell_type": "markdown",
- "id": "bb73f304",
+ "id": "c7b53dc6",
"metadata": {
"editable": true
},
@@ -3025,7 +3067,7 @@
},
{
"cell_type": "markdown",
- "id": "627027c1",
+ "id": "440f0bf4",
"metadata": {
"editable": true
},
@@ -3041,7 +3083,7 @@
},
{
"cell_type": "markdown",
- "id": "5d3ea777",
+ "id": "48389fc4",
"metadata": {
"editable": true
},
@@ -3061,7 +3103,7 @@
},
{
"cell_type": "markdown",
- "id": "fba2787b",
+ "id": "5b83ff43",
"metadata": {
"editable": true
},
@@ -3071,7 +3113,7 @@
},
{
"cell_type": "markdown",
- "id": "a488c3c7",
+ "id": "7352a8e7",
"metadata": {
"editable": true
},
@@ -3082,7 +3124,7 @@
},
{
"cell_type": "markdown",
- "id": "43600a4f",
+ "id": "1f0de609",
"metadata": {
"editable": true
},
@@ -3101,7 +3143,7 @@
},
{
"cell_type": "markdown",
- "id": "294b6cf3",
+ "id": "d48db9cf",
"metadata": {
"editable": true
},
@@ -3111,7 +3153,7 @@
},
{
"cell_type": "markdown",
- "id": "0be409e0",
+ "id": "e700ba03",
"metadata": {
"editable": true
},
@@ -3123,7 +3165,7 @@
},
{
"cell_type": "markdown",
- "id": "ad976853",
+ "id": "73bf075f",
"metadata": {
"editable": true
},
@@ -3133,7 +3175,7 @@
},
{
"cell_type": "markdown",
- "id": "4c20a13b",
+ "id": "4ccdace2",
"metadata": {
"editable": true
},
@@ -3144,7 +3186,7 @@
},
{
"cell_type": "markdown",
- "id": "8ee383d8",
+ "id": "5b09d07c",
"metadata": {
"editable": true
},
@@ -3164,7 +3206,7 @@
},
{
"cell_type": "markdown",
- "id": "ac288b00",
+ "id": "946d5c2f",
"metadata": {
"editable": true
},
@@ -3176,7 +3218,7 @@
},
{
"cell_type": "markdown",
- "id": "8d8ab7d4",
+ "id": "1439d9f4",
"metadata": {
"editable": true
},
@@ -3191,7 +3233,7 @@
{
"cell_type": "code",
"execution_count": 36,
- "id": "a1b40696",
+ "id": "7d384e68",
"metadata": {
"collapsed": false,
"editable": true
@@ -3271,7 +3313,7 @@
},
{
"cell_type": "markdown",
- "id": "dff61564",
+ "id": "1fd12ad5",
"metadata": {
"editable": true
},
@@ -3281,7 +3323,7 @@
},
{
"cell_type": "markdown",
- "id": "8267620a",
+ "id": "00274a09",
"metadata": {
"editable": true
},
@@ -3293,7 +3335,7 @@
},
{
"cell_type": "markdown",
- "id": "5eddb96d",
+ "id": "7303cb2d",
"metadata": {
"editable": true
},
@@ -3303,7 +3345,7 @@
},
{
"cell_type": "markdown",
- "id": "3b9a06c9",
+ "id": "724d4727",
"metadata": {
"editable": true
},
@@ -3314,7 +3356,7 @@
},
{
"cell_type": "markdown",
- "id": "b3d22dec",
+ "id": "ebfcbcef",
"metadata": {
"editable": true
},
@@ -3326,7 +3368,7 @@
},
{
"cell_type": "markdown",
- "id": "52d45077",
+ "id": "469b6963",
"metadata": {
"editable": true
},
@@ -3336,7 +3378,7 @@
},
{
"cell_type": "markdown",
- "id": "1b23ec3b",
+ "id": "820e6328",
"metadata": {
"editable": true
},
@@ -3348,7 +3390,7 @@
},
{
"cell_type": "markdown",
- "id": "98fdff2c",
+ "id": "131bd48c",
"metadata": {
"editable": true
},
@@ -3358,7 +3400,7 @@
},
{
"cell_type": "markdown",
- "id": "a7f75d3c",
+ "id": "853aedf4",
"metadata": {
"editable": true
},
@@ -3370,7 +3412,7 @@
},
{
"cell_type": "markdown",
- "id": "68e21088",
+ "id": "14b04a25",
"metadata": {
"editable": true
},
@@ -3383,7 +3425,7 @@
},
{
"cell_type": "markdown",
- "id": "e8abe889",
+ "id": "43b330b0",
"metadata": {
"editable": true
},
@@ -3395,7 +3437,7 @@
},
{
"cell_type": "markdown",
- "id": "0255f172",
+ "id": "75f20146",
"metadata": {
"editable": true
},
@@ -3405,7 +3447,7 @@
},
{
"cell_type": "markdown",
- "id": "8a440be9",
+ "id": "3daa1d6f",
"metadata": {
"editable": true
},
@@ -3417,7 +3459,7 @@
},
{
"cell_type": "markdown",
- "id": "04bb320e",
+ "id": "6ad974c9",
"metadata": {
"editable": true
},
@@ -3429,7 +3471,7 @@
},
{
"cell_type": "markdown",
- "id": "40d5c4a1",
+ "id": "2e4305d4",
"metadata": {
"editable": true
},
@@ -3440,7 +3482,7 @@
},
{
"cell_type": "markdown",
- "id": "a6418af7",
+ "id": "2f9fe566",
"metadata": {
"editable": true
},
@@ -3452,7 +3494,7 @@
},
{
"cell_type": "markdown",
- "id": "014e9042",
+ "id": "3bfc51ac",
"metadata": {
"editable": true
},
@@ -3471,7 +3513,7 @@
},
{
"cell_type": "markdown",
- "id": "18c85d4d",
+ "id": "4b321c02",
"metadata": {
"editable": true
},
@@ -3484,7 +3526,7 @@
},
{
"cell_type": "markdown",
- "id": "6a318d90",
+ "id": "2a9efbd4",
"metadata": {
"editable": true
},
@@ -3494,7 +3536,7 @@
},
{
"cell_type": "markdown",
- "id": "094849ce",
+ "id": "2212d60c",
"metadata": {
"editable": true
},
@@ -3506,7 +3548,7 @@
},
{
"cell_type": "markdown",
- "id": "4a72a9a3",
+ "id": "cf837cdd",
"metadata": {
"editable": true
},
@@ -3516,7 +3558,7 @@
},
{
"cell_type": "markdown",
- "id": "ccb5f392",
+ "id": "0b5da68e",
"metadata": {
"editable": true
},
@@ -3528,7 +3570,7 @@
},
{
"cell_type": "markdown",
- "id": "b5b747f0",
+ "id": "7c7fc277",
"metadata": {
"editable": true
},
@@ -3538,7 +3580,7 @@
},
{
"cell_type": "markdown",
- "id": "11c9e419",
+ "id": "0bd8ddf4",
"metadata": {
"editable": true
},
@@ -3550,7 +3592,7 @@
},
{
"cell_type": "markdown",
- "id": "a1357ba7",
+ "id": "5811c625",
"metadata": {
"editable": true
},
@@ -3561,7 +3603,7 @@
},
{
"cell_type": "markdown",
- "id": "aa6f5ba5",
+ "id": "3f3c4a79",
"metadata": {
"editable": true
},
@@ -3573,7 +3615,7 @@
},
{
"cell_type": "markdown",
- "id": "2efe88d6",
+ "id": "4ed110f2",
"metadata": {
"editable": true
},
@@ -3583,7 +3625,7 @@
},
{
"cell_type": "markdown",
- "id": "9a81093e",
+ "id": "cab2f951",
"metadata": {
"editable": true
},
@@ -3595,7 +3637,7 @@
},
{
"cell_type": "markdown",
- "id": "44206ad3",
+ "id": "7a7b56a5",
"metadata": {
"editable": true
},
@@ -3605,7 +3647,7 @@
},
{
"cell_type": "markdown",
- "id": "c9d6713c",
+ "id": "08d08b2d",
"metadata": {
"editable": true
},
@@ -3617,7 +3659,7 @@
},
{
"cell_type": "markdown",
- "id": "e37aa158",
+ "id": "9c646b80",
"metadata": {
"editable": true
},
@@ -3638,7 +3680,7 @@
},
{
"cell_type": "markdown",
- "id": "b9377cde",
+ "id": "dde99653",
"metadata": {
"editable": true
},
@@ -3652,7 +3694,7 @@
},
{
"cell_type": "markdown",
- "id": "c3218515",
+ "id": "9f3fb34e",
"metadata": {
"editable": true
},
@@ -3663,7 +3705,7 @@
},
{
"cell_type": "markdown",
- "id": "8fd7d728",
+ "id": "db344823",
"metadata": {
"editable": true
},
@@ -3675,7 +3717,7 @@
},
{
"cell_type": "markdown",
- "id": "14cb56aa",
+ "id": "61e44a0e",
"metadata": {
"editable": true
},
@@ -3685,7 +3727,7 @@
},
{
"cell_type": "markdown",
- "id": "1519e60d",
+ "id": "509aac41",
"metadata": {
"editable": true
},
@@ -3697,7 +3739,7 @@
},
{
"cell_type": "markdown",
- "id": "f17f6aa8",
+ "id": "a000e9fa",
"metadata": {
"editable": true
},
@@ -3707,7 +3749,7 @@
},
{
"cell_type": "markdown",
- "id": "4de54d52",
+ "id": "a3343b17",
"metadata": {
"editable": true
},
@@ -3719,7 +3761,7 @@
},
{
"cell_type": "markdown",
- "id": "5d851fc9",
+ "id": "48c6b6af",
"metadata": {
"editable": true
},
@@ -3731,7 +3773,7 @@
},
{
"cell_type": "markdown",
- "id": "2ca737b0",
+ "id": "fc122976",
"metadata": {
"editable": true
},
@@ -3745,7 +3787,7 @@
{
"cell_type": "code",
"execution_count": 37,
- "id": "77572116",
+ "id": "0fbcca2d",
"metadata": {
"collapsed": false,
"editable": true
@@ -3760,7 +3802,7 @@
},
{
"cell_type": "markdown",
- "id": "30932aee",
+ "id": "758a1e50",
"metadata": {
"editable": true
},
@@ -3771,7 +3813,7 @@
{
"cell_type": "code",
"execution_count": 38,
- "id": "453072b4",
+ "id": "3575e050",
"metadata": {
"collapsed": false,
"editable": true
@@ -3784,7 +3826,7 @@
},
{
"cell_type": "markdown",
- "id": "d675b16a",
+ "id": "bc5f85fb",
"metadata": {
"editable": true
},
@@ -3795,7 +3837,7 @@
{
"cell_type": "code",
"execution_count": 39,
- "id": "b577bfca",
+ "id": "107d0a2e",
"metadata": {
"collapsed": false,
"editable": true
@@ -3818,7 +3860,7 @@
},
{
"cell_type": "markdown",
- "id": "4055b759",
+ "id": "b020b2fe",
"metadata": {
"editable": true
},
@@ -3832,7 +3874,7 @@
{
"cell_type": "code",
"execution_count": 40,
- "id": "5545e710",
+ "id": "550e501a",
"metadata": {
"collapsed": false,
"editable": true
@@ -3845,7 +3887,7 @@
},
{
"cell_type": "markdown",
- "id": "06939136",
+ "id": "d3ab7269",
"metadata": {
"editable": true
},
@@ -3856,7 +3898,7 @@
{
"cell_type": "code",
"execution_count": 41,
- "id": "1d5079e3",
+ "id": "ce77a7b6",
"metadata": {
"collapsed": false,
"editable": true
@@ -3868,7 +3910,7 @@
},
{
"cell_type": "markdown",
- "id": "1666218d",
+ "id": "1b343bd6",
"metadata": {
"editable": true
},
@@ -3879,7 +3921,7 @@
{
"cell_type": "code",
"execution_count": 42,
- "id": "55a748fc",
+ "id": "a6ee8f6b",
"metadata": {
"collapsed": false,
"editable": true
@@ -3895,7 +3937,7 @@
},
{
"cell_type": "markdown",
- "id": "4f4392ba",
+ "id": "887283fb",
"metadata": {
"editable": true
},
@@ -3906,7 +3948,7 @@
{
"cell_type": "code",
"execution_count": 43,
- "id": "4dce658c",
+ "id": "64b00cc9",
"metadata": {
"collapsed": false,
"editable": true
@@ -3920,7 +3962,7 @@
},
{
"cell_type": "markdown",
- "id": "4f374ed9",
+ "id": "31e77ba1",
"metadata": {
"editable": true
},
@@ -3942,7 +3984,7 @@
},
{
"cell_type": "markdown",
- "id": "4876a47e",
+ "id": "22a5a11c",
"metadata": {
"editable": true
},
@@ -3954,7 +3996,7 @@
},
{
"cell_type": "markdown",
- "id": "f86ba864",
+ "id": "f8bb38f1",
"metadata": {
"editable": true
},
@@ -3964,7 +4006,7 @@
},
{
"cell_type": "markdown",
- "id": "cfc2d9e4",
+ "id": "098ccfdf",
"metadata": {
"editable": true
},
@@ -3976,7 +4018,7 @@
},
{
"cell_type": "markdown",
- "id": "b0a00072",
+ "id": "e5ad677a",
"metadata": {
"editable": true
},
@@ -3988,7 +4030,7 @@
},
{
"cell_type": "markdown",
- "id": "fbc4a9a7",
+ "id": "5ab5dcb5",
"metadata": {
"editable": true
},
@@ -3998,7 +4040,7 @@
},
{
"cell_type": "markdown",
- "id": "923d258a",
+ "id": "f3f67204",
"metadata": {
"editable": true
},
@@ -4010,7 +4052,7 @@
},
{
"cell_type": "markdown",
- "id": "00d46164",
+ "id": "09c4318a",
"metadata": {
"editable": true
},
@@ -4020,7 +4062,7 @@
},
{
"cell_type": "markdown",
- "id": "d8b6297c",
+ "id": "909a2965",
"metadata": {
"editable": true
},
@@ -4032,7 +4074,7 @@
},
{
"cell_type": "markdown",
- "id": "63678deb",
+ "id": "cf0da466",
"metadata": {
"editable": true
},
@@ -4042,7 +4084,7 @@
},
{
"cell_type": "markdown",
- "id": "86822cb1",
+ "id": "c9ba449e",
"metadata": {
"editable": true
},
@@ -4054,7 +4096,7 @@
},
{
"cell_type": "markdown",
- "id": "972c87e8",
+ "id": "94fd1ba7",
"metadata": {
"editable": true
},
@@ -4066,7 +4108,7 @@
},
{
"cell_type": "markdown",
- "id": "f43b4b40",
+ "id": "effa0a51",
"metadata": {
"editable": true
},
@@ -4076,7 +4118,7 @@
},
{
"cell_type": "markdown",
- "id": "fb3a5ae5",
+ "id": "45357419",
"metadata": {
"editable": true
},
@@ -4088,7 +4130,7 @@
},
{
"cell_type": "markdown",
- "id": "f2fd2cce",
+ "id": "d22f6281",
"metadata": {
"editable": true
},
@@ -4098,7 +4140,7 @@
},
{
"cell_type": "markdown",
- "id": "e9e6857b",
+ "id": "0d2e8411",
"metadata": {
"editable": true
},
@@ -4110,7 +4152,7 @@
},
{
"cell_type": "markdown",
- "id": "326ec852",
+ "id": "32c1bcfe",
"metadata": {
"editable": true
},
@@ -4122,7 +4164,7 @@
},
{
"cell_type": "markdown",
- "id": "0d42e31c",
+ "id": "39f6ec74",
"metadata": {
"editable": true
},
@@ -4134,7 +4176,7 @@
},
{
"cell_type": "markdown",
- "id": "cd92f211",
+ "id": "2170c05a",
"metadata": {
"editable": true
},
@@ -4144,7 +4186,7 @@
},
{
"cell_type": "markdown",
- "id": "6d5fe9aa",
+ "id": "24b74f49",
"metadata": {
"editable": true
},
@@ -4156,7 +4198,7 @@
},
{
"cell_type": "markdown",
- "id": "2fdc34a4",
+ "id": "cab1d0d1",
"metadata": {
"editable": true
},
@@ -4166,7 +4208,7 @@
},
{
"cell_type": "markdown",
- "id": "0cf7936e",
+ "id": "2d4bcc65",
"metadata": {
"editable": true
},
@@ -4178,7 +4220,7 @@
},
{
"cell_type": "markdown",
- "id": "46dc832c",
+ "id": "494acf56",
"metadata": {
"editable": true
},
@@ -4188,7 +4230,7 @@
},
{
"cell_type": "markdown",
- "id": "17ef219f",
+ "id": "2cb123f7",
"metadata": {
"editable": true
},
@@ -4200,7 +4242,7 @@
},
{
"cell_type": "markdown",
- "id": "a6001544",
+ "id": "0e94f612",
"metadata": {
"editable": true
},
@@ -4211,7 +4253,7 @@
},
{
"cell_type": "markdown",
- "id": "4136a9b1",
+ "id": "d7326c6f",
"metadata": {
"editable": true
},
@@ -4223,7 +4265,7 @@
},
{
"cell_type": "markdown",
- "id": "4bab4668",
+ "id": "22bae57f",
"metadata": {
"editable": true
},
@@ -4233,7 +4275,7 @@
},
{
"cell_type": "markdown",
- "id": "8503a466",
+ "id": "29588a0f",
"metadata": {
"editable": true
},
@@ -4245,7 +4287,7 @@
},
{
"cell_type": "markdown",
- "id": "acebbb73",
+ "id": "e4a2d1a6",
"metadata": {
"editable": true
},
@@ -4255,7 +4297,7 @@
},
{
"cell_type": "markdown",
- "id": "a0e470e4",
+ "id": "1ff072b1",
"metadata": {
"editable": true
},
@@ -4267,7 +4309,7 @@
},
{
"cell_type": "markdown",
- "id": "84f2e2c0",
+ "id": "344cbfc0",
"metadata": {
"editable": true
},
@@ -4280,7 +4322,7 @@
},
{
"cell_type": "markdown",
- "id": "b7cc163c",
+ "id": "af6cc1a6",
"metadata": {
"editable": true
},
@@ -4292,7 +4334,7 @@
},
{
"cell_type": "markdown",
- "id": "8953dfb1",
+ "id": "50cec712",
"metadata": {
"editable": true
},
@@ -4304,7 +4346,7 @@
},
{
"cell_type": "markdown",
- "id": "2cb115a7",
+ "id": "8494b17b",
"metadata": {
"editable": true
},
@@ -4316,7 +4358,7 @@
},
{
"cell_type": "markdown",
- "id": "d6f34272",
+ "id": "ca97ec42",
"metadata": {
"editable": true
},
@@ -4328,7 +4370,7 @@
},
{
"cell_type": "markdown",
- "id": "2b36aea1",
+ "id": "6479caaf",
"metadata": {
"editable": true
},
@@ -4340,7 +4382,7 @@
},
{
"cell_type": "markdown",
- "id": "da39c7c2",
+ "id": "0944a215",
"metadata": {
"editable": true
},
@@ -4350,7 +4392,7 @@
},
{
"cell_type": "markdown",
- "id": "d7a7ac4d",
+ "id": "bb33e6e1",
"metadata": {
"editable": true
},
@@ -4362,7 +4404,7 @@
},
{
"cell_type": "markdown",
- "id": "82e5bf7c",
+ "id": "96d5f253",
"metadata": {
"editable": true
},
@@ -4374,7 +4416,7 @@
},
{
"cell_type": "markdown",
- "id": "57faaafb",
+ "id": "6e419723",
"metadata": {
"editable": true
},
@@ -4387,7 +4429,7 @@
},
{
"cell_type": "markdown",
- "id": "cc36108e",
+ "id": "5bef33e0",
"metadata": {
"editable": true
},
@@ -4414,7 +4456,7 @@
},
{
"cell_type": "markdown",
- "id": "1e5920e6",
+ "id": "192c7553",
"metadata": {
"editable": true
},
@@ -4425,7 +4467,7 @@
{
"cell_type": "code",
"execution_count": 44,
- "id": "b52c1ccc",
+ "id": "34097fd5",
"metadata": {
"collapsed": false,
"editable": true
@@ -4521,7 +4563,7 @@
},
{
"cell_type": "markdown",
- "id": "d77e47fc",
+ "id": "2fa21abe",
"metadata": {
"editable": true
},
@@ -4536,7 +4578,7 @@
},
{
"cell_type": "markdown",
- "id": "9371eac4",
+ "id": "b8fa894e",
"metadata": {
"editable": true
},
@@ -4558,7 +4600,7 @@
{
"cell_type": "code",
"execution_count": 45,
- "id": "49020a5d",
+ "id": "c5715ff8",
"metadata": {
"collapsed": false,
"editable": true
@@ -4633,7 +4675,7 @@
},
{
"cell_type": "markdown",
- "id": "5d235262",
+ "id": "7a8c83af",
"metadata": {
"editable": true
},
@@ -4645,7 +4687,7 @@
},
{
"cell_type": "markdown",
- "id": "cadd6ee8",
+ "id": "ce26db44",
"metadata": {
"editable": true
},
@@ -4714,7 +4756,7 @@
},
{
"cell_type": "markdown",
- "id": "6bc5a255",
+ "id": "a65a7114",
"metadata": {
"editable": true
},
@@ -4728,7 +4770,7 @@
{
"cell_type": "code",
"execution_count": 46,
- "id": "16b02923",
+ "id": "ee436103",
"metadata": {
"collapsed": false,
"editable": true
@@ -4741,7 +4783,7 @@
},
{
"cell_type": "markdown",
- "id": "e37ebeec",
+ "id": "a881fa7b",
"metadata": {
"editable": true
},
@@ -4755,7 +4797,7 @@
},
{
"cell_type": "markdown",
- "id": "0a8dd3f4",
+ "id": "af1c710e",
"metadata": {
"editable": true
},
@@ -4768,7 +4810,7 @@
},
{
"cell_type": "markdown",
- "id": "a66141af",
+ "id": "d9a7ea38",
"metadata": {
"editable": true
},
@@ -4779,7 +4821,7 @@
},
{
"cell_type": "markdown",
- "id": "0ca097c7",
+ "id": "d393b8c3",
"metadata": {
"editable": true
},
@@ -4791,7 +4833,7 @@
},
{
"cell_type": "markdown",
- "id": "e4c0c356",
+ "id": "336b8349",
"metadata": {
"editable": true
},
@@ -4801,7 +4843,7 @@
},
{
"cell_type": "markdown",
- "id": "e849196e",
+ "id": "72ecebac",
"metadata": {
"editable": true
},
@@ -4813,7 +4855,7 @@
},
{
"cell_type": "markdown",
- "id": "b54e2b79",
+ "id": "1e60e799",
"metadata": {
"editable": true
},
@@ -4824,7 +4866,7 @@
},
{
"cell_type": "markdown",
- "id": "ad58752a",
+ "id": "e4b747a5",
"metadata": {
"editable": true
},
@@ -4843,7 +4885,7 @@
{
"cell_type": "code",
"execution_count": 47,
- "id": "da5d2b40",
+ "id": "7bf53784",
"metadata": {
"collapsed": false,
"editable": true
@@ -4859,7 +4901,7 @@
},
{
"cell_type": "markdown",
- "id": "8643bcca",
+ "id": "5295fa46",
"metadata": {
"editable": true
},
@@ -4869,7 +4911,7 @@
},
{
"cell_type": "markdown",
- "id": "afc41799",
+ "id": "98de6d4d",
"metadata": {
"editable": true
},
@@ -4880,7 +4922,7 @@
},
{
"cell_type": "markdown",
- "id": "43359aab",
+ "id": "6f00f03c",
"metadata": {
"editable": true
},
@@ -4891,7 +4933,7 @@
},
{
"cell_type": "markdown",
- "id": "d0d8d542",
+ "id": "399a419f",
"metadata": {
"editable": true
},
diff --git a/doc/src/week34/week34.do.txt b/doc/src/week34/week34.do.txt
index 70a99a979..54e9bf957 100644
--- a/doc/src/week34/week34.do.txt
+++ b/doc/src/week34/week34.do.txt
@@ -22,6 +22,19 @@ o On Thursdays we have a regular lecture. These lectures start at 1215pm and end
The first week we start with simple linear regression, a repetition of
linear algebra and elements of statistics needed for the course.
+!split
+===== AI/ML and some statements you may have heard (and what do they mean?) =====
+
+o Fei-Fei Li on ImageNet: _map out the entire world of objects_ ("The data that transformed AI research":"https://cacm.acm.org/news/219702-the-data-that-transformed-ai-research-and-possibly-the-world/fulltext")
+o Russell and Norvig in their popular textbook: _relevant to any intellectual task; it is truly a universal field_ ("Artificial Intelligence, A modern approach":"http://aima.cs.berkeley.edu/")
+o Woody Bledsoe puts it more bluntly: _in the long run, AI is the only science_ (quoted in Pamilla McCorduck, "Machines who think":"https://www.pamelamccorduck.com/machines-who-think")
+
+
+If you wish to have a critical read on AI/ML from a societal point of view, see "Kate Crawford's recent text Atlas of AI":"https://www.katecrawford.net/"
+
+_Here: with AI/ML we intend a collection of machine learning methods with an emphasis on statistical learning and data analysis_
+
+
!split
===== Schedule first week =====
@@ -118,6 +131,19 @@ Projects are handed in using _Canvas_. We use Github as repository for codes, be
!eblock
+!split
+===== Grading and deadlines =====
+
+
+!bblock Activity and Percentage of total score
+o First project, _due October 9_, 1/3%
+o Second project, _due November 6_, 1/3%
+o Third project, _due December 11_, 1/3%
+o Extra Credit (not mandatory), weekly exercise assignments, 10 in total (due Friday same week), 20% additional score
+!eblock
+
+The extra credit assignments are due each Friday and can be uploaed to _canvas_ in your preferred format (although we prefer jupyter-notebooks). First assignment is for week 35.
+
!split
===== Recommended textbooks =====
@@ -2606,3 +2632,6 @@ Add now a model which allows you to make polynomials up to degree $15$. Perform
+
+
+