1
$\begingroup$

Why does using the scikit-learn library's MLPRegressor result in such a boost in training time when compared to constructing the network from scratch? I tried both methods and I found that writing the code from scratch yielded an average training time of ~10 seconds while Sci-Kit Learn trained almost instantly?

$\endgroup$
3
  • 1
    $\begingroup$ My suspicion would be that Scikit-Learn utilises a lot of numpy, which in turn utilises C (I could be wrong about that!) - a high-performant low-level language. $\endgroup$
    – bradS
    Mar 14, 2019 at 16:58
  • $\begingroup$ If I was to code an ANN from scratch in C then do you think it would perform about the same as Scikit-learn (Not that I'll actually do that!) $\endgroup$ Mar 14, 2019 at 17:27
  • $\begingroup$ If you are intelligent enough and know how to optimize your code like hell, then Yes, Just check their Source code simple to see :) $\endgroup$
    – Aditya
    Mar 15, 2019 at 4:46

1 Answer 1

0
$\begingroup$

Scikit-learn use numpy and cython to speed-up code.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.