Member Login - User Registration - Set as Homepage - Add to Favorites - Website Map Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka - Ep20!

Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka - Ep20

Time: 2025-07-11 11:34:18 Source: Codora.ai Author: solidity Reading: 470 times
I'llshow you a demo on ai skills for beginnersthe classificationalgorithms right now our next algorithmis something known as KN bias right KNbias is again a supervised uhclassification algorithm which is basedon the base theorem now the base theorembasically follows a probabilisticapproach the main idea behind knif biasis that the predictor variables in amachine Lear learning model areindependent of each other meaning thatthe outcome of a model depends on a setof independent variables that havenothing to do with each other right nowa lot of you might ask why is naive biascalled naive now usually when I tellanybody about naive bias they keepasking me why is naive bias called naiveso in real world problems predictorvariables aren't always independent ofeach other there is always somecorrelation between the independentvariables now because naive biasconsiders each predictor variable to beindependent of any other variable in themodel it is called naive right this isan assumption that naive bias takes nowlet's understand the math behind thenaive bias algorithm so like I mentionedthe principle behind naive bias is thebias theorem which is also known as abias rule okay the bias theorem is usedto calculate the conditional probabilitywhich is nothing but the probability ofa an event occurring based oninformation about the events in the pastright this is the mathematical equationuh for the bias theorem now in thisequation the LHS is nothing but theconditional probability of event aoccurring given the event B P of a isnothing but probability of event aoccurring P of B is probability of eventB and PB of a is nothing but theconditional probability of event Boccurring given the event anow let's try to understand how naivebias works now consider this data set ofaround 1,500 observations okay here wehave the following output classes wehave either cat parrot or Turtle okaythese are our output classes and thepredictive variables are uh swim Wingsgreen color and sharp teeth okay sobasically your type is your outputvariable and swim Wings Green and sharpteeth are your predictor variables youroutput variable has three classes catparrot and turtle okay now I'vesummarized this table as shown on thescreen all right the first thing you cansee is the class of type cats shows thatout of 500 cats 450 can swim rightmeaning that 90% of them can and zeronumber of cats have wings and zeronumber of cats are green in color and500 out of 500 cats have sharp te teethokay now coming to parrots it says 50out of 500 parrots have true value forswim now guys obviously this does nothold true in real world right I don'tthink there are any parrots who can swimbut I've just created this data set sothat you can understand naive bias rightso meaning that 10% of parrots have truevalue for swim now all 500 parrots havewings and 400 out of 500 parrots aregreen in color and zero parrots havesharp teeth right coming to the turtleclass all 500 Turtles can swim zeronumber of turtles have wings and out of500 100 Turtles are green in colormeaning that uh 20% of the turtles aregreen in color and 50 out of 500 turtleshave sharp teeth right so that's what weunderstand from this data set now theproblem here is we given a observationover here okay we given some value forswim Wings Green and sharp teeth what weneed to do is we need to predict whetherthe animal is a cat parrot or a turtlebased on these values right so the goalhere is to predict whether it is a catparrot or a turtle based on all thesedefined parameters okay based on thevalue of swim Wings Green and sharpteeth we'll understand whether theanimal is a cat or is it a parrot or isit a turtle so if you look at theobservation the variables swim and greenhave a value of true right and theoutcome can be any one of the types itcan either be a cat it can be a parrotor it can be a turtle so in order tocheck if the animal is a cat all youhave to do is you have to calculate theconditional probability at each step sohere what we're doing is we need tocalculate the probability that this is acat given that it can swim and it isgreen in color first we'll calculate theprobability that it can swim given thatit's a cat into the probability that itis green and the probability of it beinggreen given that it is a cat and thenwe'll multiply it with the probabilityof it being a cat divided by theprobability of swim and green okay soguys I know you can calculate theprobability it's quite simple so onceyou calculate the probability hereyou'll get a direct value of zero okayyou'll get a value of zero meaning thatthis animal is definitely not a catsimilarly if you do this for p youcalculate the conditional probabilityyou'll get a value of0.264 divided by probability of swimcomma green right we don't know thisprobability similarly if you check thisfor the turtle you'll get a probabilityof 0.066 divided by P swim comma greenokay now for these calculations thedenominator is the same right the valueof the denominator is the same and thevalue of and the probability of of itbeing a turtle is greater than that of aparrot right so that's how we cancorrectly predict that the animal isactually a turtle all right so guys thisis how knife bias works you basicallycalculate the conditional probability ateach step whatever classification needsto be done that has to be calculatedthrough probability there's a lot ofstatistic that comes into knif bias andif youall want to learn more aboutstatistics and probability I'll leave alink in the description you can watchthat video as well right there haveexplained exactly what conditionalprobability is and the bias theorem isalso explained very well so you all cancheck out that video also and apart fromthis if youall have any doubts regardingany of the algorithms please leave themin the comment section okay I'll solveyour doubts and apart from that I'llalso leave a couple of links for each ofthe algorithms in the description boxbecause if you want more in-depthunderstanding of each of the algorithmsyou can check out that content rightsince this is

(Editor in charge: swift)

Related content
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep211
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep5
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep228
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep192
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep188
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep70
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep288
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep132
Recommended content
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep24
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep66
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep126
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep117
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep136
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep187