Skip to content

Commit 4075a71

Browse files
committed
feat: update libraries and python version; bump package version to 1.1.0
1 parent 62ad789 commit 4075a71

File tree

7 files changed

+21
-18
lines changed

7 files changed

+21
-18
lines changed

requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
pandas~=1.2.1
2-
numpy~=1.20.3
3-
matplotlib~=3.4.2
4-
rulekit~=1.6.0
1+
pandas >= 1.5.0, < 2.3.0
2+
numpy ~= 1.26.4
3+
matplotlib ~= 3.8.3
4+
rulekit ~= 1.7.6
5+
lifelines ~= 0.28.0

rulexai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.1.0'

rulexai/explainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def __init__(
507507
if type == "regression":
508508
model = RegressionModel(model = model, feature_names= X.columns, label_name=label_name)
509509
elif type == "survival":
510-
model = SurvivalModel(model=model, fetures_names = X.columns, survival_status_name=label_name)
510+
model = SurvivalModel(model=model, feature_names = X.columns, survival_status_name=label_name)
511511
else:
512512

513513
model = ClassificationModel(model = model, feature_names = X.columns, class_names = np.unique(y), label_name = label_name)

rulexai/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from rulekit.operator import BaseOperator
1+
from rulekit._operator import BaseOperator
22
import numpy as np
33
from .rule import Rule, CompoundCondition, ElementaryCondition
44
from rulekit import RuleKit
@@ -484,9 +484,9 @@ def _map_rule_from_RuleKit(self, rule):
484484

485485
compoundCondition.add_subcondition(elementaryCondition)
486486

487-
consequence_att, consequence_value = consequence.split(" = ")
488-
consequence_val = consequence_value[1:-1]
489-
consequence = ElementaryCondition(consequence_att, consequence_val, column_index=self.column_indexes[attribute])
487+
consequence_att = "survival_curve"
488+
consequence_val = ""
489+
consequence = ElementaryCondition(consequence_att, consequence_val, column_index=0)
490490

491491
return Rule(compoundCondition, consequence)
492492

rulexai/rule.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import enum
22
import numpy as np
33
from typing import List
4-
np.warnings.filterwarnings('ignore')
4+
import warnings
5+
warnings.filterwarnings('ignore')
56

67
# creating enumerations using class
78
class LogicalOperator(enum.Enum):

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="rulexai",
13-
version="1.0.0",
13+
version="1.1.0",
1414
author="Dawid Macha",
1515
author_email="[email protected]",
1616
description="RuleXAI is a rule-based aproach to explain the output of any machine learning model. It is suitable for classification, regression and survival tasks.",
@@ -30,12 +30,13 @@
3030
"Intended Audience :: Science/Research",
3131
],
3232
include_package_data=True,
33-
python_requires=">=3.6",
33+
python_requires=">=3.9",
3434
install_requires=[
35-
"pandas ~= 1.2.1",
36-
"numpy ~= 1.20.3",
37-
"matplotlib ~= 3.4.2",
38-
"rulekit ~= 1.6.0",
35+
"pandas >= 1.5.0, < 2.3.0",
36+
"numpy ~= 1.26.4",
37+
"matplotlib ~= 3.8.3",
38+
"rulekit ~= 1.7.6",
39+
"lifelines ~= 0.28.0"
3940
],
4041
test_suite="tests",
4142
)

tests/test_conditions_importances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from pathlib import Path
1515
from rulexai.explainer import RuleExplainer
1616

17-
1817
class TestConditionsImportances(unittest.TestCase):
1918

2019
@classmethod
@@ -103,6 +102,7 @@ def test_regression(self):
103102
induction_measure=Measures.C2,
104103
pruning_measure=Measures.C2,
105104
voting_measure=Measures.C2,
105+
mean_based_regression = False
106106
)
107107
reg.fit(x, y)
108108

0 commit comments

Comments
 (0)