Skip to content

Commit

Permalink
Merge pull request #26 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 0.2.2 release
  • Loading branch information
ablaom authored Aug 5, 2024
2 parents 833bbdc + 2c39eab commit 8ffffdf
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
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

0 comments on commit 8ffffdf

Please sign in to comment.