Skip to main content

Intro to Generative Adversarial Networks | GANs 001

   GANs consist of three terms Generative Adversarial Network. Let's understand these three terms first. Generative : A Generative Model takes input training sample from some distribution and learns to represents that distribution. Adversarial : It basically means Conflicting or Opposing. Networks : These are basically neural networks. So,Generative Adversarial Networks are deep neural network architecture comprising of two neural networks compete with each other to make a generative model. A GAN consist of two class models : Discriminative Model :- It is the one that discriminate between two different classes of data.It tries to identify real data from fakes created by the generator Generative Model :- The Generator turns noise into an imitation of the data to try to trick the discriminator Mathematically, A Generative Model 'G' to be trained on training data 'X' sampled from some true distribution 'D' is the one which, given some standard random distrib...

Linear Regression for Machine Learning | Intro On Linear Regresssion 2021

 What is Linear Regression?

This Algorithm is used to find the relationship between 2 continuous variables [ one independent variable and one dependent variable ]. It is a linear model which assumes a linear relationship between input and output variables. If we have single input variables then we call it as simple linear regression, if we have multiple we call it as multiple linear regression. It is both a statistical algorithm and machine language algorithm. 

The Equation is 'Y = M * X + C'

Y = Independent Value

M = Slope/Weight

X = Dependent Value

C = Bias

The Core idea is to obtain a line that best fits the data. 'Y' is the output variable we want to predict, X is the input variable and M & C can be called as coefficients that we need to estimate.

To find m and b values we have methods like statistical method or ordinary least squares or gradient descent.

How does it Work?

Goal is to find the best fit line which minimize the error ( distance between the line and the data point ). The value of 'm' & 'b' must be choose so that they minimize the error. So the algorithm will try multiple m and b values and calculate the error. Finally it takes the best m and b which has low error.

We can calculate the error in multiple ways like by using mean squared error formula as loss function. This helps us to evaluate the performance of the model

Mean Squared Error = (1/n) sum(yi -yi^)^2

n = total no of samples

y = acute value

yi = predicted value

Advantages

  • Linear Regression is simple to implement and easier to interpret the output coefficients.
  • High Performance on linearly separable datasets.
  • Linear Regression is susceptible to over-fitting but it can be avoided using some dimensionality reduction techniques  

 Disadvantages

  • Prone to Underfitting.
  • Sensitive to outliers.
  • Linear Regression assumes that the data is independent.

Comments

Popular posts from this blog

Best IDE's For Programming in Dart | 2020

Dart is a general-purpose programming language that is open source. Originally, it was developed by Google and later accepted by ECMA as a standard. Dart is a new programming language that is intended both for the server and the browser.The Dart SDK ships with its compiler – the Dart VM .For various devices, it is a client-optimized programming language for applications. It is developed by Google and is used to construct apps for the smartphone, tablet, cloud, and web.  Best IDE's For Programming in Dart IntelliJ IDEA The Dart plugin adds Dart support to JetBrains IDEs such as IntelliJ IDEA with support for many other languages and systems, IntelliJ IDEA is an articulate Java IDE.For the development of computer applications, IntelliJ Concept is an interactive development environment written in Java. It is built by JetBrains, and is available in a proprietary commercial version as an Apache 2 Certified community edition. Android Studio    Android Studio used for Android ...