update
This commit is contained in:
@@ -71,14 +71,46 @@ predictor, averaged over all $B$ trees.
|
||||
|
||||
Let us bring up our good old boostrap example from the linear regression lectures. We change the linerar regression algorithm with
|
||||
a decision tree wth different depths and perform a bootstrap aggregate (in this case we perform as many bootstraps as data points $n$).
|
||||
!bc pycod
|
||||
|
||||
!bc pycod
|
||||
# Common imports
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from sklearn.model_selection import train_test_split
|
||||
from sklearn.pipeline import make_pipeline
|
||||
from sklearn.utils import resample
|
||||
from sklearn.tree import DecisionTreeRegressor
|
||||
import pandas as pd
|
||||
from sklearn.tree import DecisionTreeClassifier
|
||||
from sklearn.model_selection import train_test_split
|
||||
from sklearn.preprocessing import StandardScaler, OneHotEncoder
|
||||
from sklearn.compose import ColumnTransformer
|
||||
from IPython.display import Image
|
||||
import os
|
||||
|
||||
# Where to save the figures and data files
|
||||
PROJECT_ROOT_DIR = "Results"
|
||||
FIGURE_ID = "Results/FigureFiles"
|
||||
DATA_ID = "DataFiles/"
|
||||
|
||||
if not os.path.exists(PROJECT_ROOT_DIR):
|
||||
os.mkdir(PROJECT_ROOT_DIR)
|
||||
|
||||
if not os.path.exists(FIGURE_ID):
|
||||
os.makedirs(FIGURE_ID)
|
||||
|
||||
if not os.path.exists(DATA_ID):
|
||||
os.makedirs(DATA_ID)
|
||||
|
||||
def image_path(fig_id):
|
||||
return os.path.join(FIGURE_ID, fig_id)
|
||||
|
||||
def data_path(dat_id):
|
||||
return os.path.join(DATA_ID, dat_id)
|
||||
|
||||
def save_fig(fig_id):
|
||||
plt.savefig(image_path(fig_id) + ".png", format='png')
|
||||
|
||||
|
||||
n = 100
|
||||
n_boostraps = 100
|
||||
@@ -1155,7 +1187,7 @@ o Jackknife and many other
|
||||
===== Other courses on Data science and Machine Learning at UiO =====
|
||||
|
||||
|
||||
o "FYS5429 Advanced Machine Learning and Data Analysis for the Physical Sciences":"https://www.uio.no/studier/emner/matnat/fys/FYS5429/index-eng.html"
|
||||
o "FYS5429 Advanced Machine Learning and Data Analysis for the Physical Sciences":"https://www.uio.no/studier/emner/matnat/fys/FYS5429/index-eng.html". Discussed deep learning and generative deep learning.
|
||||
o "FYS5419 Quantum Computing and Quantum Machine Learning":"https://www.uio.no/studier/emner/matnat/fys/FYS5419/index-eng.html"
|
||||
o "STK2100 Machine learning and statistical methods for prediction and classification":"http://www.uio.no/studier/emner/matnat/math/STK2100/index-eng.html".
|
||||
o "IN3050/IN4050 Introduction to Artificial Intelligence and Machine Learning":"https://www.uio.no/studier/emner/matnat/ifi/IN3050/index-eng.html". Introductory course in machine learning and AI with an algorithmic approach.
|
||||
@@ -1187,7 +1219,7 @@ networks have been proposed, such as
|
||||
o Convolutional neural networks, which are mostly used in image and video data processing, and have also been applied to sequential data such as text processing;
|
||||
o Recurrent neural networks, which can process sequential data of variable length and have been widely used in natural language understanding and speech processing;
|
||||
o Encoder-decoder framework, which is mostly used for image or sequence generation, such as machine translation, text summarization, and image captioning.
|
||||
|
||||
o _Generative deep learning_! Recent textbook by David Foster (and obviously many other ones) at URL:"https://www.oreilly.com/library/view/generative-deep-learning/9781492041931/""
|
||||
!split
|
||||
===== Types of Machine Learning, a repetition =====
|
||||
|
||||
@@ -1227,7 +1259,7 @@ Furthermore, they have been used to solve complicated "quantum mechanical many-p
|
||||
!split
|
||||
===== Boltzmann Machines =====
|
||||
|
||||
Why use a generative model rather than the more well known discriminative deep neural networks (DNN)?
|
||||
Why use a generative model rather than the more well known discriminative deep neural networks (DNN)? _Simplest approach to generative deep learning_.
|
||||
|
||||
* Discriminitave methods have several limitations: They are mainly supervised learning methods, thus requiring labeled data. And there are tasks they cannot accomplish, like drawing new examples from an unknown probability distribution.
|
||||
|
||||
@@ -1734,3 +1766,5 @@ FIGURE: [figures/Nebbdyr2.png, width=500 frac=0.6]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user