From 163fec03a1ff49471ce50695023351a606a61aa5 Mon Sep 17 00:00:00 2001 From: Pedro Ribeiro de Almeida Date: Wed, 6 Dec 2023 15:06:15 +1100 Subject: [PATCH] Fix bug introduced by SIRUS package update do v2.0.1 --- src/analysis/rule_extraction.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/analysis/rule_extraction.jl b/src/analysis/rule_extraction.jl index 01acb3128..b9ea091c5 100644 --- a/src/analysis/rule_extraction.jl +++ b/src/analysis/rule_extraction.jl @@ -46,10 +46,11 @@ Vector of Rule condition clauses (each one being a vector itself). """ function _condition(rules::SIRUS.StableRules{Int64}, index::Int64)::Vector{Vector} condition::Vector{Vector} = [] - for split in rules.rules[index].path.splits - feature_name = split.splitpoint.feature_name - direction = split.direction - value = split.splitpoint.value + + for subclause in rules.rules[index].clause.subclauses + feature_name::String = subclause.feature_name + direction::Symbol = subclause.direction + value::Float32 = subclause.splitval push!(condition, [feature_name, direction, value]) end return condition