Skip to main content

Scale Vector Classifier

 Gaussian Radial Basis Function Kernel in SVC. 

    Gaussian Radial Basis (RBF) kernel used to classify non linearly separable data. It is a most powerful function to gain high accuracy. Non linearly separable data is shown as below as first image.

    In this type of data the data points are spread irregularly that's why it is hard to separate them in two dimensional plot, so we use RBF kernel. It is a transform function create landmark(y) in imaginary 3D space. See second image. Assume a data point x on the plane, kernel measures the distance from x to landmark(y) and create a circumference σ. if the data point x is closer to the landmark, the distance will be small and hence the point will be in the circumference. That way we can separate the data points using a circle having σ circumference by getting a projection a 2D plane.

    

    Equation of Gaussian Radial Basis Function: 

    

    k(x,y) = - exp( r||x-y||^2 / 2σ^2 )     

    

    where, r = 1/2d^2 > 0

           d = distance

           x = data point (which had to find out)

           y = landmark

           σ = circumference 





    

Comments

Popular posts from this blog

Gradient Descent with RSME

Optimization Alorithms Ex : G.D. , S.D. ,  Adam, RMS prop , momentum , adelta Gradient Descent is an  optimization algorithm that find a best fit line and local minima of a differentiable function for given training data set. S imply used to find the coefficients (weights) and intercept (bias) that minimize a cost function as far as possible.  There are three types of  g radient descent techniques:   Regular Batch GD (Gradient Descent) -  Studiously descend the curve in one path towards one minima ; every hop calculates the cost function for entire training data. If training data is large, one should not use this. Random GD (Stochastic GD) -   Calculates the Cost function for only one (randomly selected) training data per hop ; tend to jump all over the place due to randomness but due to it actually jump across minima’s.  Mini Batch gradient descent - Somewhere midway between the above 2. Does the calculation for a bunch of random data poin...

Python program to check if variable is of integer or string

Let's say if you want to input something of any datatype and want to get datatype only of it. So... Whenever you input some data whether it is string, integer or float like this: i = input('enter something here: ') means without int, str or float put before the syntax, that time your given input is always consider as string  or if you make it like this to add int before syntax; i = int(input('enter something here: '))  it always consider as integer and gives value error when you input string and same thing happens with float, So here is a program to solve this problem of input and get datatype var = input('input to check if variable is of integer or string: ') if var.isdigit() == False:     print(type(var)) else:     var1 = int(var)     print(type(var1))

Why python ? What is Python?

Python is a generally interpreted and  interactive dynamic symmetric   high-level  object oriented programming language. It is widely used in Machine Learning today. Pretty easy to understand, learn, code and explain because it has very crisp and clear syntaxes than other languages.  Guido van Rossum made Python in 1991, named his programming language after the television show Monty Python's Flying Circus. Python has got features or derived features from ABC named programming language. Interactive - The result will be printed on the screen, immediately return, in the next line as we entered. High-level - Humans can easy to interpret; the source code contains easy-to-read syntax that is later converted into a low-level language (0 , 1) Dynamic-symmetric – Don’t need to clarify the data type. It Allows the type casting. Type Casting –  We can transform the one data type in another data type Object Oriented – language is focused on Object...