diff --git a/Project.toml b/Project.toml index 74a2aac3..82fd81c0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Imbalance" uuid = "c709b415-507b-45b7-9a3d-1767c89fde68" authors = ["Essam Wisam ", "Anthony Blaom and contributors"] -version = "0.1.4" +version = "0.1.5" [deps] diff --git a/src/oversampling_methods/random_oversample/interface_mlj.jl b/src/oversampling_methods/random_oversample/interface_mlj.jl index 543649a1..df5cf699 100644 --- a/src/oversampling_methods/random_oversample/interface_mlj.jl +++ b/src/oversampling_methods/random_oversample/interface_mlj.jl @@ -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 diff --git a/src/oversampling_methods/random_oversample/random_oversample.jl b/src/oversampling_methods/random_oversample/random_oversample.jl index 5f1a0ebe..eefb4917 100644 --- a/src/oversampling_methods/random_oversample/random_oversample.jl +++ b/src/oversampling_methods/random_oversample/random_oversample.jl @@ -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 diff --git a/src/oversampling_methods/random_walk/interface_mlj.jl b/src/oversampling_methods/random_walk/interface_mlj.jl index 50700d35..4cec2b93 100644 --- a/src/oversampling_methods/random_walk/interface_mlj.jl +++ b/src/oversampling_methods/random_walk/interface_mlj.jl @@ -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 diff --git a/src/oversampling_methods/smoten/interface_mlj.jl b/src/oversampling_methods/smoten/interface_mlj.jl index 98ef323d..546fd5ea 100644 --- a/src/oversampling_methods/smoten/interface_mlj.jl +++ b/src/oversampling_methods/smoten/interface_mlj.jl @@ -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 }, @@ -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 @@ -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 diff --git a/src/oversampling_methods/smotenc/interface_mlj.jl b/src/oversampling_methods/smotenc/interface_mlj.jl index 76aeeabb..e41c4bca 100644 --- a/src/oversampling_methods/smotenc/interface_mlj.jl +++ b/src/oversampling_methods/smotenc/interface_mlj.jl @@ -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 diff --git a/src/undersampling_methods/random_undersample/interface_mlj.jl b/src/undersampling_methods/random_undersample/interface_mlj.jl index c79d3bc3..6a1985a0 100644 --- a/src/undersampling_methods/random_undersample/interface_mlj.jl +++ b/src/undersampling_methods/random_undersample/interface_mlj.jl @@ -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 diff --git a/src/undersampling_methods/random_undersample/random_undersample.jl b/src/undersampling_methods/random_undersample/random_undersample.jl index 849e377b..4bfd564d 100644 --- a/src/undersampling_methods/random_undersample/random_undersample.jl +++ b/src/undersampling_methods/random_undersample/random_undersample.jl @@ -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