Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/s/k/sklearn-compiledtrees-1.2/compiledtrees/compiled.py   sklearn-compiledtrees(Download)
from __future__ import print_function
from sklearn.utils import array2d
from sklearn.tree.tree import DecisionTreeRegressor, DTYPE
from sklearn.ensemble.gradient_boosting import GradientBoostingRegressor
            The predicted values.
        if getattr(X, "dtype", None) != DTYPE or X.ndim != 2:
            X = array2d(X, dtype=DTYPE)
                                 self._n_features, n_features))
        result = np.empty(n_samples, dtype=DTYPE)
        return self._evaluator.predict(X, result)

src/s/k/sklearn-compiledtrees-1.2/benchmarks/bench_compiled_tree.py   sklearn-compiledtrees(Download)
from sklearn import ensemble, datasets
import compiledtrees
from sklearn.tree.tree import DTYPE
from sklearn.utils import array2d
from sklearn.utils.bench import total_seconds
def run_simulation(args):
    X, y = DATASETS[args.dataset](args)
    X = array2d(X, dtype=DTYPE)
    timings = [(name, run_ensemble(args, name, cls, X, y))
               for name, cls in ENSEMBLE_REGRESSORS]