Posts

Showing posts with the label machine learning

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

CONVOLUTION: KERNALS FOR FEATURE EXTRACTION IN IMAGE PROCESSING

Image
An image as simple as 200x200 is too much information for a Nueral network or a computer to understand. The machine learning algorithm like logic regression cannot process the 200x200 information of image, even if it does, the results may not be favourable at all. The accuracy of Nueral Network totally depend upon the input we've given it. So in machine learning the NN's preprocess the input and extract necessary information from the input. Something advance such as CONVOLUTION NUERAL NETWORK(CNN) perform feature extraction. In order to extract feature from an image we need convolution in image processing. Convolution is process in signal processing which is used to combine 2 signals. More about convolution in here . Here the convolution in computer vision is for feature extraction . We extract important details from image like Edges,noise removal,etc... The extraction of important data can be achieved by using a KERNAL .  The kernal method is used for sharping,embrose,smoo

A FORMAL INTRO TO MACHINE LEARNING USING LOGISTIC REGRESSION FROM SCRATCH

Image
The machine learning  is all about making computer or a machine like Robot! to do stuff without actually telling every single thing via programming...here the computer or a machine just learns how to do the stuff.., it'll figure it out like you and me. how it does that?...well that's math!! for you...yes, literally it figure it out using mathematics. What kind of it??? well for starters if you ever had any math class in your university or school...that'll do!  Ok that being said we gonna learn little bit of ML(machine learning). especially the one called supervised learning. Supervised Learning : is a kind of method telling the computer what to do whether than how to do..in technical term we call it as specifying "LABELS" for prediction... Say we have a data on a phone parts like camera, storage, ram, 5G or 4G, brand (apple, Samsung, etc..) and their prices. we need to predict the price of a new phone based on specs from our previous data on specs and brand. her