Machine Learning
We also have models that walk around with the dataset in their carry-on. These are models such as:
- Decision Trees
- SVM
- Nonparametric Regressions: K-nearest neighbours, Locally Weighted
- Random Forests
deep learning pipeline
Recall that a Neural Network follows the following construction:
- Pass data (forward) through model to get predicted values
- Calculate loss with predicted values against labels
- Perform backpropagation w.r.t each weight / bias to get the direction in which to move that weight such that it moves closer to the global minima
- Update parameters with gradients using an optimiser.
momentum
ball’s pace slows down this makes total fkn sense! if the gradient signs are the same, increasing your confidence in that direction and move further. you want to take less steps over all
This accounts for about 60% of the Machine Learning Methods we have.
By definition a parametric model is one that has fixed parameters to learn, i.e. weights in Linear Regression: \(w_0, w_1, …, w_n\). Conversely, a non-parametric model does not have a fixed number of parameters to learn: K-means clustering for example just clusters the data as best as it can.
We can list some more models:
- Linear Regression
- Ridge Regression
- Lasso Regression
- Logistic Regression
- Neural Networks
- Perceptron
- Naive Bayes
Intro
The focus here is on EDA (Exploratory Data Analysis) and investigating the best choice for the \(\lambda\) hyperparameter for LASSO and Ridge Regression.
We will be working on the Life Expectancy CSV data obtained from WHO.
Peeking at Data
We begin by viewing the columns of the Life Expectancy Dataframe:
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
pd.options.display.float_format = '{:.2f}'.format
le_df = pd.read_csv("life_expectancy.csv")
le_df.columns
We can then view the range of our life expectancy values with a box plot:
Backlinks (3)
1. My Undergraduate Computer Science Degree /blog/ugrad-unsw/
Summary
It took me 1,577 days to complete my undergraduate degree in Computer Science.
Overall, I think the degree was worthwhile and satiated my desire to obtain an understanding of Computers from the bit-level.
2. Literate Programming and Donald Knuth /blog/literate-programming/
I was first introduced to this concept by Distrotube (Derek Taylor’s) “literate config” files. At the time I was not using emacs and thus all the code I was writing was sparingly commented.
Since then, I have entered a world of Machine Learning and Deep Learning, where suddenly in 4 lines, I can sit atop my high-horse and perform sentiment analysis with tensorflow and keras!
from transformers import pipeline
classifier = pipeline('sentiment-analysis')
prediction = classifier("Donald Knuth was the greatest computer scientist.")[0]
print(prediction)
In such an age of abstraction complexity, it becomes paramount to distill what is happening at the last few \((n-k)\) layers.
3. Wiki /wiki/
Knowledge is a paradox. The more one understand, the more one realises the vastness of his ignorance.