Huawei Written Exam 3rd Attempts PAPASA NAKO [PDF]

  • 0 0 0
  • Suka dengan makalah ini dan mengunduhnya? Anda bisa menerbitkan file PDF Anda sendiri secara online secara gratis dalam beberapa menit saja! Sign Up
File loading please wait...
Citation preview

True or False The main difference between the ID3 and C4.5 algorithms lies in the evaluation criteria of node classification o True  False The activation function in the neural networks can be a non-linear function  True o False When a function is called in Python, the immutable objects such as number and character are called by value.  True o False If there is a complex non-linear relationship between independent variable x and dependent variable y, the tree model may be used as a regression method.  True o 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. o True  False After training the support vector machine (SVM), you can only retain the support vector and discard all non-support vectors. The classification capability of the model remains unchanged.  True o False In the convolutional neural network (CNN), convolutional layers and pooling layers must appear alternately.  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 CLASSNAME.STATIC_METHOD_NAME(). o True  False



be



directly



accessed



and



does



not



need



to



be



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



called



using



Multiple Choice Single Answers. Assume that the statement print(6.3 – 5.9 == 0.4) is executed in the Python interpreter, and the result is False. Which of the following statements about the result is true? A. The Boolean operation cannot be used for comparing floating-point numbers B. It is caused by the priority of operators C. Python cannot exactly represent floating-point numbers D. In Python, the non-zero value is interpreted as false Data scientists may use multiple algorithm (models) at the same time for prediction, and integrate the results of these algorithms for final prediction (ensemble learning). Which of the following statements about ensemble learning is true? A. High correlation exists between single models B. Low correlation exists between single models C. It is better to use weighted average instead of voting in ensemble learning D. One algorithm is used for a single model Assume that 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 rate D. Reduce the learning rate 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 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 rate D. Reduce the learning rate 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 executing the following code is? a = ‘a’ print(a > ‘b’ or ‘c’) A. True B. False C. a > ‘b’ D. c 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))



Which of the following statements about the TensorFlow development framework is false? A. TensorFlow supports various devices from small mobile phones to large computer clusters B. TensorFlow can directly run on various discrete graphics cards C. TensorFlow supports distributed computing D. TensorFlow 2.0 and later versions support dynamic graphs 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 interpolation 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’