Page 133 - Artificial Intellegence_v2.0_Class_12
P. 133

p r ed iction= mod elT oI mp lement.p r ed ict( [ [ 5 .0 , 2 .0 , 1 , 0 .2 ] ] )  # p r ed iction w ith new  v alu es

                  (
            p r int p r ed iction)
            Output
               [ ' I r is- v er sicolor ' ]

               [ ' I r is- setosa' ]
             ode can be accessed through the link   https   colab.research.google.com
             drive  p   m p  g m      d  o  m tqa    usp sharing

                   Metrics of Model Quality—Simple Maths


             no ing  the  quality  of  predictions  is  important  in  assessing  the  performance  of  a  machine  learning  model.   he
            performance metrics, derived through simple mathematical calculations  hich provides ob ective measures of ho   ell
            the predictions align  ith the e pected outcomes.  etrics like classification accuracy and root mean squared error allo
            for comparisons bet een different models, data transformations, and configurations.  hese metrics play a vital role in
            implementing machine learning algorithms and are based on minimi ing or ma imi ing an ob ective function kno n as
            a loss function.

            A loss function is used by machines to learn. It's a  ay of determining ho   ell a certain algorithm models the data.
            If the forecasts are too far off from the actual findings, the loss function  ill return a very large number.  oss function
            learns to lo er prediction error over time  ith the help of some  optimisation ob ective function.

            In machine learning, there is no such thing as a one si e fits all loss function.  he type of machine learning method
            used, the ease of calculating derivatives, and to some e tent, the number of outliers in the dataset, all play a role in
            selecting a loss function for a certain task.

            Depending on the type of learning  ob  e're dealing  ith, loss functions can be divided into t o categories  regression
            losses and classification losses. In classification, the output is predicted from a set of finite categorical values.  or e ample,
            given a large data set of photographs of hand ritten numbers, categorising them into one of     digits.  egression,
            on the other hand, is concerned  ith predicting a continuous value, such as given the  oor area, number of rooms and
            room si e, predicting the price of the house.

                          Classi cation                                Regression



                                          og  oss                          ean  quare  rror  uadratic  oss


                                          ocal  oss                              ean Absolute  rror


                                                                               uber  oss  mooth  ean
                                  divergence   elative  ntropy
                                                                                   Absolute  rror


                                        ponential  oss                              og  ash  oss


                                         inge  oss                                  uantile  oss


            MS E ( Mean S q uar ed Er r or )
             he  ean  quared  rror     ) is the most basic and  idely used loss function, and it is frequently taught in  achine
             earning courses.  alculate the difference bet een the model's predictions and actual values, square it, and average it
            across the entire dataset to get the value of    .     is given by the equation
                                                                                       C apstone  P roj e ct  131
   128   129   130   131   132   133   134   135   136   137   138