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