Page 314 - Ai_C10_Flipbook
P. 314

19.  What is Anaconda?
                Ans.  Anaconda is a popular, free and open-source distribution of Python and R for Windows, Linux, and macOS. It gives you
                    the facility of working on all Domains of AI at one place by installing many packages with a single installation process.
                 20.  What are modules? Give examples.
                Ans.  A Python module is a file containing Python definitions and statements. A module can define functions, classes, and
                    variables. A module can also include runnable code. Examples are NumPy, Pandas etc.
                 21.  Why do we use the NumPy package?

                Ans.  NumPy can be used to perform a wide variety of mathematical operations on arrays.
                 22.  Give two differences between NumPy-Arrays and Python-Lists.

                Ans.  A list cannot directly handle a mathematical operation, while arrays can.
                    A list is easier to modify as compared to arrays.
                 23.  Differentiate between the = and == operators used in Python.
                Ans.  The ‘=’ operator is used to assign value to a variable whereas ‘==’ operator is used to compare two values.
                 24.  What are box plots in matplotlib?
                Ans.  A box plot which is also known as a whisker plot displays a summary of a set of data containing the minimum, first
                    quartile, median, third quartile, and maximum.
                 25.  What are outlier data and which graph is best to plot it using matplotlib?
                Ans.  Outliers are extreme observations in the dataset. So a rule to determine if a data point is extreme is to compare
                    it against the interquartile range. The best graph to visualize outliers in a dataset using matplotlib is the box plot
                    (also known as a box-and-whisker plot). The box plot is specifically designed to show the distribution of data and
                    highlight outliers.
                 26.  How does NumPy handle multidimensional arrays?
                Ans.  NumPy handles multidimensional arrays using the ndarray object, which can store data in multiple dimensions like
                    matrices or higher-order tensors.
                 27.  What are the various types of plots that can be created using Matplotlib?
                Ans.  Matplotlib allows creating line plots, bar plots, histograms, scatter plots, pie charts, and more.
                 28.  How do you create a basic line plot using Matplotlib?
                Ans.  A basic line plot in Matplotlib can be created using plt.plot(x, y) followed by plt.show().
                 29.  How do you read and display an image using OpenCV?
                Ans.  OpenCV reads and displays an image using cv2.imread() to read and cv2.imshow() to display the image.
                 30.  How can you perform aggregation or grouping of data in Pandas?
                Ans.  Aggregation or grouping in Pandas can be done using groupby() followed by an aggregation function like sum() or
                    mean().
                 31.  How do you read data from a CSV file into a Pandas DataFrame?

                Ans.  Data from a CSV file can be read into a Pandas DataFrame using pd.read_csv('filename.csv').
                 32.  How would you solve a simple linear equation or system of equations using SciPy?

                Ans.  To solve a linear equation, use scipy.linalg.solve() or scipy.optimize.fsolve() for systems of equations.
                 33.  What are the main steps involved in text preprocessing for NLP tasks?

                Ans.  Text preprocessing for NLP typically involves tokenization, stopword removal, lowercasing, and lemmatization.
                 34.  What is tokenization in NLP, and why is it an essential step in text preprocessing?
                Ans.  Tokenization splits text into smaller units like words or subwords, which is essential for analyzing text and building
                    models.









                    312     Artificial Intelligence Play (Ver 1.0)-X
   309   310   311   312   313   314   315   316   317   318   319