Then the last machine learning interview questions update, summarized the interview questions, is based on my career and interview experience to give you a tutorial, use the classmate, I hope to help you!

1. What is bias and variance?

The generalization error can be decomposed as the square of the deviation plus the variance plus the noise. Deviation to measure the learning algorithm of expectation deviation degree of prediction and actual results, depicting the fitting ability of the algorithm itself, the variance measure the size of the same learning performance, as a result of changes in the training set, depict the disturbance caused by the data, the influence of noise to express the current task any learning algorithm can achieve the expectations of the generalization error of the lower bound, It depicts the difficulty of the problem itself. Deviation and variance are generally called bias and variance. The stronger the general training degree is, the smaller the deviation is and the larger the variance is. The generalization error generally has a minimum value in the middle.

2. What models are solved by EM algorithm? Why not use Newton method or gradient descent method?

The models solved by EM algorithm generally include GMM or collaborative filtering, and K-means actually belongs to EM. The EM algorithm must converge, but may converge to a local optimum. Since the number of summation terms will increase exponentially with the number of hidden variables, the gradient calculation will be troublesome.

3. Comparison of SVM, LR and decision tree?

Model complexity: SVM supports kernel function, which can deal with linear and nonlinear problems; LR model is simple, fast training speed, suitable for linear problems; The decision tree is easy to overfit, and the pruning loss function is needed: SVM Hinge loss; LR L2 regularization; Adaboost index loss data sensitivity: SVM tolerance is insensitive to outliers, only care about support vectors, and need to be normalized first; LR is sensitive to far-point data volume: LR is used for large data volume; SVM nonlinear kernel is used for small data volume and few features

4. Differences between GBDT and random forest

Random forest adopts the idea of Bagging, which is also known as bootstrap Aggreagation. Bagging obtains multiple sample sets by sampling back in the training sample set. Based on each sample set, a base learner is developed and then combined with the base learner. On the basis of bagging decision tree, random attribute selection is introduced in the training process of decision tree. In the traditional decision tree, the optimal attribute is selected from the current node attribute set, while in the random forest, the subset containing K attributes is randomly selected for the node first, and then the most attribute is selected. K as a parameter controls the introduction degree of randomness. In addition, GBDT training is based on Boosting idea, which updates sample weights according to errors in each iteration, so it is a serialization method of serial generation, while random forest is bagging idea, so it is a parallelization method.

5. How does XGBoost rate features?

In the process of training, features of separation points are selected by Gini index. The more times a feature is selected, the higher the score of the feature is.

1. # feature importance 2. print(model.feature_importances_) 3. # plot 4. pyplot.bar(range(len(model.feature_importances_)), model.feature_importances_) 5. pyplot.show() 6. ========== 7. # plot feature importance 8. plot_importance(model) 9. pyplot.show() # feature importanceprint(model.feature_importances_)# plotpyplot.bar(range(len(model.feature_importances_)), model.feature_importances_)pyplot.show()==========# plot feature importanceplot_importance(model)pyplot.show()Copy the code

6. What is OOB? How is OOB calculated in random forest, and what are its advantages and disadvantages?

In bagging method, about 1/3 of the samples collected by Bootstrap will not appear in the sample set collected by Bootstrap each time, and will not participate in the establishment of decision tree. The 1/3 data is called ooB (Out of bag), which can be used to replace the error estimation method of test set. The calculation method of ooB error is as follows: For random forests have been generated, with the bag outside data to test its performance, assumes that the total number of bags outside data for O, use it O a bag outside data as input, bring in before have generated random forests classifier, the classifier will give O data of the corresponding classification, because this article O the type of data is known, use the correct classification comparing with the results of the random forest classifier, statistics The number of classification errors of random forest classifier is set as X, then the size of data error outside the bag =X/O; This has been proved to be unbiased, so there is no need for cross-validation or separate test sets in the random forest algorithm to obtain the unbiased estimation of the test set error.

7. What is machine learning?

Machine learning is designed to deal with system programming. It is a computer science discipline that can learn and improve automatically based on experience. For example, a robot controlled by a program can perform a series of tasks and tasks based on data collected from sensors. It automatically learns the application from the data.

8. Differences between machine learning and data mining

Machine language is to give a computer the ability to learn, design and expand algorithms without explicit program instructions. Data mining is a kind of extracting knowledge or unknown and interesting pictures from unstructured data. Machine learning algorithms are applied in the process.

9. What is over-fitting in machine learning

In machine learning, overfitting occurs when a statistical model first describes random error or noise, rather than its own underlying relationships. When a model is too complex, overfitting is often easy to detect because the number of parameters is too varied relative to the number of training data types. Then this model is not effective due to excessive fitting.

10. Causes of over-fitting

Because the criteria used to train the model are not the same as the criteria used to judge the efficiency of the model, this leads to the possibility of over-fitting.

11. How to avoid over-fitting

When you use small data sets for machine learning, it is easy to overfit, so using large data sets can avoid overfitting. However, when you have to model with small data sets, you can use a technique called cross validation. In this approach, the data set is divided into two sections, the test data set, which only tests the model, and the training data set, in which the data points are used for modeling.

In this technique, a model is usually trained by data sets given prior knowledge (training data sets) and tested by data sets without prior knowledge. The idea of cross-validation is that during the training phase, a data set is defined to test the model.

12. What is inductive machine learning?

Inductive machine learning involves the process of learning by doing, deriving general rules from attempts at a set of observable examples.

13. What are the five popular algorithms for machine learning?

A. the decision tree

B. Neural network (back propagation)

C. Probabilistic networks

D. nearest neighbor method

E. Support vector machines

14. What are the different algorithmic techniques for machine learning?

The different types of algorithmic techniques in machine learning are:

  • Supervised learning
  • Unsupervised learning
  • Semi-supervised learning
  • Transduction reasoning
  • Learning to Learn.

15. What are the three stages of hypothesis or model building in machine learning?

A. modeling

B. Model test

C. Model application.

16. What are training data sets and test data sets?

In various fields related to information science similar to machine learning, a set of data is used to discover potential predictive relationships, called a “training dataset.” The training data set is the case provided to learners, while the experimental data set is used to test the accuracy of the hypothesis relationship proposed by learners.

17. List the various approaches to machine learning?

The various approaches to machine learning are as follows:

  • Concept Vs Classification Learning.
  • Symbolic Vs Statistical Learning.
  • Inductive versus Analytical Learning.

18. What are the functions of unsupervised learning?

  • Find the cluster of data
  • Find a low dimensional representation of the data
  • Look for interesting directions in the data
  • Interesting coordinates and correlations
  • Significant observations and dataset cleansing were found

19. What is the function of supervised learning?

  • classification
  • Speech recognition
  • Return to the
  • Time series prediction
  • Comment string

20. What is algorithm-independent machine learning?

Machine learning is independent of any specific classifier or learning algorithm in basic mathematics and is called algorithm-independent machine learning.

More tutorials on machine learning will continue to be updated! Students with relevant learning needs can continue to pay attention, I hope these summaries are helpful to you! Have different views of the partner, you can leave a message!

There are several machine learning tutorials out in the front, and students are still paying high attention to them. At your request, WE have sorted out some relevant machine learning video tutorials! Learning machine learning partners, message reply: “machine learning”, can be picked up!

Data analysis and artificial intelligence tutorials complete

https://pan.baidu.com/s/1R39ZIm9D40hLDr87so9Tww extracted code: y…