Skip to content

Commit

Permalink
Added Supervised learning notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
anonyknight committed Jun 1, 2024
1 parent bb6fc0a commit fdabcda
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Learners need to eliminate as many as I can as a learner

### Steps

1. Show what's irrelabant.
1. Show what's irrelavant.
2. Show what's relevant.

### Learn with Constrained Queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags: ['OMSCS', 'Algorithms', 'Machine-Learning']
A problem:
**The goal** is to choose an action in response to each data point.

![RL Robot](./RL-Robot.png)
![RL Robot](../images/RL-Robot.png)

Robot: Sense Think Act cycle.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Neural Networks

Cell body -> Nevron -> Axon -> Synapses.

Perceptron

![NN](../images/SL3_Neural_Networks.png)

## Artificial Neural Networks

![NN](../images/SL3_ANN.png)

![ANN](../images/SL 3 - Neural Networks Artificial Neural Networks.png)

We need to pay attention to

* Activation function
* firing threshold

### How powerful is perceptron unit?

One activation function computes the half plane.

![perceptron](../images/SL3_perceptron_Unit.png)

What's the nice and short computing in the following?

### Boolean: AND

![perceptron_func](../images/SL3_perceptron_AND.png)

### Boolean: OR

![OR-Func](../images/SL3_perception_OR.png)

### Boolean: Not

![Unit-Not](../images/SL3_perception_NOT.png)

### XOR as Perceptron Network

![XOR](../images/SL3_perception_XOR.png)

## Perceptron Training

Given examples, find weights that map inputs to outputs.

* Perceptron rule (**threshold**)
* Gradient descent / delta rule (**un-thresholded**)

### Perceptron rules

Single Unit

The halting problem for iterations.

![perceptron-training](../images/SL3_perceptron_training.png)

## Gradient Descent

Avoid Non-linear separability issues.

![Gradient-descent](../images/SL3_Gradient_descent.png)

### Comparison of Learning rules

#### Perceptron analysis

guarantee to finite convergence only if linear separability
$$
\Delta W_i = \eta (y - y') x_i
$$
Eta = learning-rate

y = target

y' = output

#### Gradient Descent analysis

Calculus, robust, converge to local optimum

$$
\Delta W_i = \eta (y - a) x_i
$$

#### Comparing learning rules

![comparison-learning-rules](../images/SL3_compariso_of_learning_rules.png)

## Sigmoid - differentiable threshold

![Sigmoid](../images/SL3_sigmoid.png)

## Neural Network Sketch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: CS7641-SL
summary: CS7641 Supervised Learning
summary: CS7641 Supervised Learning types
date: 'January 22, 2022'
tags: ['OMSCS', 'Machine-Learning']
---
Expand All @@ -9,6 +9,31 @@ tags: ['OMSCS', 'Machine-Learning']

Discrete labels vs continuous label

### Regression

Mapping continuous input to output.

People's height **regresses** to the mean.

* What prevent us from all being the same height?

The noise from DNA combinations.

The idea to find the regression to function approximation.

## Linear regression

### Find the best fit functions for data point

Use calculus. Get assumption first, then find the optimal solution from calculus.

* Historical facts
* model selection and under/over fitting
* Cross validation
* Linear, polynomial regression
* Best constant in terms of squared error: mean
* Representation for regression.

## Classification Learning

* **Instances**: (Input vectors of values)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Give data set X, Y as the label, predict the Y' Label for the testing data set X
* SVM
* Artificial Neural Networks
* Random Forests

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/techs/OMSCS/CS7641-Machine-Learning/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ tags: ['OMSCS', 'Algorithms', 'Machine-Learning']

[Google AI Education](https://ai.google/education/)

**Note**: The goal of Machine Learning is "Generalization".

One meaning of "fold": A pen or enclosure in a field where livestock, esp. sheep, can be kept. (I don't think this meaning has anything to do with cross-validation, though.) Oh, wait, I found it: "consisting of so many parts or facets." So, *n-fold cross validation* means the data is in n parts. -ML

### Supervised Learning

The data points contain X and labeled Y.
Expand Down

0 comments on commit fdabcda

Please sign in to comment.