Skip to content

Commit

Permalink
Merge pull request #82 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 0.1.5 release
  • Loading branch information
EssamWisam authored Jan 15, 2024
2 parents af9a821 + e278886 commit 52c4c66
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Imbalance"
uuid = "c709b415-507b-45b7-9a3d-1767c89fde68"
authors = ["Essam Wisam <[email protected]>", "Anthony Blaom <[email protected]> and contributors"]
version = "0.1.4"
version = "0.1.5"


[deps]
Expand Down
6 changes: 5 additions & 1 deletion src/oversampling_methods/random_oversample/interface_mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ $((COMMON_DOCS["RNG"]))
# Transform Inputs
$((COMMON_DOCS["INPUTS"]))
- `X`: A matrix of real numbers or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Union{Finite, Infinite}`.
Elements in nominal columns should subtype `Finite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `Count` or `Continuous`).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Transform Outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ Naively oversample a dataset by randomly repeating existing observations with re
# Positional Arguments
$(COMMON_DOCS["INPUTS"])
- `X`: A matrix of real numbers or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Union{Finite, Infinite}`.
Elements in nominal columns should subtype `Finite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `Count` or `Continuous`).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Keyword Arguments
Expand Down
2 changes: 1 addition & 1 deletion src/oversampling_methods/random_walk/interface_mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $((COMMON_DOCS["RNG"]))
# Transform Inputs
- `X`: A matrix of floats or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/)
- `X`: A table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/)
that subtype `Union{Finite, Infinite}`. Elements in nominal columns should subtype `Finite`
(i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have
Expand Down
12 changes: 8 additions & 4 deletions src/oversampling_methods/smoten/interface_mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ MMI.metadata_model(
input_scitype = Tuple{
Union{
Table(Finite),
AbstractMatrix{Finite}
AbstractMatrix{<:Finite}
},
AbstractVector
},
output_scitype = Tuple{
Union{
Table(Finite),
AbstractMatrix{Finite}
AbstractMatrix{<:Finite}
},
AbstractVector
},
Expand All @@ -77,7 +77,7 @@ MMI.metadata_model(

function MMI.transform_scitype(s::SMOTEN)
return Tuple{
Union{Table(Finite),AbstractMatrix{Finite}},
Union{Table(Finite),AbstractMatrix{<:Finite}},
AbstractVector{<:Finite},
}
end
Expand Down Expand Up @@ -119,7 +119,11 @@ $((COMMON_DOCS["RNG"]))
# Transform Inputs
$((COMMON_DOCS["INPUTS"]))
- `X`: A matrix of integers or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Finite`.
That is, for table inputs each column should have either `OrderedFactor` or `Multiclass` as the element [scitype](https://juliaai.github.io/ScientificTypes.jl/).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Transform Outputs
Expand Down
6 changes: 5 additions & 1 deletion src/oversampling_methods/smotenc/interface_mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ $((COMMON_DOCS["RNG"]))
# Transform Inputs
$((COMMON_DOCS["INPUTS"]))
- `X`: A table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Union{Finite, Infinite}`.
Elements in nominal columns should subtype `Finite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `Count` or `Continuous`).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Transform Outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ $((COMMON_DOCS["RNG"]))
# Transform Inputs
$((COMMON_DOCS["INPUTS"]))
- `X`: A matrix of real numbers or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Union{Finite, Infinite}`.
Elements in nominal columns should subtype `Finite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `Count` or `Continuous`).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Transform Outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ Naively undersample a dataset by randomly deleting existing observations.
# Positional Arguments
$(COMMON_DOCS["INPUTS"])
- `X`: A matrix of real numbers or a table with element [scitypes](https://juliaai.github.io/ScientificTypes.jl/) that subtype `Union{Finite, Infinite}`.
Elements in nominal columns should subtype `Finite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `OrderedFactor` or `Multiclass`) and
elements in continuous columns should subtype `Infinite` (i.e., have [scitype](https://juliaai.github.io/ScientificTypes.jl/) `Count` or `Continuous`).
- `y`: An abstract vector of labels (e.g., strings) that correspond to the observations in `X`
# Keyword Arguments
Expand Down

0 comments on commit 52c4c66

Please sign in to comment.