Skip to content
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
14 changes: 0 additions & 14 deletions src/FeatureSelection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,4 @@ const MMI = MLJModelInterface
include("models/featureselector.jl")
include("models/rfe.jl")

## Pkg Traits
MMI.metadata_pkg.(
(
DeterministicRecursiveFeatureElimination,
ProbabilisticRecursiveFeatureElimination,
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"
)

end # module
11 changes: 11 additions & 0 deletions src/models/featureselector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ 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
21 changes: 17 additions & 4 deletions src/models/rfe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ It recursively removes features, training a base model on the remaining features
evaluating their importance until the desired number of features is selected.

Construct an instance with default hyper-parameters using the syntax
`model = RecursiveFeatureElimination(model=...)`. Provide keyword arguments to override
`rfe_model = RecursiveFeatureElimination(model=...)`. Provide keyword arguments to override
hyper-parameter defaults.

# Training data
In MLJ or MLJBase, bind an instance `model` to data with
In MLJ or MLJBase, bind an instance `rfe_model` to data with

mach = machine(model, X, y)
mach = machine(rfe_model, X, y)

OR, if the base model supports weights, as

mach = machine(model, X, y, w)
mach = machine(rfe_model, X, y, w)

Here:

Expand Down Expand Up @@ -387,3 +387,16 @@ 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"
)