Speed of calculation in sklearn models

why is that model directly imported from sklearn works faster than our written code vise model like training a dataset?

hey @light007 ,
The only difference between your code and sklearn module code is optimization.
There codes are highly optimized and use various functions or methods to process things more faster and in a convenient way.
For better undertanding , you can have a look it official github repository .

I hope this helped you :slightly_smiling_face:.
Thank You :slightly_smiling_face:.