Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

True or False

The C4.5 algorithm uses the Gini index as the evaluation criteria for node classification.

o True
 False

For data with two dimensions, when k-means is used for clustering, the clustering result is displayed as a
sphere in the space.

 True
o False

Principal component analysis (PCA) can greatly reduce the data dimension when most information of
the original dataset is contained.

 True
o False

In Python, the title() function can capitalize the initial letter of a string.

 True
o False

In Python, when an object is deleted, the destructor function is automatically called.

 True
o False

In Python, multiple inheritance is supported during class definition.

 True
o False

In Python, static variables and static methods are instances.

o True
 False

Convolutional neural network (CNN) can only be used to solve visual problems and cannot be used for
natural language processing.

o True
 False

Support vector machine (SVM) has a good effect in dealing with high-dimensional nonlinear problems.

 True
o False
If the number of layers of a neural network is too large, gradient disappearance or gradient explosion
may occur.

 True
o False

In Python, a static method can be directly accessed and does not need to be called using
CLASSNAME.STATIC_METHOD_NAME().

o True
 False

When a function is called in Python, mutable objects such as list and dictionary are called by reference.

 True
o False

In Python, the string function capitalize() can capitalize the initial letter of a string.

 True
o False

Overfitting occurs only in regression problems, not in classification problems.

 True
o False

Multiple Choice Single Answer.

Imbalanced data of binary classification refers to the dataset with a large difference between the
proportion of positive samples and the proportion of negative samples, for example, 9:1. If a
classification model is trained based on the dataset and the accuracy of the model on training samples is
90%, which of the following statements is true?

A. The accuracy of the model is high, and the model does not need to be optimized.

B. The accuracy of the model is not satisfactory, and the model needs to be retrained after data
sampling.

C. The model quality cannot be evaluated

D. None of the above.

Which of the following algorithms is not a classification algorithm?

A. Nonlinear separable support vector machine.

B. Logistic regression

C. Principal component analysis

D. Random forest
Which of the following statements about support vector machines (SVM) is false?

A. SVM is a binary classification model

B. In high-dimensional space, SVM uses hyperplanes with the maximum interval for classification.

C. Kernel functions can be used to construct nonlinear separable SVM

D. The basic concept of kernel functions is to classify data through dimensionality reduction

The data output by binary classification can be considered as a probability value. Generally, a threshold
is set, for example, 0.5. If the value is greater than the threshold, it is a positive category. Otherwise, it is
a negative category. If the threshold is increased from 0.5 to 0.7, which of the following changes will
occur in the precision and recall rate of the model?

A. The precision increases or remains unchanged, and the recall rate increases or remains unchanged.

B. The precision increases or remains unchanged, and the recall rate decreases or remains unchanged.

C. The precision decreases or remains unchanged, and the recall rate increases or remains unchanged.

D. The precision decreases or remains unchanged, and the recall rate decreases or remains unchanged.

Which of the following assumptions can be made about linear regression?

A. It is important to find outliers because linear regression is sensitive to outliers.

B. Linear regression requires that all variables be in normal distribution.

C. Linear regression assumes that data does not have multiple linear correlations.

D. None of the above

Which of the following procedures is not a procedure for building a decision tree?

A. Feature selection

B. Decision tree generation

C. Finding the support vector

D. Pruning

Feature selection is necessary before model training. Which of the following statements are the
advantages of feature selection?

A. It can improve model generalization and avoid overfitting

B. It can reduce the time required for model training.

C. It can avoid dimension explosion

D. It can simplify models to make them easy for users to interpret.


When decision tree is used for classification, if the value of an input feature is continuous, the
dichotomy is used to discretize the continuous attribute. It means that the classification is performed
based on whether the value is greater than or less than a threshold. If the multi-path division is used,
each value is divided into a branch. What is the biggest problem of this method?

A. The computing workload is too heavy.

B. The performance of both the training set and the test set is poor.

C. The performance of the training set is good, but the performance of the test set is poor.

D. The performance of the training set is poor, and the performance of the test set is good.

For a dataset with only one dependent variable x, what is the number of coefficient(s) required to
construct a simplest linear regression model?

A. 1

B. 2

C. 3

D. 4

Which of the following algorithms is not an ensemble algorithm?

A. XGBoost

B. GBDT

C. Random forest

D. Support vector machine (SVM)

Assume that a classification model is built using logistic regression to obtain the accuracy of training
samples and test samples. Then, add a new feature to the data, keep other features unchanged, and
train the model again. Which of the following statement is true?

A. The accuracy of training samples will definitely decrease.

B. The accuracy of test samples will definitely decrease.

C. The accuracy of training samples remains unchanged or increases.

D. The accuracy of test samples remains unchanged or increases.

About the values of four variables a, b, c, and d after executing the following code, which of the
following statements is false?

import copy

a = [1, 2, 3, 4, [‘a’,’b’]

b=a

c = copy.copy(a)
d = copy.deepcopy(a)

a.append(5)

a[4].append(‘c’)

A. a == [1,2,3,4,[‘a’,’b’,’c’],5]

B. b == [1,2,3,4,[‘a’,’b’,’c’],5]

C. c == [1,2,3,4,[‘a’,’b’,’c’]]

D. d == [1,2,3,4,[‘a’,’b’,’c’]]

The syntax of string formatting is ?

A. GNU\’s Not %s %%’ % ’UNIX’

B. ‘GNU\’s Not %d %%’ % ’UNIX’

C. ‘GNU’s Not %s %%’ % ’UNIX’

D. ‘GNU’s Not %d %%’ % ’UNIX’

Which of the following statements about a neural network is true?

A. Increasing the number of neural network layers may increase the classification error rate of a test set.

B. Reducing the number of neural network layers can always reduce the classification error rate of a test
set.

C. Increasing the number of neural network layers can always reduce the classification error rate of a
training set.

D. The neural network can fully fit all data

For a multi-layer perceptron (MLP), the number of nodes at the input layer is 10, and the number of
nodes at the hidden layer is 5. The maximum number of connections from the input layer to the hidden
layer is?

A. It depends on the situation.

B. Less than 50

C. Equal to 50

D. Greater than 50

Assume that there is a trained deep neural network model for identifying cats and dogs, and now this
model will be used to detect the locations of cats in a new dataset. Which of the following statements is
true?

A. Retrain the existing model using a new dataset.

B. Remove the last layer of the network and retrain the existing model.
C. Adjust the last several layers of the network and change the last layer to the regression layer.

D. None of the above

Which of the following statements about the k-nearest neighbor (KNN) algorithm is false?

A. KNN is a non-parametric method which is usually used in datasets with irregular decision boundaries.

B. KNN requires huge computing amount

C. The basic concept of KNN is “Birds of a feather flock together”

D. The key point of KNN is node splitting

Assume the training data is sufficient, and the dataset is used to train a decision tree. To reduce the time
required for model training, which of the following statements is true?

A. Increase the depth of the tree

B. Reduce the depth of the tree

C. Increase the learning tree

D. Reduce the learning tree

If you want to predict the probability of n classes (p1, p2, …, pk), and the sum of probabilities of n classes
is equal to 1, which of the following functions can be used as the activation function in the output layer?

A. softmax

B. ReLu

C. sigmoid

D. tanh

In which case can a neural network model be called a deep learning model?

A. When more layers are added to the network

B. When data with higher dimensions is used

C. When the model is used for image classification

D. None of the above

Which of the following statements about the PyTorch features is false?

A. PyTorch uses the dynamic graph.

B. Pytorch provides tensors that support CPUs and GPUs

C. PyTorch-based code debugging is more difficult than TensorFlow1.x.

D. Python first
During the training of a convolutional neural network (CNN), it is often found that the precision of a
model in a test set gradually increases as the number of parameter increases. However, when a certain
value is reached, the precision decreases. What is the cause of this phenomenon?

A. Although the number of convolutional kernel increases, only a small number of convolutional kernels
participate in the prediction.

B. When the number of convolutional kernels increases, the prediction capability of the neural network
decreases.

C. When the number of convolutional kernels increases, overfitting will occur.

D. None of the above.

When data is too large to be processed at the same time in the RAM, which of the following gradient
descent methods is more effective?

A. Stochastic gradient descent

B. Full batch gradient descent

C. Both A and B

D. Neither A nor B

To resolve an image recognition problem, such as finding out a cat in a photo, which of the following
neural networks offers the best solution?

A. Perceptron

B. Multi-layer perceptron (MLP)

C. Recurrent neural network (RNN)

D. Convolutional neural network (CNN)

Which of the following statements is invalid in Python?

A. x = y = z =1

B. x = (y = z + 1)

C. x, y = y, x

D. x + =y

Assume that the independent variable x is a continuous variable. To observe the relationship between
the dependent variable y and the independent variable x, which of the following graphs should be used?

A. Scatter chart

B. Histogram

C. Pie chart

D. None of the above


The result of invoking the following function is?

def basefunc(first):

def innerfunc(second):

return first ** second

return innerfunc

A. base(2)(3) == 8

B. base(2)(3) == 6

C. base(3)(2) == 8

D. base(3)(2) == 6

Which of the following is false?

A. (1)

B. (1,)

C. (1, 2)

D. (1, 2, (3, 4))

The result of executing the following code is?

Import math print(math.floor(3.4))

A. 3

B. 3.0

C. 4

D. 4.0

Which of the following statements about strings is false?

A. Characters should be considered as a string of one character

B. A string with three single quotations (“”) can contain special characters such as line feed and carriage
return.

C. A string ends with \0

D. A string can be created by using a single-quotation mark(‘) or double quotation marks (‘’).
In Python 3.7, the result of executing the code print(type(3/6) is?

A. int

B. float

C. 0

D. 0.5

Is it necessary to increase the size of a convolutional kernel to improve the effect of a convolutional
neural network (CNN)?

A. Yes

B. No

C. It depends on the situation

D. Uncertain

Deep learning can be used in which of the following natural language tasks?

A. Sentimental Analysis

B. Q&A system

C. Machine translation

D. All of the above

If you use the activation function “X” at the hidden layer of a neural network and give any input to a
specific neuron, you will get the output [-0.0001]. Which of the following functions is “X”?

A. ReLuo

B. tanho

C. sigmoido

D. None of the above

Which of the following functions cannot be used as an activation function of a neural network?

A. y = sin(x)

B. y = tanh(x)

C. y = max(0, x)

D. y = 2x
Polysemy can be defined as the coexistence of multiple meanings of a word or phrase in a text object.
Which of the following methods is the best choice to solve this problem?

A. Convolutional neural network (CNN)

B. Gradient explosion

C. Gradient disappearance

D. All of the above

In deep learning, a large number of matrix operations are involved. Now the product ABC of three dense
matrices A, B and C needs to be calculated. Assume that sizes of the three matrices are m x n, n x p, and
p x q respectively, and m < n < p < q, then which of the following calculation sequences is the most
efficient one?

A. (AB)C

B. A(BC)

C. (AC)B

D. A(CB)

Assume that there are two neural networks with different output layers, There is one output node in the
output layer of network 1, whereas there are two output nodes in the output layer of network 2. For a
binary classification problem, which of the following methods do you choose?

A. Use network 1

B. Use network 2

C. Either of them can be chosen to use

D. Neither of them can be chosen

When data volume exceeds the capacity of the memory, which of the following methods used to
effectively train the model?

A. Organizing the data and supplementing the missing data

B. Sampling data and training models based on the sampled data

C. Reducing data dimensions using the PCA algorithm

D. Improving data capacity through interpretation method


When a pooling layer is added to a convolutional neural network (CNN), will the translation invariance
be retained?

A. Uncertain

B. It depends on the actual situation

C. Yes, it will be retained

D. No, it will not be retained

Which of the following variable names is true?

A. data?

B. ?data

C. _data

D. 9data

The result of executing the code print(‘a’<’b’) is?

A. True

B. False

C. ‘a’<’b’

D. ‘ab’

The result of executing the following code is?

data = [1, 3, 5, 7]

data.append([2, 4, 6, 8])

print(len(data))

A. 4

B. 5

C. 8

D. An error occurred

The result of executing the following code is?

for i in range(1,3):

print(i)

for j in range(2):

print(j)

A. 1 3 2
B. 1 2 0 1

C. 1 3 0 1

D. 1 3 0 2

Generally, which of the following methods is used to predict continuous independent variables?

A. Linear regression

B. Logistic regression

C. Both linear regression and logistic regression

D. None of the above

Multiple Choice Multiple Answer

Which of the following criteria can evaluate the quality of a model?

A. Accurate prediction can be achieved by the model in actual services.

B. With the increasing traffic volume, the prediction rate of the model is still acceptable

C. The model design is complex and difficult to understand and explain.

D. The user interface of the service system where the model is located is user-friendly.

Which of the following statements about the gradient boosting decision tree (GBDT) algorithm are true?

A. Increasing the minimum number of samples used for segmentation helps prevent overfitti

B. Increasing the minimum number of samples used for segmentation may cause overfitting.

C. Reducing the sample ratio of each basic tree helps reduce the variance.

D. Reducing the sample ratio of each basic tree helps reduce the deviation.

Variable selection is used to select the best discriminator subset. What need to be considered to ensure
the efficiency of the model?

A. Whether multiple variables have the same function.

B. Whether the model is interpretable

C. Whether the feature carries valid information

D. Price difference verification

Which of the following activation functions can be used for image classification at the output layer?

A. sigmoid

B. tanh

C. ReLu
D. Piecewise functions

Which of the following assumptions are used to derive linear regression parameters?

A. There is a linear relationship between independent variables and dependent variables

B. Model errors are independent in statistics

C. The error generally obeys the normal distribution of 0 and the standard deviation of the fixed
average value

D. The independent variable is non-random and has no measurement error.

Which of the following operations belong to the data cleansing process?

A. Processing lost data


B. Processing abnormal values
C. Obtaining data that is difficult to be obtained by others through special channels
D. Combining data

Which of the following statements about the convolutional neural network (CNN) are true?

A. Increasing the size of convolutional kernels can significantly improve the performance of the CNN.

B. Pooling layers in the CNN keep translation invariance.

C. Data features need to be extracted before using a CNN.

D. In a CNN, the convolutional kernel at each layer is the weight to be learned.

The core idea of convolutional neural network (CNN) are?

A. Mainly for image data processing

B. Local receptive field

C. Parameter sharing

D. High-quality data input and high-quality output

Which of the following issues need to be considered when you select the depth of a neural network?

A. Neural network types

B. Input data type and quantity

C. Learning rate

D. Development framework to be used


Which of the following statements about long short-term memory (LSTM) are true?

A. The forget phase of LSTM is to selectively forget the input transferred from the previous node.

B. The selective memory phase of LSTM is to selectively memorize the input.

C. The update phase of LSTM is to update the memory information.

D. The output phase of LSTM is to determine which will be considered as the output of current state.

Which of the following statements about generative adversarial network (GAN) are true?

A. The GAN contains a generative model (generator) that takes a random vector as input and decodes
it as a specific output.

B. The GAN contains an adversarial model (adversarial device) that transforms specific input and outputs
adversarial data that contradicts the input.

C. The GAN contains a discriminative model (discriminator) that can determine whether the input
data is from the training set or synthesized through data.

D. The GAN is a dynamic system. Its optimization process is not to find a minimum value, but to find a
balance between two forces.

The neural network is inspired by the human brain. A neural network consists of many neurons, and
each neuron receives an input and provides an output after processing the input. Which of the following
statements about neurons are true?

A. Each neuron can have one input and one output

B. Each neuron can have multiple inputs and one output

C. Each neuron can have one input and multiple outputs

D. Each neuron can have multiple inputs and output

Which of the following layers are usually included in a deep neural network used for image recognition?

A. Convolutional layer

B. Pooling layer

C. Recurrent layer

D. Fully connected layer

What are the differences between _init_and_new_in Python?


A. _init_ is an instance method, whereas_new_is a static method

B. No value is returned for _init_, whereas an instance is returned for_new_.

C. _new_ is called to create an instance, whereas _init_ is called to initialize an instance

D. Only when_new_returns a cls instance, the subsequent_init_can be called.

Which of the following statements about TensorFlow 2.0 are true?

A. TensorFlow 2.0 requires the construction of a computational graph at first, then you can start a
session, import data to the session, and perform training.

B. Eager execution is enabled in TensorFlow 2.0 by default. It is a type of command line programming,
making the execution simpler.

C. In TensorFlow 2.0, if you want to build a new layer, you can directly inherit tf.keras.layers.Layer

D. In the default mode of TensorFlow 2.0, tf.data.Dataset is an iterator.

Which of the following statements about the application of deep learning methods are true?

A. Massive discrete data can be encoded using embedded mode as input of the neural network, which
greatly improves the effect of data analysis.

B. The convolutional neural network (CNN) is well applied in the field of image processing, but it
cannot be used in natural language processing.

C. The recurrent neural network (RNN) is mainly used to deal with sequence-to-sequence problems,
but it often encounters the problems of gradient disappearance and gradient explosion.

D. The generative adversarial network (GAN) is a method used for model generation.

Which of the following statements about deep learning are true?

A. The negative side of ReLu is a dead zone, leading to the gradient becomes 0.

B. The sigmoid function is better than the ReLu function in preventing the gradient disappearance
problem.

C. The long short term memory (LSTM) adds several channels and gates based on the recurrent neural
network (RNN)

D. Gated recurrent unit (GRU) is a simplified version of LSTM.

Which of the following statements are the functions of the pooling layer in a convolutional neural
network (CNN)?

A. Reducing the input size for the next layer

B. Obtaining fixed-length data

C. Increasing the scale

D. Preventing overfitting
During neural network training, which of the following phenomena indicate that gradient explosion
problem may occur?

A. The model gradient increases rapidly

B. The model weight changes to NaN value

C. The error gradient value of each node and layer continuously exceeds 1.0.

D. The loss function continuously decreases.

Which of the following statements about the recurrent neural network (RNN) are true?

A. The standard RNN solves the problem of information memory. Its advantage is that even if the
number of memory units is limited, the RNN can keep the long-term information.

B. The standard RNN can store context states and can extend on the time sequences.

C. The standard RNN captures dynamic information in serialized data by periodical connection of
nodes at the hidden layer

D. Intuitively, there is no need to connect nodes between the hidden layer at the current moment and
the hidden layer at the next moment in the RNN.

If data = (1, 3, 5, 7, 9, 11), which of the following operations are valid?

A. data[1 : -1]

B. data[1 : 7]

C. list(data)

D. data * 3

If there is a = range(100), which of the following operations are valid?

A. a[-1]

B. a[2 : 99]

C. a[ : - 1 : 2]

D. a[5 - 7]

Data cleansing is to clear dirty data in a dataset. The dirty data refers to?

A. Data that is stored in the devices affected by some pollutants.

B. Data that contains incorrect records or exceptions

C. Data that contains contradictory and inconsistent records

D. Data that lacks some features or contains some missing values


Features selection is necessary before model training. Which of the following statements are the
advantages of feature selection?

A. It can improve model generalization and avoid overfitting.

B. It can reduce the time required for model training.

C. It can avoid dimension explosion.

D. It can simplify models to make them easy for users to interpret.

Which of the following operations belong to the data cleansing process?

A. Processing lost data

B. Processing abnormal values

C. Obtaining data that is difficult to be obtained by others through special channels

D. Combining data

Which of the following assumptions are used to derive linear regression parameters?

A. There is a linear relationship between independent variables and dependent variables

B. Model errors are independent in statistics.

C. The error generally obeys the normal distribution of 0 and the standard deviation of the fixed
average value.

D. The independent variable is non-random and has no measurement error.

Principal component analysis (PCA) is a common and effective method for dimensionality reduction.
Which of the following statements about PCA are true?

A. Before using PCA, data standardization is required.

B. Before using PCA, data standardization is not required.

C. The principal component with the maximum variance should be selected.

D. The principal component with the minimum variance should be selected.

When the parameters are the same in all cases, and how does the number of sample observation times
affect overfitting?

A. The number of observation times is small, and overfitting is likely to occur.

B. The number of observation times is small, and overfitting is not likely to occur.

C. The number of observation times is large, and overfitting is likely to occur.

D. The number of observation times is large, and overfitting is not likely to occur

You might also like