Posts

Showing posts from June, 2024

Day 3

 Lets start with Random Forest  1. It combines the output of multiple decision tree to reach the single result. 2. It handles both regression and classification problems so we wont be having problems we encountered on Ordinary Square Method. 3. it is made of many decision tree but I am yet to learn decision tree. Lets move back and learn decision tree first. 1. Similar to Random forest as it can handle both regression and classification.  Lets drive into some math before we start: 1. Entropy (Information Gain): Measure's the impurity or disorder of set of data. High entropy means the data is more mixed up (e.g., equal numbers of different classes), while low entropy means it's more pure (mostly one class). 2. Information Gain it is a decrease in entropy achieved by splitting the data on particular attribute. One of the main attribute of decision tree is that it gives highest information gain, as this leads to most information splits. Formula for Entropy: Entropy(S) = - Σ ...

Linear Models Battle

Image
Linear Models Battle: Who Wins Disaster Tweet Prediction? On day three of my ML journey, I'm exploring different linear models to see how they work and which ones are most accurate. Before I start coding, I want to understand the two main learning approaches in machine learning: Supervised Learning 1. 1 Linear model Let's start by understanding what a linear model is. It's like a special tool that helps us make guesses (or predictions) when one thing seems to be related to another. Imagine this: Your favorite basketball player, Steph Curry, is practicing his 3-pointers. You notice a pattern: Scenario 1: He takes 100 shots and makes 10 of them. Scenario 2: He takes 200 shots and makes 40 of them. Now, you want to guess how many 3-pointers he might make if he takes 250 shots. A linear model can help us with that! Think of it like this: The Dots: Each scenario (100 shots, 10 makes; 200 shots, 40 makes) is like a dot on a piece of graph paper. The Line: A linear model trie...