-
Notifications
You must be signed in to change notification settings - Fork 2
Add DNF domain minimization functionality and related structures #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: FromForeststoMinimalFormulasALogic-DrivenFrameworktoExplainEnsembleModels
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## FromForeststoMinimalFormulasALogic-DrivenFrameworktoExplainEnsembleModels #50 +/- ##
============================================================================================================
Coverage ? 46.80%
============================================================================================================
Files ? 52
Lines ? 3596
Branches ? 0
============================================================================================================
Hits ? 1683
Misses ? 1913
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…nused configuration parameter (which was used in the old test mode)
… name: "Submodule for datasets #41" - Added new dependencies to Project.toml: DataFrames and Pkg. - Removed the obsolete espresso file. - Enhanced the minimize.jl file with improved comments and artifact loading logic. - Created artifactloader.jl to manage artifact downloads and extraction. - Implemented loader.jl to automate the generation of Artifacts.toml. - Added Artifacts.toml with necessary artifact entries for ABC and MITESPRESSO.
@show espressoPath | ||
espressobinary = joinpath(espressoPath, "espresso") | ||
@show espressobinary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid @show if we want to print something for the user; let's remove these or use println statements as usual. We could probably also have a silent::Bool kwarg to suppress any output.
""" | ||
function fill_artifacts(url::String) | ||
Completely automatize the insertion of a new resource into the Artifacts.toml file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely automatize the insertion of a new resource into the Artifacts.toml file. | |
Automatate the insertion of a new resource into the Artifacts.toml file. |
end | ||
|
||
""" | ||
function fill_artifacts(url::String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function fill_artifacts(url::String) | |
fill_artifacts(url::String) |
artifact_loader(::Any) = @error "No artifact_loader method written for generic type" | ||
artifact_loader(::AbstractLoader) = @error "No artifact_loader method written for generic AbstractLoader type" | ||
artifact_loader(::AbstractLoaderDataset) = @error "No artifact_loader method written for generic AbstractLoaderDataset type" | ||
artifact_loader(::AbstractLoaderBinary) = @error "No artifact_loader method written for generic AbstractLoaderBinary type" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single implementation is enough:
artifact_loader(::Any) = @error "No artifact_loader method written for generic type" | |
artifact_loader(::AbstractLoader) = @error "No artifact_loader method written for generic AbstractLoader type" | |
artifact_loader(::AbstractLoaderDataset) = @error "No artifact_loader method written for generic AbstractLoaderDataset type" | |
artifact_loader(::AbstractLoaderBinary) = @error "No artifact_loader method written for generic AbstractLoaderBinary type" | |
artifact_loader(loader::Any) = @error "No artifact_loader method written for loader of type `$(typeof(loader))`" |
I would also switch from artifact_loader
to artifact
.
abstract type AbstractLoaderDataset <: AbstractLoader end | ||
abstract type AbstractLoaderBinary <: AbstractLoader end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid hypertyping if we don't need to, these are not strictly needed.
abstract type AbstractLoaderDataset <: AbstractLoader end | ||
abstract type AbstractLoaderBinary <: AbstractLoader end | ||
|
||
struct ABCLoaderBinary <: AbstractLoaderBinary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct ABCLoaderBinary <: AbstractLoaderBinary | |
struct ABCBinaryLoader <: AbstractLoaderBinary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for MITESPRESSO, seems more readable like this
I'm opening this PR as indicated to evaluate together the possible contribution of this code, which through the refine_dnf function aims to minimize the number of disjuncts within a DNF by evaluating the domains of the features contained in it.