The module you are looking for is written in Cython. The corresponding file is called _tree.pyx
. It can be found in .../scikit-learn/sklearn/tree/_tree.pyx
, if you have the scikit learn sources, e.g. in form of the git repo, on your computer.
Cython is translated to C code, which can be found in _tree.c
.
The compiled C code is what is imported in the lines you found, and the corresponding file is called _tree.so
. In a typical scikit-learn installation, this may be the only file you find. It is not human-readable, so if you are interested in the source, check it out here