Page 201 - Robotics and AI class 10
P. 201

• scipy.interpolate: This module deals with interpolation and approximation techniques, such as splines,
              B-splines, and radial basis functions.

               • scipy.linalg: This module deals with linear algebra - matrix factorisation, solving linear systems of equations,
              eigenvalue problems, and singular value decomposition (SVD).
               • scipy.signal: This module deals with signal processing tasks - filtering, spectral analysis, convolution, correlation,
              and wavelet transformations.

               • scipy.stats: This module deals with a wide range of statistical distributions, statistical functions, hypothesis
              testing, and statistical modeling tools.
               • scipy.spatial: This module deals with spatial data structures and algorithms, including distance computations,
              clustering, nearest neighbors, and spatial transformations.

               • scipy.fftpack: This module deals with functions for Fast Fourier transforms (FFT) and related operations for
              efficient spectral analysis.
            The programming in SciPy is beyond the scope of this book.
            Installing SciPy

            The command that installs SciPy is:
            pip install scipy
            Assuming that Python and pip are already installed in the computer.
            Statistical Learning with Python
            Now we all have understood that Data Sciences deals with data analysis and data manipulation . But this numeric &
            alpha-numeric data analysis and manipulation is not possible without the intervention of Mathematical Statistics.
            Python with supported libraries like NumPy, Matplotlib etc have a lot of pre-defined functions that implement
            Mathematical statistics without getting into the hassle of doing the calculations and creating the formulas or
            equations to find out the results. All we need to do is write that function and pass on the data to it. It’s that simple!
            Let us take a look at some basic statistical tools used in Python:

            ●  Mean
                 It is the average of numeric data in a given dataset. So we add all of the numbers together and divide by the
               number of data in the given set.
               It is calculated as :
               Mean = sum of all values / no. of values

               To calculate mean in Python :
               import statistics

              marks=[45,34,41,46,47,39,38,48,45,34,41,39,39]
              m=statistics.mean(marks)
              print("the average marks of the class :",round(m,2))
               Output:
               the average marks of the class : 41.23
            ●  Median
                 When the data is arranged in an ascending order then It is the middle number in a given dataset. If there are
               two middle numbers, taking the mean of these two numbers will give the median.

               For odd number of dataset:

                                                         Introduction to Data and Programming with Python  199
   196   197   198   199   200   201   202   203   204   205   206