linear-tree 0.3.5
Evaluates a subscripted value as PythonModule built on the numeric Python stack
SHA-256a87766a40cf27eefed0866e3f7bd086f91fb0e0a73e49b5169f6b7606ade7361
MaleculeK(Am)H₃(CmDbPo)Md₂(Pa₄Pt₂)
Evidence
1Metadata-Version: 2.1
2Name: linear-tree
3Version: 0.3.5
4Summary: A python library to build Model Trees with Linear Models at the leaves.
5Home-page: https://github.com/cerlymarco/linear-tree
6Author: Marco Cerliani
7Author-email: [email protected]
8License: MIT
9Platform: UNKNOWN
10Requires-Python: >=3
11Description-Content-Type: text/markdown
12Requires-Dist: scikit-learn (>=0.24.2)
13Requires-Dist: numpy
14Requires-Dist: scipy
15
16# linear-tree
17A python library to build Model Trees with Linear Models at the leaves …
1import numbers
2import numpy as np
3import scipy.sparse as sp
4
5from copy import deepcopy
6from joblib import Parallel, effective_n_jobs # , delayed
7
8from sklearn.dummy import DummyClassifier
9from sklearn.tree import DecisionTreeRegressor
10from sklearn.ensemble import RandomForestRegressor
11
12from sklearn.base import is_regressor
13from sklearn.base import BaseEstimator, TransformerMixin
14from sklearn.utils.validation import has_fit_parameter, check_is_fitted
15
16from ._criterion import SCORING
17from ._criterion import mse, rmse, mae, poisson
18from ._criterion import hamming, crossentropy
19
20import sklearn
21_sklearn_v1 = eval(sklearn.__version__.split('.')[0]) > 0
22
23
⋯5 lines
32:12… ##############################################################
33### remove when https://github.com/joblib/joblib/issues/1071 is fixed ###
34#########################################################################
35from sklearn import get_config, config_context
36from functools import update_wrapper
37import functools
38
39# from sklearn.utils.fixes
40def delayed(function):
41 """Decorator used to capture the arguments of a function."""
42 @functools.wraps(function)
43 def delayed_function(*args, ** …
333:22… f.n_features_in_ = X.shape
334 self.feature_importances_ = np.zeros((self.n_features_in_,))
335
336 # extract quantiles
337 bins = np.linspace(0, 1, self.max_bins)[1:-1]
338 bins = n …
516:25… near models are accepted as base_estimator. "
517 "Select one from linear_model class of scikit-learn.")
518
519 if self.categorical_features is not None:
520 cat_features = np.unique(self.catego …
No evidence locations were recorded for this file. Raw result