From b3f406b57caa0bab965b6f628cee60de753cce2e Mon Sep 17 00:00:00 2001 From: giopaglia <24519853+giopaglia@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:19:46 +1100 Subject: [PATCH] Fix and bump --- Project.toml | 2 +- src/models/evaluation.jl | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 320ceef..803dadf 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "SoleModels" uuid = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8" license = "MIT" authors = ["Michele GHIOTTI", "Giovanni PAGLIARINI", "Eduard I. STAN"] -version = "0.5.2" +version = "0.5.3" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/src/models/evaluation.jl b/src/models/evaluation.jl index 0895554..ce3df78 100644 --- a/src/models/evaluation.jl +++ b/src/models/evaluation.jl @@ -27,8 +27,6 @@ function readmetrics(m::LeafModel{L}; digits = 2) where {L<:Label} end elseif haskey(info(m), :supporting_labels) return (; ninstances = length(info(m).supporting_labels)) - elseif haskey(info(consequent(m)), :supporting_labels) - return (; ninstances = length(info(m).supporting_labels)) else return (;) end, (; coverage = 1.0)) @@ -70,11 +68,11 @@ See also [`checkantecedent`](@ref). """ function evaluaterule( - rule::Rule{O,A,FM}, + rule::Rule, X::AbstractInterpretationSet, Y::AbstractVector{<:Label}; kwargs..., -) where {O,A,FM<:AbstractModel} +) #println("Evaluation rule in time...") ys = apply(rule,X) #if X isa SupportedLogiset @@ -147,11 +145,11 @@ See also [`consequent`](@ref). """ function rulemetrics( - rule::Rule{O,A,FM}, + rule::Rule, X::AbstractInterpretationSet, Y::AbstractVector{<:Label}; kwargs..., -) where {O,A,FM<:AbstractModel} +) eval_result = evaluaterule(rule, X, Y; kwargs...) ys = eval_result[:ys] antsat = eval_result[:antsat]