Skip to content

About

Homeworks of course CSMath

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSMath-homeworks

Goal

Implement polynomial curve fitting in python and with TensorFlow (optionally).

  1. sample the function curve of y=sin(x) with Gaussian noise
  2. fit degree 3 and 9 curves in 10 samples
  3. fit degree 9 curves in 15 and 100 samples
  4. fit degree 9 curve in 10 samples but with regularization term

Requirements

  1. Programming lanuage: python
  2. Optional package: tensorflow web
  3. Plot the results in matplotlibIntroduction in Chinese Tutorial

Results

Fit degree 3 and 9 curves in 10 samples:
order3_num10
order9_num10
Fit degree 9 curves in 15 and 100 samples:
order9_num15
order9_num100
Fit degree 9 curve in 10 samples but with regularization term:
order9_num10_with_penality
Degree 9 in 10 and 100 samples using Tensorflow with regularization term (20000 iterations):
TF1
TF2

Goal

Represent digits '3' in 2D

  1. convert data from the UCI Optical Recognition of Handwritten Digits Data Set
  2. perform PCA over all digit '3' with 2 components
  3. plot the PCA results

Requirements

  1. Programming lanuage: python
  2. Plot the results in matplotlib
  3. Use TensorFlow if possible

Results

First digit '3' in the dataset:
PCA1
PCA over all digit '3' with 2 components:
PCA2
Raw digit '3' on red dots above:
PCA3
Visualization of mean and first 2 components of digit '3':
PCA4

3. MOG

Goal

Implement MOG in 2D case

  1. Generate sampling points from a 2D Gaussian distribution
  2. Generate sampling points from a 2D Mixture of Gaussian (MOG) distribution
  3. Estimate parameters of generated data via step2 by using the E-M method
  4. Plot iteration results

Requirements

  1. Programming lanuage: python
  2. Plot the results in matplotlib

Results

Using EM method to learn parameters of 2D-MOG distribution:
MOG1
Comparison of estimated (dashed) and actual (solid) values:
MOG2
4D-MOG using EM method:
MOG3
MOG4

Goal

Implement the Levenberg-Marquardt method

Requirements

  1. Programming lanuage: python
  2. Design your own testing functions

Results

Testing function is : LM  

5. SVM

Goal

Implement (simplified) SVM method

  1. input 2D data and their label (in two classes)
  2. implement quadratic programming
  3. output (and plot) classification results

Requirements

  1. Programming lanuage: python
  2. Plot the results in matplotlib

Results

Data and label generated using sklearn:
SVM1
SVM using linear kernel ('o' for training and 'x' for testing):
SVM2
SVM using rbf kernel:
SVM2
SVM using polynomial kernel:
SVM2

About

Homeworks of course CSMath

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages