Posts

Showing posts from June, 2024

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 colu...

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                       The k-Nearest Neighbors (k-NN) algorithm: 1. Training data: Apple: (Weight: 150g, Color Intensity: 7) Orange: (Weight: 170g, Color Intensity: 6) Lemon: (Weight: 120g, Color Intensity: 10 ) 2. N ew data p oint: Unknown Fruit: (Weight: 160g, Color Intensity: 8) 3. 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 4. 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. Naive Bayes Classifier: So, here the value of yes-fe...

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...

Image segmentation

Image
Image Segmentation Image segmentation is a computer vision technique that divides an image into multiple segments or regions to simplify its representation and make it easier to analyze. In simpler terms, it's like coloring different parts of a picture so that a computer can understand and process each part separately. Face Recognition: Segmenting facial images to extract and analyze facial features for biometric identification and authentication. Tumor Detection: Segmenting medical images such as MRI or CT scans to identify and delineate tumors or other abnormalities. Defect Detection: Segmenting images of manufactured products to identify and classify defects such as scratches, cracks, or misalignments for quality control and inspection.                                                                1 . Semantic image segmentat...

Basics of AI

Image
What is Artificial Intelligence? Artificial intelligence (AI)  is the theory and development of computer systems capable of performing tasks that historically required human intelligence, such as recognizing speech, making decisions, and identifying patterns. AI is an umbrella term that encompasses a wide variety of technologies, including machine learning, deep learning,  and natural language processing (NLPs) .  What is Natural Language Processing? What it does : NLP is like teaching computers to understand and talk like humans. It helps computers understand what we say or write and respond in a way that makes sense. Example : When you ask Siri a question and she understands what you mean, that's NLP at work. It's also used for things like translating languages or checking grammar in text. What is Machine learning? What it does : ML is like teaching computers to learn from examples and make decisions on their own. It's about training computers to recognize patterns in d...