Posts

Showing posts with the label math

The Loss function/Cost Function

Image
In this post we are gonna learn about the loss function in machine learning..The loss functions are essential in machine learning cause they are one who tells the algorithm if it makes mistake in prediction as wrong. so The Loss function/Cost Function are integral part of gradient descent and entropy calculations. Here we are gonna learn a bit about the different cost functions for different types of problems in machine learning. Mathematical Formula for Entropy : Consider a data set having a total number of N classes, then the entropy (E) can be determined with the formula below: Where: P i  = Probability of randomly selecting an example in class I; Entropy always lies between 0 and 1, however depending on the number of classes in the dataset, it can be greater than 1. But the high value of Let's understand it with an example where we have a dataset having three colors of fruits as red, green, and yellow. Suppose we have 2 red, 2 green, and 4 yellow observations throughout the dat

DISCRETE FOURIER TRANSFORMATION(DFT)

Image
In this post we are gonna learn about fourier transformation and implementation of Discrete fourier transformation in python. Why we need to use fourier transformation anyway...a normal periodic wave like sine wave has 3 characterstics like Phase,amplitude,frequency that tell us about the wave..it's easy and understandable but what if a wave is unperiodic like this ex. in this example it is not a periodic sinewave..so but an multiple frequencies of waves added together. Hence to analyse these kind of waves we need fourier transformation in signal processing. The fourier transforamation is applied in both Continous and Discrete waves . .In this we are gonna concentrate in DFT(Discrete fourier transformation)..and to visulalize the wave we are gonna use python(cause it's easy to use). we need the following python library to do this : 1.numpy    2.seaborn    3.mathplotlib     DFT(DISCRETE FOURIER TRANSFORMATION) It is applied to specifically discete signals. It is used to break th