Skip to content
Closed
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
13 changes: 12 additions & 1 deletion src/models/featureselector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,20 @@ MMI.metadata_model(
FeatureSelector,
input_scitype = Table,
output_scitype = Table,
load_path = "FeatureSelction.FeatureSelector"
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
23 changes: 18 additions & 5 deletions src/models/rfe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,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,4 +387,17 @@ end
## TRAINING LOSSES SUPPORT
function MMI.training_losses(model::RFE, rfe_report)
return MMI.training_losses(model.model, rfe_report.model_report)
end
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"
)