NASHEEEEYYYYYY
NASHEEEEYYYYYY
AI VS AI
UNIT 01
A) Discrete data
B) Continuous data
C) Ordinal data
D) Both A and B
Answer: C
A) Randomized values
B) Data collected over different categories
C) Data points indexed in time order
D) Lack of time dependency
Answer: C
A) Audio files
B) Images
C) Videos
D) All of the above
Answer: D
A) Supervised learning
B) Unsupervised learning
C) Reinforcement learning
D) None of the above
Answer: A
12. The process of identifying and assigning meaningful labels to raw data is called:
A) Data annotation
B) Data cleansing
C) Data extraction
D) Data transformation
Answer: A
A) Decision Trees
B) Principal Component Analysis (PCA)
C) Sequential Forward Selection (SFS)
D) K-Means Clustering
Answer: C
A) Reduces dimensionality
B) Improves model accuracy
C) Handles correlated features effectively
D) All of the above
Answer: D
A) Feature selection
B) Feature extraction
C) Data labeling
D) Clustering
Answer: B
23. Which feature selection method ranks features based on importance scores?
A) Wrapper method
B) Filter method
C) Embedded method
D) None of the above
Answer: B
A) Model interpretability
B) Overfitting
C) Data redundancy
D) Model complexity
Answer: B
A) Feature transformation
B) Decision tree-based feature selection
C) Feature encoding
D) Model evaluation
Answer: B
A) Model accuracy
B) Class imbalance
C) The dependency between two variables
D) Feature extraction efficiency
Answer: C
A) Data sparsity
B) Multicollinearity
C) Model underfitting
D) Data augmentation
Answer: B
A) High-dimensional datasets
B) Low-dimensional datasets
C) Time-series analysis only
D) Feature selection algorithms
Answer: A
A) Model interpretability
B) Training time
C) Model generalization
D) Overfitting
Answer: C
A) Ordinal data
B) Highly correlated features
C) Nominal categorical data
D) Continuous data
Answer: C
A) Decision trees
B) Rule-based systems
C) Distance-based models like KNN
D) Label encoding
Answer: C
A) Logarithmic scaling
B) Polynomial features
C) Normalization and standardization
D) All of the above
Answer: D
A) Feature selection
B) Model evaluation
C) Encoding categorical data
D) Data augmentation
Answer: A
A) Lasso regression
B) Recursive Feature Elimination (RFE)
C) Information Gain
D) All of the above
Answer: D
A) Structured datasets
B) Image and text data
C) Time-series forecasting
D) Feature selection
Answer: B
A) Wrapper method
B) Feature extraction technique
C) Filter method
D) Supervised learning approach
Answer: C
UNIT 2
A) String manipulation
B) Handling large numerical datasets efficiently
C) Web development
D) File handling
Answer: B
A) np.ones(shape)
B) np.zeros(shape)
C) np.empty(shape)
D) np.full(shape, 0)
Answer: B
A) arr.dim()
B) arr.shape
C) arr.len()
D) arr.size()
Answer: B
A) np.add(arr1, arr2)
B) arr1 + arr2
C) np.sum(arr1, arr2)
D) Both A and B
Answer: D
6. In NumPy, what does arr.reshape(2,3) do?
A) NumPy
B) Pandas
C) Matplotlib
D) Scikit-learn
Answer: B
A) pd.load_csv('file.csv')
B) pd.read_csv('file.csv')
C) pd.import_csv('file.csv')
D) pd.open_csv('file.csv')
Answer: B
A) axis=0 (Column-wise)
B) axis=1 (Row-wise)
C) axis=2
D) It depends on the function
Answer: A
A) df.missing()
B) df.check_null()
C) df.isnull()
D) df.has_nan()
Answer: C
A) Data Visualization
B) Dimensionality Reduction
C) Data Augmentation
D) Feature Selection
Answer: B
A) It increases dimensionality
B) It finds the most important features
C) It replaces missing values
D) It only works for categorical data
Answer: B
A) Machine learning
B) Data visualization
C) Database management
D) Image processing
Answer: B
A) plt.plot()
B) plt.line()
C) plt.scatter()
D) plt.bar()
Answer: A
A) plt.subplots()
B) plt.figure()
C) plt.subplot()
D) plt.multi_plot()
Answer: A
A) plt.scatter(x, y)
B) plt.plot(x, y, 'o')
C) plt.scatterplot(x, y)
D) Both A and B
Answer: D
A) plt.bar()
B) plt.bargraph()
C) plt.hist()
D) plt.bars()
Answer: A
A) plt.pie(values, labels=labels)
B) plt.circle(values, labels=labels)
C) plt.plot(values, labels=labels)
D) plt.piechart(values, labels=labels)
Answer: A
24. What command is used to display the plots created with Matplotlib?
A) plt.display()
B) plt.show()
C) plt.plot()
D) plt.draw()
Answer: B
25. Which function allows you to set labels for the x-axis and y-axis in Matplotlib?
A) int
B) float
C) str
D) object
Answer: B
27. Which NumPy function is used to generate an array of evenly spaced values?
A) arr.mean()
B) np.mean(arr)
C) arr.average()
D) Both A and B
Answer: D
31. How can you access the first 5 rows of a DataFrame df?
A) df.head(5)
B) df.first(5)
C) df.start(5)
D) df.initial(5)
Answer: A
A) df.remove_duplicates()
B) df.drop_duplicates()
C) df.delete_duplicates()
D) df.clear_duplicates()
Answer: B
A) Their variance
B) Their correlation with target variable
C) Their mean value
D) Their sum
Answer: A
37. How many principal components can be extracted from a dataset with n features?
A) n+1
B) n-1
C) n
D) n/2
Answer: C
A) Within-class variance
B) Between-class variance
C) Total variance
D) Feature variance
Answer: B
41. Which type of plot is best for showing trends over time?
A) Bar plot
B) Line plot
C) Pie chart
D) Histogram
Answer: B
A) Creates a histogram
B) Creates a scatter plot
C) Displays descriptive statistics
D) Sorts the data
Answer: A
A) linestyle='dashed'
B) linetype='solid'
C) style='line'
D) plot_type='curve'
Answer: A
44. How can you add a title to a plot in Matplotlib?
A) plt.set_title("Title")
B) plt.title("Title")
C) plt.add_title("Title")
D) plt.label("Title")
Answer: B
A) plt.grid(True)
B) plt.show_grid()
C) plt.add_grid()
D) plt.enable_grid()
Answer: A
A) plt.export("plot.png")
B) plt.save("plot.png")
C) plt.savefig("plot.png")
D) plt.store("plot.png")
Answer: C
UNIT 03
A) Number of clusters
B) Number of nearest neighbors
C) Number of classes
D) Number of features
Answer: B
A) By choosing the class that appears most frequently among its K nearest neighbors
B) By computing the mean of K nearest points
C) By using decision boundaries
D) By using probability scores
Answer: A
A) It is based on probability
B) It uses a tree-like model of decisions
C) It only works for binary classification
D) It is the same as KNN
Answer: B
7. What is the process of dividing a Decision Tree into multiple branches called?
A) Splitting
B) Pruning
C) Leafing
D) Partitioning
Answer: A
8. Which criterion is commonly used for selecting the best split in a Decision Tree?
A) Bayes’ Theorem
B) Euclidean Distance Formula
C) Gradient Descent
D) Sigmoid Function
Answer: A
12. Which classifier is best suited for text classification problems like spam filtering?
A) Decision Tree
B) Naïve Bayes
C) KNN
D) SVM
Answer: B
13. What does the Support Vector Machine (SVM) algorithm do?
A) It finds the best hyperplane that separates data points from different classes
B) It constructs decision trees for classification
C) It predicts continuous values
D) It uses K nearest neighbors for classification
Answer: A
A) Linear Kernel
B) Polynomial Kernel
C) Radial Basis Function (RBF) Kernel
D) All of the above
Answer: D
A) The change in the dependent variable for a one-unit change in the independent variable
B) The error term in the model
C) The total variance of the data
D) The intercept value
Answer: A
A) Y = mx + c
B) Y = b0 + b1X + e
C) Y = X1 + X2 + X3
D) Y = ax^2 + bx + c
Answer: B
20. Which metric is commonly used to evaluate the performance of a regression model?
A) Accuracy
B) Confusion Matrix
C) Mean Squared Error (MSE)
D) F1-Score
Answer: C
21. What is the main difference between Linear and Polynomial Regression?
22. If a regression model overfits the training data, what technique can be used?
A) It is computationally expensive
B) It may overfit the data
C) It assumes linear relationships
D) It cannot handle large datasets
Answer: B
27. What is the best way to handle missing values in KNN classification?
A) Manhattan Distance
B) Euclidean Distance
C) Cosine Similarity
D) Jaccard Similarity
Answer: B
A) Correlation Coefficient
B) Information Gain
C) K-Means Clustering
D) Cross-validation
Answer: B
A) High bias
B) Low accuracy
C) Overfitting
D) Cannot handle categorical data
Answer: C
A) Pruning
B) Using a smaller dataset
C) Increasing tree depth
D) Using KNN instead
Answer: A
37. What is the role of the hyperplane in Support Vector Machines (SVM)?
38. Which kernel function is best suited for non-linearly separable data in SVM?
A) Linear Kernel
B) Polynomial Kernel
C) RBF (Radial Basis Function) Kernel
D) Sigmoid Kernel
Answer: C
A) Reducing overfitting
B) Increasing complexity of the model
C) Improving training accuracy
D) None of the above
Answer: A
A) L1 Regularization (Lasso)
B) L2 Regularization (Ridge)
C) Elastic Net
D) All of the above
Answer: D
42. Which metric is most commonly used for evaluating regression models?
A) Accuracy
B) F1-score
C) Mean Absolute Error (MAE)
D) Precision
Answer: C
48. Which algorithm can be used for both classification and regression tasks?
A) Decision Tree
B) KNN
C) Support Vector Machine
D) All of the above
Answer: D
50. What happens if the learning rate is too high in a regression model?
A) The model converges too quickly
B) The model may fail to converge and oscillate
C) The model achieves better accuracy
D) The model performs well on test data
Answer: B
BOOM-BOOM
1. What is the key difference between data and information?
A) Nominal data
B) Ordinal data
C) Continuous data
D) Discrete data
Answer: B
A) Data Cleaning
B) Data Labeling
C) Feature Extraction
D) Data Transformation
Answer: B
A) Underfitting
B) Increased computational cost
C) Higher accuracy
D) Model becomes more interpretable
Answer: B
11. Which of the following is the correct way to create a 2D NumPy array?
A) np.array([[1,2,3], [4,5,6]])
B) np.array((1,2,3), (4,5,6))
C) np.array(1,2,3,4,5,6)
D) np.create([1,2,3], [4,5,6])
Answer: A
13. Which of the following can be used to read a CSV file in Pandas?
A) pd.read_csv(‘file.csv’)
B) pd.load_csv(‘file.csv’)
C) pd.open_csv(‘file.csv’)
D) pd.read(‘file.csv’)
Answer: A
15. Which function is used to drop missing values from a Pandas DataFrame?
A) df.dropna()
B) df.clean()
C) df.remove_na()
D) df.drop_missing()
Answer: A
18. Which visualization is best for showing the distribution of a numerical variable?
A) Bar Graph
B) Histogram
C) Line Plot
D) Pie Chart
Answer: B
20. Which argument is used to change the marker type in a scatter plot?
A) marker=
B) symbol=
C) type=
D) point=
Answer: A
22. How does K-Nearest Neighbors (KNN) classify a new data point?
A) Decision Tree
B) KNN
C) Naïve Bayes
D) SVM
Answer: C
A) A class label
B) A probability distribution
C) A continuous value
D) A confusion matrix
Answer: C
A) To reduce overfitting
B) To increase training accuracy
C) To decrease model complexity
D) To improve visualization
Answer: A