linearrf 1.2.0__tar.gz → 1.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linearrf
3
- Version: 1.2.0
3
+ Version: 1.2.1
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.0"
7
+ version = "1.2.1"
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.0
3
+ Version: 1.2.1
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
@@ -13,6 +13,6 @@ class Node:
13
13
  split_col_idx: int = None
14
14
  threshold: float = None
15
15
  metric: float = None
16
- left_node = None
17
- right_node = None
16
+ left_node: 'Node' = None
17
+ right_node: 'Node' = None
18
18
  model: Union[Regressor, Classifier] = None
@@ -53,7 +53,7 @@ class LRFRegressor(_LinearRandomForest):
53
53
  def _predict_tree(self, node: Node, x: np.ndarray, results: List):
54
54
  if node.model is None:
55
55
  if x.shape[0] > 0:
56
- left_indices = x[:, node.split_col_idx + 1] < node.threshold
56
+ left_indices = x[:, node.split_col_idx + 1] <= node.threshold
57
57
  right_indices = ~left_indices
58
58
 
59
59
  results = self._predict_tree(node.left_node, x[left_indices], results)
@@ -184,7 +184,7 @@ class LRFClassifier(_LinearRandomForest):
184
184
 
185
185
  if node.model is None:
186
186
  if x.shape[0] > 0:
187
- left_indices = x[:, node.split_col_idx + 1] < node.threshold
187
+ left_indices = x[:, node.split_col_idx + 1] <= node.threshold
188
188
  right_indices = ~left_indices
189
189
 
190
190
  results = self._predict_proba_tree(node.left_node, x[left_indices], results)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes