linearrf 1.2.5__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linearrf-1.2.5/src/linearrf.egg-info → linearrf-1.2.7}/PKG-INFO +1 -1
- {linearrf-1.2.5 → linearrf-1.2.7}/pyproject.toml +1 -1
- {linearrf-1.2.5 → linearrf-1.2.7/src/linearrf.egg-info}/PKG-INFO +1 -1
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_base_lrf.py +4 -2
- {linearrf-1.2.5 → linearrf-1.2.7}/LICENSE.md +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/MANIFEST.in +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/README.md +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/setup.cfg +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/linearrf.egg-info/SOURCES.txt +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/linearrf.egg-info/dependency_links.txt +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/linearrf.egg-info/requires.txt +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/linearrf.egg-info/top_level.txt +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/__init__.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_criterion.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_irls.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_linear_models.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_node.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/_preprocessor.py +0 -0
- {linearrf-1.2.5 → linearrf-1.2.7}/src/lrf/lrf.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: linearrf
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.7
|
|
4
4
|
Summary: A python libary to build Random Forests with Linear Models at the leaves.
|
|
5
5
|
Author-email: Marian Biermann <marianbiermann@gmx.de>
|
|
6
6
|
Project-URL: homepage, https://github.com/marianbiermann/lrf
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "linearrf"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.7"
|
|
8
8
|
description = "A python libary to build Random Forests with Linear Models at the leaves."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Marian Biermann", email = "marianbiermann@gmx.de" }]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: linearrf
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.7
|
|
4
4
|
Summary: A python libary to build Random Forests with Linear Models at the leaves.
|
|
5
5
|
Author-email: Marian Biermann <marianbiermann@gmx.de>
|
|
6
6
|
Project-URL: homepage, https://github.com/marianbiermann/lrf
|
|
@@ -113,7 +113,8 @@ class _LinearRandomForest:
|
|
|
113
113
|
self.min_samples_leaf = self.leaf_samples_to_features_ratio * x.shape[1]
|
|
114
114
|
|
|
115
115
|
# add intercept here and not inside linear model for performance reasons
|
|
116
|
-
|
|
116
|
+
if self.linear_model is None:
|
|
117
|
+
x = np.insert(x, 0, 1, axis=1)
|
|
117
118
|
|
|
118
119
|
# mtry is the same at every node — cache once instead of recomputing per split
|
|
119
120
|
self._mtry = int(round(np.sqrt(x.shape[1] - 1)))
|
|
@@ -163,7 +164,8 @@ class _LinearRandomForest:
|
|
|
163
164
|
if self.linear_model is None:
|
|
164
165
|
np.add(imp, np.abs(node.model.coef_[1:]), out=imp)
|
|
165
166
|
else:
|
|
166
|
-
np.add(imp, np.abs(node.model.coef_), out=imp)
|
|
167
|
+
np.add(imp, np.abs(np.flatten(node.model.coef_)), out=imp)
|
|
168
|
+
|
|
167
169
|
return imp
|
|
168
170
|
|
|
169
171
|
@staticmethod
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|