Skip to content

Commit 6d8987d

Browse files
committed
Fix linter issues
1 parent 9247f7b commit 6d8987d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pymc_bart/bart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class BART(Distribution):
9595
split_rules : Optional[SplitRule], default None
9696
List of SplitRule objects, one per column in input data.
9797
Allows using different split rules for different columns. Default is ContinuousSplitRule.
98-
Other options are OneHotSplitRule and SubsetSplitRule that both apply to categorical variables.
98+
Other options are OneHotSplitRule and SubsetSplitRule, both meant for categorical variables.
9999
100100
Notes
101101
-----

pymc_bart/split_rules.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from abc import abstractmethod
1516
from numba import njit
1617
import numpy as np
17-
from abc import abstractmethod
1818

1919

2020
class SplitRule:
@@ -35,7 +35,8 @@ def divide(available_splitting_values, split_value):
3535

3636
class ContinuousSplitRule(SplitRule):
3737
"""
38-
Standard continuous split rule: pick a pivot value and split depending on if variable is smaller or greater than the value picked.
38+
Standard continuous split rule: pick a pivot value and split
39+
depending on if variable is smaller or greater than the value picked.
3940
"""
4041

4142
@staticmethod
@@ -77,8 +78,10 @@ def divide(available_splitting_values, split_value):
7778

7879
class SubsetSplitRule(SplitRule):
7980
"""
80-
Choose a random subset of the categorical values and branch on if the value is within the chosen set.
81-
This is the approach taken by Sameer K. Deshpande. flexBART: Flexible Bayesian regression trees with categorical predictors. arXiv, `link <https://arxiv.org/abs/2211.04459>`__
81+
Choose a random subset of the categorical values and branch on belonging to that set.
82+
This is the approach taken by Sameer K. Deshpande.
83+
flexBART: Flexible Bayesian regression trees with categorical predictors. arXiv,
84+
`link <https://arxiv.org/abs/2211.04459>`__
8285
"""
8386

8487
@staticmethod

0 commit comments

Comments
 (0)