Skip to content

Commit

Permalink
fix VisualizationConfiguration default arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
arturzolkowski committed Nov 18, 2023
1 parent e83bdbf commit fd6ed20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions artemis/visualizer/_configuration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import List

from artemis._utilities.domain import InteractionMethod, VisualizationType
Expand Down Expand Up @@ -160,7 +160,6 @@ def _split_score_config(cls):

@classmethod
def _cond_depth_config(cls):

graph_config = InteractionGraphConfiguration()
graph_config.THRESHOLD_RELEVANT_INTERACTION = 0.6
graph_config.MAX_EDGE_WIDTH = 3
Expand All @@ -176,15 +175,15 @@ def _cond_depth_config(cls):
@dataclass
class VisualizationConfiguration:
accepted_visualizations: List[str]
interaction_graph: InteractionGraphConfiguration = InteractionGraphConfiguration()
interaction_matrix: InteractionMatrixConfiguration = (
InteractionMatrixConfiguration()
interaction_graph: InteractionGraphConfiguration = field(default_factory=InteractionGraphConfiguration)
interaction_matrix: InteractionMatrixConfiguration = field(default_factory=InteractionMatrixConfiguration)
interaction_bar_chart_ova: InteractionVersusAllConfiguration = field(
default_factory=InteractionVersusAllConfiguration
)
interaction_bar_chart_ova: InteractionVersusAllConfiguration = (
InteractionVersusAllConfiguration()
interaction_bar_chart_ovo: InteractionVersusOneConfiguration = field(
default_factory=InteractionVersusOneConfiguration
)
interaction_bar_chart_ovo: InteractionVersusOneConfiguration = (
InteractionVersusOneConfiguration()
lollipop: LollipopSplitScoreConfiguration = field(default_factory=LollipopSplitScoreConfiguration)
interaction_bar_chart_conditional: BarChartConditionalDepthConfiguration = field(
default_factory=BarChartConditionalDepthConfiguration
)
lollipop: LollipopSplitScoreConfiguration = LollipopSplitScoreConfiguration()
interaction_bar_chart_conditional: BarChartConditionalDepthConfiguration = BarChartConditionalDepthConfiguration()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pyartemis"
packages = [
{ include = "artemis" }
]
version = "0.1.4.9000"
version = "0.1.5"
description = "A Python package with explanation methods for extraction of feature interactions from predictive models"
readme = "README.md"
documentation = "https://pyartemis.github.io/"
Expand Down

0 comments on commit fd6ed20

Please sign in to comment.