Skip to content
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

For a 0.2.2 release #26

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FeatureSelection"
uuid = "33837fe5-dbff-4c9e-8c2f-c5612fe2b8b6"
authors = ["Anthony D. Blaom <anthony.blaom@gmail.com>", "Samuel Okon <okonsamuel50@gmail.com"]
version = "0.2.1"
version = "0.2.2"

[deps]
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
Expand Down
1 change: 1 addition & 0 deletions src/FeatureSelection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ const MMI = MLJModelInterface
## Includes
include("models/featureselector.jl")
include("models/rfe.jl")
include("shared.jl")

end # module
10 changes: 0 additions & 10 deletions src/models/featureselector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ MMI.metadata_model(
load_path = "FeatureSelection.FeatureSelector"
)

## Pkg Traits
MMI.metadata_pkg(
FeatureSelector,
package_name = "FeatureSelection",
package_uuid = "33837fe5-dbff-4c9e-8c2f-c5612fe2b8b6",
package_url = "https://github.com/JuliaAI/FeatureSelection.jl",
is_pure_julia = true,
package_license = "MIT"
)

## Docstring
"""
$(MMI.doc_header(FeatureSelector))
Expand Down
13 changes: 0 additions & 13 deletions src/models/rfe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -453,16 +453,3 @@ end
function MMI.training_losses(model::RFE, rfe_report)
return MMI.training_losses(model.model, rfe_report.model_report)
end

## Pkg Traits
MMI.metadata_pkg.(
(
DeterministicRecursiveFeatureElimination,
ProbabilisticRecursiveFeatureElimination,
),
package_name = "FeatureSelection",
package_uuid = "33837fe5-dbff-4c9e-8c2f-c5612fe2b8b6",
package_url = "https://github.com/JuliaAI/FeatureSelection.jl",
is_pure_julia = true,
package_license = "MIT"
)
16 changes: 16 additions & 0 deletions src/shared.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Pkg Traits

for M in [
:FeatureSelector,
:DeterministicRecursiveFeatureElimination,
:ProbabilisticRecursiveFeatureElimination,
]
quote
MMI.package_name(::Type{<:$M}) = "FeatureSelection"
MMI.package_uuid(::Type{<:$M}) = "33837fe5-dbff-4c9e-8c2f-c5612fe2b8b6"
MMI.package_url(::Type{<:$M}) = "https://github.com/JuliaAI/FeatureSelection.jl"
MMI.is_pure_julia(::Type{<:$M}) = true
MMI.package_license(::Type{<:$M}) = "MIT"
end |> eval
end

8 changes: 8 additions & 0 deletions test/models/rfe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,11 @@ end

@test predict(mach2, (; x1=rand(2), x2=rand(2))) == yhat
end

@testset "is_wrapper" begin
m = RecursiveFeatureElimination(DecisionTreeClassifier())
@test is_wrapper(m)
@test is_wrapper(typeof(m))
end

true
Loading