Posts

Basics of Neural networks

Image
  Neural networks  Imagine a group of people who have never seen " KOALA" (an animal) in their life!!! So now our job is to teach them if any image is of "KOALA" or not.... We create a team and ask each and every student to work and study each feature of the koala, such as Mike can work on detecting eyes, Jyoti works on forelimbs, Chen can work on hindlimbs, and Mohan can work on the nose. So they make assumptions by using a score of 0 to 1. For example, where 0 means definitely not Koala's eyes, 0.5 means maybe or maybe not Koala's eyes and 1 means definitely Koala's eyes. Then Serena, their superior notes down their observations and based on a formula tells us finally if an animal is a Koala or not.   This is nothing but a neural network. Each individual person here is an individual neuron. They're working on a particular subtask and pass the result of their subtask to the next group. Here, Serena and Nidhi are the hidden layer, Mike, Mohan, etc fo

Introduction to Jupyter and libraries

Image
What is jupyter? Jupyter is the short form of Julia, Python, and R. It's open-source software that creates interactive notebook documents containing live code, equations, visualizations, media, and other computational outputs. Moreover, it supports more than 40 languages as of now. What is pandas? Pandas is an open-source Python library.  It has functions for analyzing, cleaning, exploring, and manipulating data. Pandas has two types of data structures:  a) Series -It's a one-dimensional array with indexes, it stores a single column or row of data in a Data Frame. b) Data Frame - It's a tabular spreadsheet-like structure representing rows containing one or multiple columns. Why use pandas? Pandas allow us to analyze big data and make conclusions based on statistical theories. Pandas can clean messy data sets and make them readable and relevant. The process of cleaning messy data is called data munging or data wrangling.   Data Frame: It represents data using rows and column

What is a neuron?

Image
  Linear Regression Sigmoid or Logit function or Activation function. In our houses, we have LED lights that light up on turning on the switch and turn off on turning off the switch so similarly activation function gives yes or no results i.e., 0 or 1 results. In ML the input function (dependent variable) i.e. the age here is called a feature. This oval here represents a neuron. Neuron is basically a combination of linear equations and activation functions. Neural Network Neural network for handwritten digits

In depth of regression ml

Image
  On calculating the above example, we figure out that the value of slop =1.5 and the value of intercept (b) = -2. So, if we have a pizza having a diameter of 20 inches then substituting this value in y=mx+c we get y as 28 inches. Not all shopkeepers need to sell the pizza at the same price it may vary, this variation is known as error.

In depth of classification ml

Image
                                    Classification machine learning                       1. The k-Nearest Neighbors (k-NN) algorithm: Training data: Apple: (Weight: 150g, Color Intensity: 7) Orange: (Weight: 170g, Color Intensity: 6) Lemon: (Weight: 120g, Color Intensity: 10 ) N ew data p oint: Unknown Fruit: (Weight: 160g, Color Intensity: 8) Distance calculations:  The Euclidean distance between two points ( x 1 ​ , y 1 ​ ) and ( x 2 ​ , y 2 ​ ) in a 2-dimensional space is given by:  Distant to Apple = 10.5 Distant to Orange = 10.20 Distant to Lemon = 40.01 Result: Based on these distances, the unknown fruit is closest to the Apple (distance of 10.05), then the Orange (distance of 10.20), and farthest from the Lemon (distance of 40.01). If we were using k-NN with k=1, we would classify the unknown fruit as an Apple. If k=3, we need to look at the majority class among the nearest three fruits. 2. Naive Bayes Classifier: So, here the value of yes-fever is 0.17 and no-fever is 0.13..

Types of ML

Image
  Types of Machine Learning 1. Supervised learning: Learning from Examples : Imagine you're a teacher helping a student learn to recognize different animals. You show the students pictures of animals and tell them the name of each animal in the picture. The student learns by looking at the pictures and listening to your labels. Labeled Data: In machine learning, the pictures are called "data," and the names of the animals are called "labels." Together, they make "labeled data." Training a Model: The student is like the machine learning model. During the "training" phase, the model looks at the data (pictures) and the labels (animal names) to understand the relationship between them. Making Predictions: After learning from many examples, the model can look at a new picture (one it hasn't seen before) and guess the animal's name. This guessing is called "making predictions." Improvement Over Time: Just like the student gets b