Saturday, November 30, 2024

Machine Learning MCQ - Which ML algorithm have lowest training time

Multiple choices questions in Machine learning. Interview questions on machine learning, quiz questions for data scientist answers explained, Exam questions in machine learning, time complexities of different ML algorithms, why knn has no training phase, which ML algorithm have lowest training time?

Machine Learning MCQ - Which Machine Learning algorithm have lowest training time for very large datasets?

< Previous                      

Next >

 

1. For very large training data sets, which of the following will usually have the lowest training time?

a) Logistic regression

b) Neural nets

c) K-Nearest Neighbors

d) Random forests

e) Linear SVM

Answer: (c) K-Nearest Neighbors

K-Nearest Neighbors (KNN) is often referred to as a "lazy learner" because it does not have a conventional training phase. Instead of learning parameters (like weights in logistic regression or neural networks), KNN stores the entire training dataset during the training phase.

 

Why KNN does not have training phase or lowest training time?

Since KNN does not involve fitting a model or optimizing any parameters during training, it does not require any significant computation or model-building steps before predictions. In other words, it does not learn or build a model in advance. This is why we say it has no training time.

 

Why not other options?

Time complexities of other machine learning algorithms are as follows;

 

Linear SVM – O(n*p)

Random Forest – O(n*p*log n)

Neural nets (complexity per iteration) – O(n*p*h)

Logistic regression – O(n*p)

Here, n refers to number of training samples, p refers to the number of features, h refers to the number of hidden units in a neural net.

 

< Previous                      

Next >

 

 

************************

Related links:

What is the training time complexities of various machine learning algorithms?

Which ML algorithm(s) have lowest training time for very large datasets?

Why knn does have zero training time complexity?

Why does the norm of the weight vector grows in soft-margin SVM due to the increase in regularization parameter C?

Machine learning solved mcq, machine learning solved mcq 

 

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery