• Why do we need a K-NN algorithm
  • We classify the same day:  Overcast  Hot  High  False  Likelihoods:  P("Yes




    Download 1.94 Mb.
    Pdf ko'rish
    bet17/99
    Sana20.02.2023
    Hajmi1.94 Mb.
    #42897
    1   ...   13   14   15   16   17   18   19   20   ...   99
    Bog'liq
    Istedod ziyosi 2022 (2)
    10 Informatika Savollar UZB, 2 sinf 2 chorak matem, 3- 4 - MAVZU (1), 88888888888, Psixologik xizmatning o`rni va ahamiyati, 13-mavzu, 602629, ADSL, 11-sinf-Fizika-darslik, [05.10.2022 20 13] ТАШКЕНТ ЮЖНЫЙ НУКУС, Health food, О КУРСЕ, 15.Mehnat muhofazasi va texnika xavfsizligi hivWBz9, Tarmoqlar komp
     
    We classify the same day: 
    Overcast 
    Hot 
    High 
    False 
    Likelihoods: 
    P("Yes
    ") = 5/12 x 3/12 x 4/11 x 7/11 x 10/16 ≈ 0.015 
    P("No
    ") = 1/8 x 3/8 x 5/7 x 3/7 x 6/16 ≈ 0.005 
    (Normalized) probabilities: 
    P("Yes
    ") = 0.015/(0.015+0.05)≈75%Play="Yes
    P("No
    ") = 0.05/(0.015+0.05)≈25% 
    K-Nearest Neighbor (KNN) Algorithm 
    K-Nearest Neighbour is one of the simplest Machine Learning al-
    gorithms based on Supervised Learning technique. K-NN algorithm as-
    sumes the similarity between the new case/data and available cases and 
    put the new case into the category that is most similar to the available 
    categories. K-NN algorithm stores all the available data and classifies a 
    new data point based on the similarity. This means when new data ap-
    pears then it can be easily classified into a well suite category by using 
    K-NN algorithm. K-NN algorithm can be used for Regression as well as 
    for Classification but mostly it is used for the Classification problems. 
    K-NN is a non-parametric algorithm, which means it does not make 
    any assumption on underlying data and It is also called a lazy learner 
    algorithm because it does not learn from the training set immediately 
    instead it stores the dataset and at the time of classification, it performs 
    an action on the dataset. KNN algorithm at the training phase just stores 
    the dataset and when it gets new data, then it classifies that data into a 
    category that is much similar to the new data. 
    Why do we need a K-NN algorithm? Suppose there are two cate-
    gories, i.e., Category A and Category B, and we have a new data point 
    x1, so this data point will lie in which of these categories. To solve this 
    type of problem, we need a K-NN algorithm. With the help of K-NN, we 


    37 
    can easily identify the category or class of a particular dataset. Consider 
    the below diagram: 

    Download 1.94 Mb.
    1   ...   13   14   15   16   17   18   19   20   ...   99




    Download 1.94 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    We classify the same day:  Overcast  Hot  High  False  Likelihoods:  P("Yes

    Download 1.94 Mb.
    Pdf ko'rish