Thursday, November 14, 2019

linear algebra, vector, linear transformation, matrix, dot product , cross product



Ref:


  dot product , cross product
  1.  https://physics.stackexchange.com/questions/333877/can-anyone-tell-me-that-actually-what-vector-multiplication-is
  2. https://physics.stackexchange.com/questions/14082/what-is-the-physical-significance-of-dot-cross-product-of-vectors-why-is-divi
  3. https://en.wikipedia.org/wiki/Dot_product
  4. https://en.wikipedia.org/wiki/Cross_product#Geometric_meaning (VVI) 
  5. https://www.youtube.com/watch?v=KDHuWxy53uM&feature=youtu.be (dot product discription ****) 
  6. https://math.stackexchange.com/questions/805954/what-does-the-dot-product-of-two-vectors-represent (see accepted answer **** )

dot product:

The dot product tells you what amount of one vector goes in the direction of another.


Cross product : (https://en.wikipedia.org/wiki/Cross_product#Geometric_meaning)

Wednesday, November 13, 2019

Principle component analysis (PCA)


PCA ref:
benefits:
  • reduce the dimension so improve the performence
  • try to keep 99% of variance  retained

Application of PCA
  • Compression
    • reduce the memory/disk need to store data
    • speed up the learning alogorithm
  •  Visualization
    • 2D/3D for visualization 

Before implemening PCA, first try running whatever you want to do with the orginal data/raw data. Only if that does not do what you want, then consiser the PCA.

Eigenvalue and EigenVector



Ref:


Eigen Vector: Eigenvector is one kind of vector that's axis is not change during linear transformation. Eigenvector is associated with eigenvalue.



fully uderstanding the eigen vector and eigen value please see this vedio:

https://www.youtube.com/watch?v=PFDu9oVAE-g&list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab&index=15&t=0s



  1.  unique vector 
  2. then transform to another ventor 
  3.  



Wednesday, November 6, 2019

Thursday, October 31, 2019

Matrix: inverse matrix, matrix multipication, linear algebra

Cost function (Mean squire error) : Gradient Decent


Cost Function:

It is a function that measures the performance of a Machine Learning model for given data. Cost Function quantifies the error between predicted values and expected values and presents it in the form of a single real number. Depending on the problem Cost Function can be formed in many different ways. The purpose of Cost Function is to be either:
  • Minimized - then returned value is usually called cost, loss or error. The goal is to find the values of model parameters for which Cost Function return as small number as possible.
  • Maximized - then the value it yields is named a reward. The goal is to find values of model parameters for which returned number is as large as possible.

Gradient descent  :

an algorithm called gradient descent for minimizing the cost function.
It turns out gradient descent is a more general algorithm, and
is used not only in linear regression.
It's actually used all over the place in machine learning.
And later in the class, we'll use gradient descent to minimize
other functions as well, not just the cost function J for the linear regression


Andreu NG coursera.com 1week (*****) to see the gradient descent.
--  Firstly try to understand the cost function and gradient for one variable/ one parameter/ one dimensional.


Ref: 
  1. https://towardsdatascience.com/coding-deep-learning-for-beginners-linear-regression-part-2-cost-function-49545303d29f
  2. https://medium.com/@lachlanmiller_52885/machine-learning-week-1-cost-function-gradient-descent-and-univariate-linear-regression-8f5fe69815fd (VVI) 
  3. https://towardsdatascience.com/machine-learning-fundamentals-via-linear-regression-41a5d11f5220
  4. https://www.mathsisfun.com/calculus/derivatives-introduction.html (VVI)
  5. https://www.mathsisfun.com/calculus/derivatives-partial.html (VVI)
  6. https://www.quora.com/What-is-the-purpose-of-derivatives-in-calculus (VVI)

Thursday, October 24, 2019

Code commit, Code pipeline, Code deploy


Code Commit:  for development server, we have keep data in code commit. For production purse, we keep data in S3.

Code pipeline: during production deployment, using code pipeline deploy application data and code to multiple server



Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...