How do I measure the time taken to train and test a classifier like SVM, KNN and Decision Treen in scikit-learn?
How do I measure the time taken to train and test a classifier like SVM, KNN and Decision Treen in scikit-learn?
You can use the time module like so
import time
start = time.time()
# enter your code here
end = time.time()
print(end - start, "seconds")