diff --git a/Project.toml b/Project.toml index 78747bd5..d81fcd31 100644 --- a/Project.toml +++ b/Project.toml @@ -22,7 +22,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] -MLJBase = "0.5" +MLJBase = "0.6" julia = "1" [extras] diff --git a/src/Clustering.jl b/src/Clustering.jl index 356b988b..4aa255a2 100755 --- a/src/Clustering.jl +++ b/src/Clustering.jl @@ -6,6 +6,7 @@ module Clustering_ import MLJBase +import MLJBase: @mlj_model using ScientificTypes import ..Clustering # strange sytax for lazy-loading @@ -15,8 +16,6 @@ using LinearAlgebra: norm const C = Clustering -import ..@mlj_model - const KMeansDescription = """ K-Means algorithm: find K centroids corresponding to K clusters in the data. diff --git a/src/MLJModels.jl b/src/MLJModels.jl index 7cb5c913..023733ec 100755 --- a/src/MLJModels.jl +++ b/src/MLJModels.jl @@ -1,35 +1,25 @@ module MLJModels +using MLJBase, Tables, ScientificTypes +using Requires, Pkg.TOML, OrderedCollections +using StatsBase # countmap is required in metadata + # for administrators to update Metadata.toml: export @update -# from builtins/Transformers.jl: -export StaticTransformer, FillImputer, FeatureSelector, - UnivariateStandardizer, Standardizer, - UnivariateBoxCoxTransformer, - OneHotEncoder - -# from builtins/Constant.jl: -export ConstantRegressor, ConstantClassifier - -# from builtins/KNN.jl: -export KNNRegressor - # from loading.jl: export load, @load, info # from model_search: export models, localmodels -using Requires -using OrderedCollections -using MLJBase -using ScientificTypes -using Tables -using ColorTypes -using StatsBase +# from model/Constant +export ConstantRegressor, ConstantClassifier, + DeterministicConstantRegressor, DeterministicConstantClassifier -using Pkg.TOML +# from model/Transformers +export FeatureSelector, StaticTransformer, UnivariateStandardizer, + Standardizer, UnivariateBoxCoxTransformer, OneHotEncoder, FillImputer const srcdir = dirname(@__FILE__) # the directory containing this file @@ -40,9 +30,6 @@ if VERSION < v"1.3" end nonmissing = nonmissingtype - -include("metadata_utils.jl") - include("metadata.jl") include("model_search.jl") include("loading.jl") @@ -50,15 +37,25 @@ include("registry/src/Registry.jl") import .Registry.@update # load built-in models: -include("builtins/Transformers.jl") include("builtins/Constant.jl") -include("parameters_utils.jl") -include("metadata_utils.jl") +include("builtins/Transformers.jl") + +const INFO_GIVEN_HANDLE = Dict{Handle,Any}() +const PKGS_GIVEN_NAME = Dict{String,Vector{String}}() +const AMBIGUOUS_NAMES = String[] +const NAMES = String[] +# lazily load in strap-on model interfaces for external packages: function __init__() + metadata_file = joinpath(srcdir, "registry", "Metadata.toml") + + merge!(INFO_GIVEN_HANDLE, info_given_handle(metadata_file)) + merge!(PKGS_GIVEN_NAME, pkgs_given_name(INFO_GIVEN_HANDLE)) + append!(AMBIGUOUS_NAMES, ambiguous_names(INFO_GIVEN_HANDLE)) + append!(NAMES, model_names(INFO_GIVEN_HANDLE)) + @info "Model metadata loaded from registry. " - # lazily load in strap-on model interfaces for external packages: @require MultivariateStats="6f286f6a-111f-5878-ab1e-185364afe411" include("MultivariateStats.jl") @require DecisionTree="7806a523-6efd-50cb-b5f6-3fa6f1930dbb" include("DecisionTree.jl") @require GaussianProcesses="891a1506-143c-57d2-908e-e1f8e92e6de9" include("GaussianProcesses.jl") @@ -69,7 +66,6 @@ function __init__() @require XGBoost = "009559a3-9522-5dbb-924b-0b6ed2b22bb9" include("XGBoost.jl") @require LIBSVM="b1bec4e5-fd48-53fe-b0cb-9723c09d164b" include("LIBSVM.jl") @require NearestNeighbors="b8a86587-4115-5ab1-83bc-aa920d37bbce" include("NearestNeighbors.jl") - end end # module diff --git a/src/MultivariateStats.jl b/src/MultivariateStats.jl index 955e67c4..7385fb0c 100644 --- a/src/MultivariateStats.jl +++ b/src/MultivariateStats.jl @@ -3,6 +3,7 @@ module MultivariateStats_ export RidgeRegressor, PCA, KernelPCA, ICA import MLJBase +import MLJBase: @mlj_model using ScientificTypes using Tables @@ -15,8 +16,6 @@ struct LinearFitresult{F} <: MLJBase.MLJType bias::F end -import ..@mlj_model - #### #### RIDGE #### diff --git a/src/NearestNeighbors.jl b/src/NearestNeighbors.jl index 8cf4246c..4849ff55 100644 --- a/src/NearestNeighbors.jl +++ b/src/NearestNeighbors.jl @@ -1,10 +1,10 @@ module NearestNeighbors_ import MLJBase +import MLJBase: @mlj_model, metadata_model, metadata_pkg using Distances import ..NearestNeighbors -import ..@mlj_model, ..metadata_pkg, ..metadata_model const NN = NearestNeighbors @@ -70,32 +70,6 @@ end const KNN = Union{KNNRegressor, KNNClassifier} -function MLJBase.clean!(m::KNN) - warning = "" - if m.K < 1 - warning *= "Number of neighbors 'K' needs to be larger than 0. Setting to 1.\n" - m.K = 1 - end - if m.leafsize < 0 - warning *= "Leaf size should be ≥ 0. Setting to 10.\n" - m.leafsize = 10 - end - if m.algorithm ∉ (:kdtree, :brutetree, :balltree) - warning *= "The tree algorithm should be ':kdtree', ':brutetree' or ':balltree'." * - "Setting to ':kdtree'.\n" - m.algorithm = :kdtree - end - if m.algorithm == :kdtree && !isa(m.metric ∉ (Euclidean, Chebyshev, Minkowski, Citiblock)) - warning *= "KDTree only supports axis-aligned metrics. Setting to 'Euclidean'.\n" - m.metric = Euclidean() - end - if m.weights ∉ (:uniform, :distance) - warning *= "Weighing should be ':uniform' or ':distance'. Setting to ':uniform'.\n" - m.weights = :distance - end - return warning -end - function MLJBase.fit(m::KNN, verbosity::Int, X, y) Xmatrix = MLJBase.matrix(X, transpose=true) # NOTE: copies the data if m.algorithm == :kdtree diff --git a/src/ScikitLearn/ScikitLearn.jl b/src/ScikitLearn/ScikitLearn.jl index 1302d0d7..13790115 100755 --- a/src/ScikitLearn/ScikitLearn.jl +++ b/src/ScikitLearn/ScikitLearn.jl @@ -2,6 +2,8 @@ module ScikitLearn_ #> for all Supervised models: import MLJBase +import MLJBase: @mlj_model, metadata_model, + _process_model_def, _model_constructor, _model_cleaner using ScientificTypes using Tables @@ -23,9 +25,6 @@ import ..ScikitLearn include("svm.jl") -import .._process_model_def, .._model_constructor, .._model_cleaner -import ..metadata_model # metadata_pkg is handled by @sk_model - const Option{T} = Union{Nothing, T} const SKLM = ((ScikitLearn.Skcore).pyimport("sklearn.linear_model")) diff --git a/src/builtins/Constant.jl b/src/builtins/Constant.jl index a7d68243..a4aa3ca7 100644 --- a/src/builtins/Constant.jl +++ b/src/builtins/Constant.jl @@ -1,17 +1,10 @@ -# this file defines *and* loads one module - module Constant -export ConstantRegressor, ConstantClassifier -export DeterministicConstantRegressor, DeterministicConstantClassifier +using ..MLJBase, ..Tables +using Distributions -import MLJBase -import MLJBase.nrows -import Distributions -using StatsBase -using Statistics -using CategoricalArrays -using ScientificTypes +export ConstantRegressor, ConstantClassifier, + DeterministicConstantRegressor, DeterministicConstantClassifier ## THE CONSTANT REGRESSOR @@ -23,7 +16,7 @@ probability distribution best fitting the training target data. Use `predict_mean` to predict the mean value instead. """ -struct ConstantRegressor{D} <: MLJBase.Probabilistic +struct ConstantRegressor{D} <: MLJBase.Probabilistic distribution_type::Type{D} end function ConstantRegressor(; distribution_type=Distributions.Normal) @@ -62,8 +55,8 @@ MLJBase.package_uuid(::Type{<:ConstantRegressor}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" MLJBase.package_url(::Type{<:ConstantRegressor}) = "https://github.com/alan-turing-institute/MLJModels.jl" MLJBase.is_pure_julia(::Type{<:ConstantRegressor}) = true -MLJBase.input_scitype(::Type{<:ConstantRegressor}) = Table(Scientific) # anything goes -MLJBase.target_scitype(::Type{<:ConstantRegressor}) = AbstractVector{Continuous} +MLJBase.input_scitype(::Type{<:ConstantRegressor}) = MLJBase.Table(MLJBase.Scientific) # anything goes +MLJBase.target_scitype(::Type{<:ConstantRegressor}) = AbstractVector{MLJBase.Continuous} ## THE CONSTANT DETERMINISTIC REGRESSOR (FOR TESTING) @@ -85,8 +78,8 @@ MLJBase.package_name(::Type{<:DeterministicConstantRegressor}) = MLJBase.package MLJBase.package_uuid(::Type{<:DeterministicConstantRegressor}) = MLJBase.package_url(ConstantRegressor) MLJBase.package_url(::Type{<:DeterministicConstantRegressor}) = MLJBase.package_url(ConstantRegressor) MLJBase.is_pure_julia(::Type{<:DeterministicConstantRegressor}) = true -MLJBase.input_scitype(::Type{<:DeterministicConstantRegressor}) = Table(Scientific) # anything goes -MLJBase.target_scitype(::Type{<:DeterministicConstantRegressor}) = AbstractVector{Continuous} +MLJBase.input_scitype(::Type{<:DeterministicConstantRegressor}) = MLJBase.Table(MLJBase.Scientific) # anything goes +MLJBase.target_scitype(::Type{<:DeterministicConstantRegressor}) = AbstractVector{MLJBase.Continuous} ## THE CONSTANT CLASSIFIER @@ -104,7 +97,7 @@ obtain the training target mode instead. struct ConstantClassifier <: MLJBase.Probabilistic end function MLJBase.fit(model::ConstantClassifier, - verbosity::Int, X, y) + verbosity::Int, X, y) fitresult = Distributions.fit(MLJBase.UnivariateFinite, y) @@ -127,8 +120,8 @@ MLJBase.package_name(::Type{<:ConstantClassifier}) = MLJBase.package_name(Consta MLJBase.package_uuid(::Type{<:ConstantClassifier}) = MLJBase.package_uuid(ConstantRegressor) MLJBase.package_url(::Type{<:ConstantClassifier}) = MLJBase.package_url(ConstantRegressor) MLJBase.is_pure_julia(::Type{<:ConstantClassifier}) = true -MLJBase.input_scitype(::Type{<:ConstantClassifier}) = Table(Scientific) # anything goes -MLJBase.target_scitype(::Type{<:ConstantClassifier}) = AbstractVector{<:Finite} +MLJBase.input_scitype(::Type{<:ConstantClassifier}) = MLJBase.Table(MLJBase.Scientific) # anything goes +MLJBase.target_scitype(::Type{<:ConstantClassifier}) = AbstractVector{<:MLJBase.Finite} ## DETERMINISTIC CONSTANT CLASSIFIER (FOR TESTING) @@ -161,13 +154,9 @@ MLJBase.package_name(::Type{<:DeterministicConstantClassifier}) = MLJBase.packag MLJBase.package_uuid(::Type{<:DeterministicConstantClassifier}) = MLJBase.package_uuid(ConstantRegressor) MLJBase.package_url(::Type{<:DeterministicConstantClassifier}) = MLJBase.package_url(ConstantRegressor) MLJBase.is_pure_julia(::Type{<:DeterministicConstantClassifier}) = true -MLJBase.input_scitype(::Type{<:DeterministicConstantClassifier}) = Table(Scientific) # anything goes -MLJBase.target_scitype(::Type{<:DeterministicConstantClassifier}) = AbstractVector{<:Finite} - +MLJBase.input_scitype(::Type{<:DeterministicConstantClassifier}) = MLJBase.Table(MLJBase.Scientific) # anything goes +MLJBase.target_scitype(::Type{<:DeterministicConstantClassifier}) = AbstractVector{<:MLJBase.Finite} -end # module - - -## EXPOSE THE INTERFACE +end -using .Constant +using MLJModels.Constant diff --git a/src/builtins/Transformers.jl b/src/builtins/Transformers.jl index 0ff7ecfd..8b462c24 100644 --- a/src/builtins/Transformers.jl +++ b/src/builtins/Transformers.jl @@ -1,29 +1,24 @@ -# note: this file defines *and* imports one module; see end +# NOTE 26/9/2019 (TL): it's very annoying but we **CANNOT** seem to +# be allowed to use @mlj_model, metadata_pkg or metadata_model here +# without it causing some form of "Method definition" warning +# or issue about an eval being called in a closed module. module Transformers -export FeatureSelector -# export ToIntTransformer -export UnivariateStandardizer, Standardizer -export UnivariateBoxCoxTransformer -export OneHotEncoder -export StaticTransformer -export FillImputer - -import MLJBase: MLJType, Unsupervised -import MLJBase: selectcols, table -import MLJBase -using ScientificTypes -import Distributions -using CategoricalArrays -using Statistics -using Tables -using StatsBase - -# to be extended: -import MLJBase: fit, transform, inverse_transform - -import ..@mlj_model, ..nonmissing +using ..MLJBase, ..Tables +using StatsBase, Statistics, CategoricalArrays, Distributions + +import ..nonmissing +import ..MLJBase: @mlj_model, metadata_pkg, metadata_model + + +export FeatureSelector, + StaticTransformer, + UnivariateStandardizer, + Standardizer, + UnivariateBoxCoxTransformer, + OneHotEncoder, + FillImputer ## CONSTANTS @@ -31,36 +26,49 @@ const N_VALUES_THRESH = 16 # for BoxCoxTransformation const CategoricalElement = Union{CategoricalValue,CategoricalString} -## STATIC TRANSFORMERS +#### STATIC TRANSFORMERS #### -mutable struct StaticTransformer <: Unsupervised - f # callable object or function -end +const STATIC_TRANSFORMER_DESCR = "Applies a given data transformation `f` (either a function or callable)." -StaticTransformer(; f=identity) = StaticTransformer(f) +""" +StaticTransformer -MLJBase.fitted_params(::StaticTransformer) = NamedTuple() +$STATIC_TRANSFORMER_DESCR + +## Field -MLJBase.fit(::StaticTransformer, verbosity::Integer, X) = - nothing, nothing, NamedTuple() +* `f=identity`: function or callable object to use for the data transformation. +""" +mutable struct StaticTransformer <: MLJBase.Unsupervised + f +end +StaticTransformer(;f=identity) = StaticTransformer(f) + +MLJBase.fitted_params(::StaticTransformer) = NamedTuple() +MLJBase.fit(::StaticTransformer, ::Integer, _) = nothing, nothing, NamedTuple() MLJBase.transform(model::StaticTransformer, fitresult, Xnew) = (model.f)(Xnew) -MLJBase.load_path(::Type{<:StaticTransformer}) = "MLJModels.StaticTransformer" -MLJBase.package_url(::Type{<:StaticTransformer}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_license(::Type{<:StaticTransformer}) = "MIT" -MLJBase.package_name(::Type{<:StaticTransformer}) = "MLJModels" -MLJBase.package_uuid(::Type{<:StaticTransformer}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:StaticTransformer}) = true -MLJBase.input_scitype(::Type{<:StaticTransformer}) = MLJBase.Table(MLJBase.Scientific) -MLJBase.output_scitype(::Type{<:StaticTransformer}) = MLJBase.Table(MLJBase.Scientific) +# metadata +MLJBase.input_scitype(::Type{<:StaticTransformer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.output_scitype(::Type{<:StaticTransformer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.docstring(::Type{<:StaticTransformer}) = STATIC_TRANSFORMER_DESCR +MLJBase.load_path(::Type{<:StaticTransformer}) = "MLJModels.StaticTransformer" + + +#### IMPUTER #### + +const FILL_IMPUTER_DESCR = "Imputes missing data with a fixed value computed on the non-missing values. The way to compute the filler depends on the scitype of the data and can be specified." -## Imputer +round_median(v::AbstractVector) = v -> round(eltype(v), median(v)) + +_median = e -> skipmissing(e) |> median +_round_median = e -> skipmissing(e) |> (f -> round(eltype(f), median(f))) +_mode = e -> skipmissing(e) |> mode """ - FillImputer - +FillImputer -Imputes missing data with a fixed value computed on the non-missing values. The way to -compute the filler depends on the scitype of the data and can be specified. +$FILL_IMPUTER_DESCR ## Fields @@ -68,27 +76,16 @@ compute the filler depends on the scitype of the data and can be specified. * `count_fill`: function to use on Count data (by default the rounded median) * `categorical_fill`: function to use on Finite data (by default the mode) """ -mutable struct FillImputer <: Unsupervised +mutable struct FillImputer <: MLJBase.Unsupervised features::Vector{Symbol} continuous_fill::Function count_fill::Function finite_fill::Function end - -round_median(v::AbstractVector) = v->round(eltype(v), median(v)) - -_median = e -> skipmissing(e) |> median -_round_median = e -> skipmissing(e) |> (f -> round(eltype(f), median(f))) -_mode = e -> skipmissing(e) |> mode - -function FillImputer(;features = Symbol[], - continuous_fill = _median, - count_fill = _round_median, - finite_fill = _mode) +FillImputer(; features=Symbol[], continuous_fill=_median, count_fill=_round_median, finite_fill=_mode) = FillImputer(features, continuous_fill, count_fill, finite_fill) -end -function fit(transformer::FillImputer, verbosity::Int, X) +function MLJBase.fit(transformer::FillImputer, verbosity::Int, X) if isempty(transformer.features) features = Tables.schema(X).names |> collect else @@ -100,7 +97,7 @@ function fit(transformer::FillImputer, verbosity::Int, X) return fitresult, cache, report end -function transform(transformer::FillImputer, fitresult, X) +function MLJBase.transform(transformer::FillImputer, fitresult, X) features = Tables.schema(X).names # check that the features match that of the transformer all(e -> e in fitresult, features) || @@ -110,13 +107,14 @@ function transform(transformer::FillImputer, fitresult, X) col = MLJBase.selectcols(X, ftr) if eltype(col) >: Missing T = scitype_union(col) - if T <: Union{Continuous,Missing} + if T <: Union{MLJBase.Continuous,Missing} filler = transformer.continuous_fill(col) - elseif T <: Union{Count,Missing} + elseif T <: Union{MLJBase.Count,Missing} filler = transformer.count_fill(col) - elseif T <: Union{Finite,Missing} + elseif T <: Union{MLJBase.Finite,Missing} filler = transformer.finite_fill(col) end + col = copy(col) # carries the same name but not attached to the same memory col[ismissing.(col)] .= filler col = convert.(nonmissing(eltype(col)), col) end @@ -126,20 +124,17 @@ function transform(transformer::FillImputer, fitresult, X) return MLJBase.table(named_cols, prototype=X) end -MLJBase.load_path(::Type{<:FillImputer}) = "MLJModels.FillImputer" -MLJBase.package_url(::Type{<:FillImputer}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_name(::Type{<:FillImputer}) = "MLJModels" -MLJBase.package_license(::Type{<:FillImputer}) = "MIT" -MLJBase.package_uuid(::Type{<:FillImputer}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:FillImputer}) = true -MLJBase.input_scitype(::Type{<:FillImputer}) = MLJBase.Table(MLJBase.Found) -MLJBase.output_scitype(::Type{<:FillImputer}) = MLJBase.Table(MLJBase.Found) +# metadata +MLJBase.input_scitype(::Type{<:FillImputer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.output_scitype(::Type{<:FillImputer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.docstring(::Type{<:FillImputer}) = FILL_IMPUTER_DESCR +MLJBase.load_path(::Type{<:FillImputer}) = "MLJModels.FillImputer" ## FOR FEATURE (COLUMN) SELECTION """ - FeatureSelector(features=Symbol[]) +FeatureSelector(features=Symbol[]) An unsupervised model for filtering features (columns) of a table. Only those features encountered during fitting will appear in @@ -149,19 +144,18 @@ specified features are used. Throws an error if a recorded or specified feature is not present in the transformation input. """ -mutable struct FeatureSelector <: Unsupervised +mutable struct FeatureSelector <: MLJBase.Unsupervised features::Vector{Symbol} end +FeatureSelector(; features=Symbol[]) = FeatureSelector(features) -FeatureSelector(;features=Symbol[]) = FeatureSelector(features) - -function fit(transformer::FeatureSelector, verbosity::Int, X) - namesX = Tables.schema(X).names - issubset(Set(transformer.features), Set(namesX)) || - throw(error("Attempting to select non-existent feature(s).")) +function MLJBase.fit(transformer::FeatureSelector, verbosity::Int, X) + namesX = collect(Tables.schema(X).names) if isempty(transformer.features) - fitresult = collect(namesX) + fitresult = namesX else + all(e -> e in namesX, transformer.features) || + throw(error("Attempting to select non-existent feature(s).")) fitresult = transformer.features end report = NamedTuple() @@ -170,21 +164,17 @@ end MLJBase.fitted_params(::FeatureSelector, fitresult) = (features_to_keep=fitresult,) -function transform(transformer::FeatureSelector, features, X) - issubset(Set(features), Set(Tables.schema(X).names)) || +function MLJBase.transform(transformer::FeatureSelector, features, X) + all(e -> e in Tables.schema(X).names, features) || throw(error("Supplied frame does not admit previously selected features.")) return MLJBase.selectcols(X, features) end -# metadata: -MLJBase.load_path(::Type{<:FeatureSelector}) = "MLJModels.FeatureSelector" -MLJBase.package_url(::Type{<:FeatureSelector}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_license(::Type{<:FeatureSelector}) = "MIT" -MLJBase.package_name(::Type{<:FeatureSelector}) = "MLJModels" -MLJBase.package_uuid(::Type{<:FeatureSelector}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:FeatureSelector}) = true -MLJBase.input_scitype(::Type{<:FeatureSelector}) = MLJBase.Table(Scientific) # anything goes -MLJBase.output_scitype(::Type{<:FeatureSelector}) = MLJBase.Table(Scientific) +# metadata +MLJBase.input_scitype(::Type{<:FeatureSelector}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.output_scitype(::Type{<:FeatureSelector}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.docstring(::Type{<:FeatureSelector}) = "Filter features (columns) of a table by name." +MLJBase.load_path(::Type{<:FeatureSelector}) = "MLJModels.FeatureSelector" ## UNIVARIATE STANDARDIZATION @@ -195,10 +185,10 @@ MLJBase.output_scitype(::Type{<:FeatureSelector}) = MLJBase.Table(Scientific) Unsupervised model for standardizing (whitening) univariate data. """ -mutable struct UnivariateStandardizer <: Unsupervised -end +mutable struct UnivariateStandardizer <: MLJBase.Unsupervised end -function fit(transformer::UnivariateStandardizer, verbosity::Int, v::AbstractVector{T}) where T<:Real +function MLJBase.fit(transformer::UnivariateStandardizer, verbosity::Int, + v::AbstractVector{T}) where T<:Real std(v) > eps(Float64) || @warn "Extremely small standard deviation encountered in standardization." fitresult = (mean(v), std(v)) @@ -208,36 +198,30 @@ function fit(transformer::UnivariateStandardizer, verbosity::Int, v::AbstractVec end # for transforming single value: -function transform(transformer::UnivariateStandardizer, fitresult, x::Real) +function MLJBase.transform(transformer::UnivariateStandardizer, fitresult, x::Real) mu, sigma = fitresult return (x - mu)/sigma end # for transforming vector: -transform(transformer::UnivariateStandardizer, fitresult, - v) = +MLJBase.transform(transformer::UnivariateStandardizer, fitresult, v) = [transform(transformer, fitresult, x) for x in v] # for single values: -function inverse_transform(transformer::UnivariateStandardizer, fitresult, y::Real) +function MLJBase.inverse_transform(transformer::UnivariateStandardizer, fitresult, y::Real) mu, sigma = fitresult return mu + y*sigma end # for vectors: -inverse_transform(transformer::UnivariateStandardizer, fitresult, w) = +MLJBase.inverse_transform(transformer::UnivariateStandardizer, fitresult, w) = [inverse_transform(transformer, fitresult, y) for y in w] -# metadata: -MLJBase.load_path(::Type{<:UnivariateStandardizer}) = "MLJModels.UnivariateStandardizer" -MLJBase.package_url(::Type{<:UnivariateStandardizer}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_name(::Type{<:UnivariateStandardizer}) = "MLJModels" -MLJBase.package_license(::Type{<:UnivariateStandardizer}) = "MIT" -MLJBase.package_uuid(::Type{<:UnivariateStandardizer}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:UnivariateStandardizer}) = true -MLJBase.input_scitype(::Type{<:UnivariateStandardizer}) = AbstractVector{<:Infinite} -MLJBase.output_scitype(::Type{<:UnivariateStandardizer}) = AbstractVector{Continuous} - +# metadata +MLJBase.input_scitype(::Type{<:UnivariateStandardizer}) = AbstractVector{<:MLJBase.Infinite} +MLJBase.output_scitype(::Type{<:UnivariateStandardizer}) = AbstractVector{MLJBase.Continuous} +MLJBase.docstring(::Type{<:UnivariateStandardizer}) = "Standardize (whiten) univariate data." +MLJBase.load_path(::Type{<:UnivariateStandardizer}) = "MLJModels.UnivariateStandardizer" ## STANDARDIZATION OF ORDINAL FEATURES OF TABULAR DATA @@ -247,7 +231,8 @@ MLJBase.output_scitype(::Type{<:UnivariateStandardizer}) = AbstractVector{Conti Unsupervised model for standardizing (whitening) the columns of tabular data. If `features` is empty then all columns `v` for which all elements have `Continuous` scitypes are standardized. For -different behaviour, specify the names of features to be standardized. +different behaviour (e.g. standardizing counts as well), specify the +names of features to be standardized. using DataFrames X = DataFrame(x1=[0.2, 0.3, 1.0], x2=[4, 2, 3]) @@ -263,27 +248,24 @@ different behaviour, specify the names of features to be standardized. │ 3 │ 1.14708 │ 3 │ """ -mutable struct Standardizer <: Unsupervised +mutable struct Standardizer <: MLJBase.Unsupervised features::Vector{Symbol} # features to be standardized; empty means all of end - -# lazy keyword constructor: Standardizer(; features=Symbol[]) = Standardizer(features) -function fit(transformer::Standardizer, verbosity::Int, X::Any) +function MLJBase.fit(transformer::Standardizer, verbosity::Int, X::Any) - _schema = schema(X) - all_features = _schema.names - types = schema(X).scitypes + all_features = Tables.schema(X).names + mach_types = collect(eltype(selectcols(X, c)) for c in all_features) # determine indices of all_features to be transformed if isempty(transformer.features) cols_to_fit = filter!(eachindex(all_features)|>collect) do j - types[j] <: Continuous + mach_types[j] <: AbstractFloat end else cols_to_fit = filter!(eachindex(all_features)|>collect) do j - all_features[j] in transformer.features && types[j] <: Continuous + all_features[j] in transformer.features && mach_types[j] <: Real end end @@ -304,20 +286,19 @@ function fit(transformer::Standardizer, verbosity::Int, X::Any) report = (features_fit=keys(fitresult_given_feature),) return fitresult, cache, report - end MLJBase.fitted_params(::Standardizer, fitresult) = (mean_and_std_given_feature=fitresult,) -function transform(transformer::Standardizer, fitresult, X) +function MLJBase.transform(transformer::Standardizer, fitresult, X) # `fitresult` is dict of column fitresults, keyed on feature names features_to_be_transformed = keys(fitresult) - all_features = schema(X).names + all_features = Tables.schema(X).names - issubset(Set(features_to_be_transformed), Set(all_features)) || + all(e -> e in all_features, features_to_be_transformed) || error("Attempting to transform data with incompatible feature labels.") col_transformer = UnivariateStandardizer() @@ -333,20 +314,13 @@ function transform(transformer::Standardizer, fitresult, X) named_cols = NamedTuple{all_features}(tuple(cols...)) return MLJBase.table(named_cols, prototype=X) - end -# metadata: -MLJBase.load_path(::Type{<:Standardizer}) = "MLJModels.Standardizer" -MLJBase.package_url(::Type{<:Standardizer}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_name(::Type{<:Standardizer}) = "MLJModels" -MLJBase.package_license(::Type{<:Standardizer}) = "MIT" -MLJBase.package_uuid(::Type{<:Standardizer}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:Standardizer}) = true - # non-continuous features allowed but ignored -MLJBase.input_scitype(::Type{<:Standardizer}) = MLJBase.Table(Scientific) -MLJBase.output_scitype(::Type{<:Standardizer}) = MLJBase.Table(Scientific) - +# metadata +MLJBase.input_scitype(::Type{<:Standardizer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.output_scitype(::Type{<:Standardizer}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.docstring(::Type{<:Standardizer}) = "Standardize (whiten) data." +MLJBase.load_path(::Type{<:Standardizer}) = "MLJModels.Standardizer" ## UNIVARIATE BOX-COX TRANSFORMATIONS @@ -361,22 +335,17 @@ function midpoints(v::AbstractVector{T}) where T <: Real end function normality(v) - n = length(v) - v = standardize(convert(Vector{Float64}, v)) - + v = standardize(convert(Vector{Float64}, v)) # sort and replace with midpoints v = midpoints(sort!(v)) - # find the (approximate) expected value of the size (n-1)-ordered statistics for # standard normal: d = Distributions.Normal(0,1) - w= map(collect(1:(n-1))/n) do x + w = map(collect(1:(n-1))/n) do x quantile(d, x) end - return cor(v, w) - end function boxcox(lambda, c, x::Real) @@ -410,15 +379,14 @@ positive shift `c` of `0.2` times the data mean. If there are no zero values, then no shift is applied. """ -mutable struct UnivariateBoxCoxTransformer <: Unsupervised +mutable struct UnivariateBoxCoxTransformer <: MLJBase.Unsupervised n::Int # nbr values tried in optimizing exponent lambda shift::Bool # whether to shift data away from zero end - -# lazy keyword constructor: UnivariateBoxCoxTransformer(; n=171, shift=false) = UnivariateBoxCoxTransformer(n, shift) -function fit(transformer::UnivariateBoxCoxTransformer, verbosity::Int, v::AbstractVector{T}) where T <: Real +function MLJBase.fit(transformer::UnivariateBoxCoxTransformer, verbosity::Int, + v::AbstractVector{T}) where T <: Real m = minimum(v) m >= 0 || error("Cannot perform a Box-Cox transformation on negative data.") @@ -441,15 +409,15 @@ function fit(transformer::UnivariateBoxCoxTransformer, verbosity::Int, v::Abstra end -fitted_params(::UnivariateBoxCoxTransformer, fitresult) = +MLJBase.fitted_params(::UnivariateBoxCoxTransformer, fitresult) = (λ=fitresult[1], c=fitresult[2]) # for X scalar or vector: -transform(transformer::UnivariateBoxCoxTransformer, fitresult, X) = +MLJBase.transform(transformer::UnivariateBoxCoxTransformer, fitresult, X) = boxcox(fitresult..., X) # scalar case: -function inverse_transform(transformer::UnivariateBoxCoxTransformer, +function MLJBase.inverse_transform(transformer::UnivariateBoxCoxTransformer, fitresult, x::Real) lambda, c = fitresult if lambda == 0 @@ -460,20 +428,16 @@ function inverse_transform(transformer::UnivariateBoxCoxTransformer, end # vector case: -function inverse_transform(transformer::UnivariateBoxCoxTransformer, +function MLJBase.inverse_transform(transformer::UnivariateBoxCoxTransformer, fitresult, w::AbstractVector{T}) where T <: Real return [inverse_transform(transformer, fitresult, y) for y in w] end -# metadata: -MLJBase.load_path(::Type{<:UnivariateBoxCoxTransformer}) = "MLJModels.UnivariateBoxCoxTransformer" -MLJBase.package_url(::Type{<:UnivariateBoxCoxTransformer}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_name(::Type{<:UnivariateBoxCoxTransformer}) = "MLJModels" -MLJBase.package_license(::Type{<:UnivariateBoxCoxTransformer}) = "MIT" -MLJBase.package_uuid(::Type{<:UnivariateBoxCoxTransformer}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:UnivariateBoxCoxTransformer}) = true -MLJBase.input_scitype(::Type{<:UnivariateBoxCoxTransformer}) = AbstractVector{Continuous} -MLJBase.output_scitype(::Type{<:UnivariateBoxCoxTransformer}) = AbstractVector{Continuous} +# metadata +MLJBase.input_scitype(::Type{<:UnivariateBoxCoxTransformer}) = AbstractVector{MLJBase.Continuous} +MLJBase.output_scitype(::Type{<:UnivariateBoxCoxTransformer}) = AbstractVector{MLJBase.Continuous} +MLJBase.docstring(::Type{<:UnivariateBoxCoxTransformer}) = "Box-Cox transformation of univariate data." +MLJBase.load_path(::Type{<:UnivariateBoxCoxTransformer}) = "MLJModels.UnivariateBoxCoxTransformer" ## ONE HOT ENCODING @@ -496,13 +460,11 @@ features present in the fit data, but no new features can be present. CategoricalPool object encountered during the fit. """ -mutable struct OneHotEncoder <: Unsupervised +mutable struct OneHotEncoder <: MLJBase.Unsupervised features::Vector{Symbol} drop_last::Bool ordered_factor::Bool end - -# lazy keyword constructor: OneHotEncoder(; features=Symbol[], drop_last=false, ordered_factor=true) = OneHotEncoder(features, drop_last, ordered_factor) @@ -510,7 +472,7 @@ OneHotEncoder(; features=Symbol[], drop_last=false, ordered_factor=true) = # corresponing feature labels generated (called # "names"). `all_features` is stored to ensure no new features appear # in new input data, causing potential name clashes. -struct OneHotEncoderResult <: MLJType +struct OneHotEncoderResult <: MLJBase.MLJType all_features::Vector{Symbol} # all feature labels ref_name_pairs_given_feature::Dict{Symbol,Vector{Pair{<:Unsigned,Symbol}}} end @@ -526,18 +488,16 @@ function compound_label(all_features, feature, level) return label end -function fit(transformer::OneHotEncoder, verbosity::Int, X) +function MLJBase.fit(transformer::OneHotEncoder, verbosity::Int, X) all_features = Tables.schema(X).names # a tuple not vector specified_features = isempty(transformer.features) ? collect(all_features) : transformer.features - + # ref_name_pairs_given_feature = Dict{Symbol,Vector{Pair{<:Unsigned,Symbol}}}() - allowed_scitypes = - transformer.ordered_factor == true ? Finite : Multiclass - + allowed_scitypes = ifelse(transformer.ordered_factor, Finite, Multiclass) col_scitypes = schema(X).scitypes - + # apply on each feature for j in eachindex(all_features) ftr = all_features[j] col = MLJBase.selectcols(X,j) @@ -557,13 +517,10 @@ function fit(transformer::OneHotEncoder, verbosity::Int, X) end end end - fitresult = OneHotEncoderResult(collect(all_features), ref_name_pairs_given_feature) report = (features_to_be_encoded=collect(keys(ref_name_pairs_given_feature)),) cache = nothing - return fitresult, cache, report - end # If v=categorical('a', 'a', 'b', 'a', 'c') and MLJBase.int(v[1]) = ref @@ -572,14 +529,12 @@ hot(v::AbstractVector{<:CategoricalElement}, ref) = map(v) do c MLJBase.int(c) == ref end -function transform(transformer::OneHotEncoder, fitresult, X) - +function MLJBase.transform(transformer::OneHotEncoder, fitresult, X) features = Tables.schema(X).names # tuple not vector d = fitresult.ref_name_pairs_given_feature - - issubset(Set(features), Set(fitresult.all_features)) || + # check the features match the fit result + all(e -> e in fitresult.all_features, features) || error("Attempting to transform table with feature labels not seen in fit. ") - new_features = Symbol[] new_cols = Vector[] features_to_be_transformed = keys(d) @@ -599,28 +554,35 @@ function transform(transformer::OneHotEncoder, fitresult, X) push!(new_cols, col) end end - named_cols = NamedTuple{tuple(new_features...)}(tuple(new_cols)...) - return MLJBase.table(named_cols, prototype=X) - end -# metadata: -MLJBase.load_path(::Type{<:OneHotEncoder}) = "MLJModels.OneHotEncoder" -MLJBase.package_url(::Type{<:OneHotEncoder}) = "https://github.com/alan-turing-institute/MLJModels.jl" -MLJBase.package_name(::Type{<:OneHotEncoder}) = "MLJModels" -MLJBase.package_license(::Type{<:OneHotEncoder}) = "MIT" -MLJBase.package_uuid(::Type{<:OneHotEncoder}) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" -MLJBase.is_pure_julia(::Type{<:OneHotEncoder}) = true -# non-finite allowed but ignored -MLJBase.input_scitype(::Type{<:OneHotEncoder}) = MLJBase.Table(Scientific) -MLJBase.output_scitype(::Type{<:OneHotEncoder}) = MLJBase.Table(Scientific) - - -end # end module - - -## EXPOSE THE INTERFACE +# metadata +MLJBase.input_scitype(::Type{<:OneHotEncoder}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.output_scitype(::Type{<:OneHotEncoder}) = MLJBase.Table(MLJBase.Scientific) +MLJBase.docstring(::Type{<:OneHotEncoder}) = "One-Hot-Encoding of the data." +MLJBase.load_path(::Type{<:OneHotEncoder}) = "MLJModels.OneHotEncoder" + +#### Metadata for all built-in transformers + +const BUILTIN_TRANSFORMERS = Union{ + Type{<:FeatureSelector}, + Type{<:StaticTransformer}, + Type{<:UnivariateStandardizer}, + Type{<:Standardizer}, + Type{<:UnivariateBoxCoxTransformer}, + Type{<:OneHotEncoder}, + Type{<:FillImputer} + } + +MLJBase.package_license(::BUILTIN_TRANSFORMERS) = "MIT" +MLJBase.package_name(::BUILTIN_TRANSFORMERS) = "MLJModels" +MLJBase.package_uuid(::BUILTIN_TRANSFORMERS) = "d491faf4-2d78-11e9-2867-c94bc002c0b7" +MLJBase.package_url(::BUILTIN_TRANSFORMERS) = "https://github.com/alan-turing-institute/MLJModels.jl" +MLJBase.is_pure_julia(::BUILTIN_TRANSFORMERS) = true +MLJBase.is_wrapper(::BUILTIN_TRANSFORMERS) = false + +end # module using .Transformers diff --git a/src/builtins/ridge.jl b/src/builtins/ridge.jl deleted file mode 100644 index 4c64d2a8..00000000 --- a/src/builtins/ridge.jl +++ /dev/null @@ -1,57 +0,0 @@ -# Defines a simple deterministic regressor for MLJ testing purposes -# only. MLJ users should use RidgeRegressor from MultivariateStats. - -import MLJBase -using LinearAlgebra -using ScientificTypes - -export FooBarRegressor - -mutable struct FooBarRegressor <: MLJBase.Deterministic - lambda::Float64 -end - -function FooBarRegressor(; lambda=0.0) - simpleridgemodel = FooBarRegressor(lambda) - message = MLJBase.clean!(simpleridgemodel) - isempty(message) || @warn message - return simpleridgemodel -end - -function MLJ.clean!(model::FooBarRegressor) - warning = "" - if model.lambda < 0 - warning *= "Need lambda ≥ 0. Resetting lambda=0. " - model.lambda = 0 - end - return warning -end - -function MLJBase.fitted_params(::FooBarRegressor, fitresult) - return (coefficients=fitresult) -end - -function MLJBase.fit(model::FooBarRegressor, verbosity::Int, X, y) - x = MLJBase.matrix(X) - fitresult = (x'x - model.lambda*I)\(x'y) - cache = nothing - report = NamedTuple() - return fitresult, cache, report -end - - -function MLJBase.predict(model::FooBarRegressor, fitresult, Xnew) - x = MLJBase.matrix(Xnew) - return x*fitresult -end - -# to hide from models generated from calls to models() -MLJBase.is_wrapper(::Type{<:FooBarRegressor}) = true - -# metadata: -MLJBase.load_path(::Type{<:FooBarRegressor}) = "MLJ.FooBarRegressor" -MLJBase.package_name(::Type{<:FooBarRegressor}) = "MLJ" -MLJBase.package_uuid(::Type{<:FooBarRegressor}) = "" -MLJBase.is_pure_julia(::Type{<:FooBarRegressor}) = true -MLJBase.input_scitype(::Type{<:FooBarRegressor}) = Table(Continuous) -MLJBase.target_scitype(::Type{<:FooBarRegressor}) = AbstractVector{Continuous} diff --git a/src/metadata.jl b/src/metadata.jl index 8ce94b9d..e70610f6 100644 --- a/src/metadata.jl +++ b/src/metadata.jl @@ -2,7 +2,7 @@ # (for serializing/deserializing into TOML format) function encode_dic(s) - if s isa Symbol + if s isa Symbol return string(":", s) elseif s isa AbstractString return string(s) @@ -113,7 +113,7 @@ function localmodeltypes(modl) i = MLJBase.info_dict(M) name = i[:name] return isdefined(modl, Symbol(name)) && - !i[:is_wrapper] + !i[:is_wrapper] end end end @@ -182,18 +182,17 @@ end ## METADATA INTITIALIZATION -# Note. This more naturally sits in __init__ but then causes issues -# with pre-compilation: - -try - metadata_file = joinpath(srcdir, "registry", "Metadata.toml") - global INFO_GIVEN_HANDLE = info_given_handle(metadata_file) - global AMBIGUOUS_NAMES = ambiguous_names(INFO_GIVEN_HANDLE) - global PKGS_GIVEN_NAME = pkgs_given_name(INFO_GIVEN_HANDLE) - global NAMES = model_names(INFO_GIVEN_HANDLE) - @info "Model metadata loaded from registry. " -catch - @warn "Problem loading registry from $metadata_file. "* - "Model search and model code loading disabled. " -end - +# # Note. This more naturally sits in __init__ but then causes issues +# # with pre-compilation: +# +# metadata_file = joinpath(srcdir, "registry", "Metadata.toml") +# try +# global INFO_GIVEN_HANDLE = info_given_handle(metadata_file) +# global AMBIGUOUS_NAMES = ambiguous_names(INFO_GIVEN_HANDLE) +# global PKGS_GIVEN_NAME = pkgs_given_name(INFO_GIVEN_HANDLE) +# global NAMES = model_names(INFO_GIVEN_HANDLE) +# @info "Model metadata loaded from registry. " +# catch +# @warn "Problem loading registry from $metadata_file. "* +# "Model search and model code loading disabled. " +# end diff --git a/src/metadata_utils.jl b/src/metadata_utils.jl deleted file mode 100644 index ff0a46e1..00000000 --- a/src/metadata_utils.jl +++ /dev/null @@ -1,58 +0,0 @@ -""" -docstring_ext - -Helper function to generate the docstring for an external package. -""" -function docstring_ext(T; descr::String="") - package_name = MLJBase.package_name(T) - package_url = MLJBase.package_url(T) - model_name = MLJBase.name(T) - # the message to return - message = "$descr" - message *= "\n→ based on [$package_name]($package_url)" - message *= "\n→ do `@load $model_name` to use the model" - message *= "\n→ do `?$model_name` for documentation." -end - -""" -metadata_pkg - -Helper function to write the metadata for a package. -""" -function metadata_pkg(T; name::String="unknown", uuid::String="unknown", url::String="unknown", - julia::Union{Missing,Bool}=missing, license::String="unknown", - is_wrapper::Bool=false) - ex = quote - MLJBase.package_name(::Type{<:$T}) = $name - MLJBase.package_uuid(::Type{<:$T}) = $uuid - MLJBase.package_url(::Type{<:$T}) = $url - MLJBase.is_pure_julia(::Type{<:$T}) = $julia - MLJBase.package_license(::Type{<:$T}) = $license - MLJBase.is_wrapper(::Type{<:$T}) = $is_wrapper - end - eval(ex) -end - -""" -metadata_model - -Helper function to write the metadata for a single model of a package (complements -[`metadata_ext`](@ref)). -""" -function metadata_model(T; input=MLJBase.Unknown, target=MLJBase.Unknown, - output=MLJBase.Unknown, weights::Bool=false, - descr::String="", path::String="") - if isempty(path) - path = "MLJModels.$(MLJBase.package_name(T))_.$(MLJBase.name(T))" - end - - ex = quote - MLJBase.input_scitype(::Type{<:$T}) = $input - MLJBase.output_scitype(::Type{<:$T}) = $output - MLJBase.target_scitype(::Type{<:$T}) = $target - MLJBase.supports_weights(::Type{<:$T}) = $weights - MLJBase.docstring(::Type{<:$T}) = docstring_ext($T, descr=$descr) - MLJBase.load_path(::Type{<:$T}) = $path - end - eval(ex) -end diff --git a/src/model_search.jl b/src/model_search.jl index d8391fd0..c9ee183e 100644 --- a/src/model_search.jl +++ b/src/model_search.jl @@ -1,14 +1,14 @@ ## FUNCTIONS TO INSPECT METADATA OF REGISTERED MODELS AND TO ## FACILITATE MODEL SEARCH -is_supervised(::Type{<:Supervised}) = true -is_supervised(::Type{<:Unsupervised}) = false +is_supervised(::Type{<:MLJBase.Supervised}) = true +is_supervised(::Type{<:MLJBase.Unsupervised}) = false supervised_propertynames = sort(MLJBase.SUPERVISED_TRAITS) alpha = [:name, :package_name, :is_supervised] omega = [:input_scitype, :target_scitype] both = vcat(alpha, omega) -filter!(!in(both), supervised_propertynames) +filter!(!in(both), supervised_propertynames) prepend!(supervised_propertynames, alpha) append!(supervised_propertynames, omega) const SUPERVISED_PROPERTYNAMES = Tuple(supervised_propertynames) @@ -17,7 +17,7 @@ unsupervised_propertynames = sort(MLJBase.UNSUPERVISED_TRAITS) alpha = [:name, :package_name, :is_supervised] omega = [:input_scitype, :output_scitype] both = vcat(alpha, omega) -filter!(!in(both), unsupervised_propertynames) +filter!(!in(both), unsupervised_propertynames) prepend!(unsupervised_propertynames, alpha) append!(unsupervised_propertynames, omega) const UNSUPERVISED_PROPERTYNAMES = Tuple(unsupervised_propertynames) @@ -51,7 +51,7 @@ function ==(m1::ModelProxy, m2::ModelProxy) end - + Base.show(stream::IO, p::ModelProxy) = print(stream, "(name = $(p.name), package_name = $(p.package_name), "* "... )") @@ -64,7 +64,7 @@ function Base.show(stream::IO, ::MIME"text/plain", p::ModelProxy) end # returns named tuple version of the dictionary i=info_dict(SomeModelType): -function info_as_named_tuple(i) +function info_as_named_tuple(i) propertynames = ifelse(i[:is_supervised], SUPERVISED_PROPERTYNAMES, UNSUPERVISED_PROPERTYNAMES) propertyvalues = Tuple(i[property] for property in propertynames) @@ -72,7 +72,7 @@ function info_as_named_tuple(i) end MLJBase.info(handle::Handle) = info_as_named_tuple(INFO_GIVEN_HANDLE[handle]) - + """ info(name::String; pkg=nothing) @@ -113,10 +113,10 @@ end Return the traits associated with the specified `model`. Equivalent to `info(name; pkg=pkg)` where `name::String` is the name of the model type, and `pkg::String` the name of the package containing it. - + """ -MLJBase.info(M::Type{<:Model}) = info_as_named_tuple(MLJBase.info_dict(M)) -MLJBase.info(model::Model) = info(typeof(model)) +MLJBase.info(M::Type{<:MLJBase.Model}) = info_as_named_tuple(MLJBase.info_dict(M)) +MLJBase.info(model::MLJBase.Model) = info(typeof(model)) """ models() @@ -154,7 +154,7 @@ end models() = models(x->true) -# function models(task::SupervisedTask) +# function models(task::MLJBase.SupervisedTask) # ret = Dict{String, Any}() # function condition(t) # return t.is_supervised && @@ -177,7 +177,7 @@ models() = models(x->true) """ localmodels(; modl=Main) localmodels(conditions...; modl=Main) - + List all models whose names are in the namespace of the specified module `modl`, or meeting the `conditions`, if specified. Here a diff --git a/src/parameters_utils.jl b/src/parameters_utils.jl deleted file mode 100644 index 13f56b5d..00000000 --- a/src/parameters_utils.jl +++ /dev/null @@ -1,187 +0,0 @@ -# This defines a macro `mlj_model` which is a simpler version than the -# @sk_model macro defined to help import sklearn models. -# The difference is that the `mlj_model` macro only defines the constructor and the `clean!` -# and does not automatically define the `fit` and `predict` methods -# -# NOTE: it does NOT handle parametric types yet. - -import Base: @__doc__ - -""" -_process_model_def(ex) - -Take an expression defining a model (`mutable struct Model ...`) and unpack key elements for -further processing: - -- Model name (`modelname`) -- Names of parameters (`params`) -- Default values (`defaults`) -- Constraints (`constraints`) -""" -function _process_model_def(ex) - defaults = Dict{Symbol,Any}() - constraints = Dict{Symbol,Any}() - modelname = ex.args[2] isa Symbol ? ex.args[2] : ex.args[2].args[1] - params = Symbol[] - - # inspect all lines which may define parameters, retrieve their names, - # default values and constraints on values that can be given to them - for i in 1:length(ex.args[3].args) - # retrieve meaningful lines - line = ex.args[3].args[i] - line isa LineNumberNode && continue - - # line without information (e.g. just a name "a") - if line isa Symbol - param = line - push!(params, param) - defaults[param] = missing - else - # A meaningful line will look like - # line.args[1] = line.args[2] - # - # where line.args[1] will either be just `name` or `name::Type` - # and line.args[2] will either be just `value` or `value::constraint` - # --------------------------------------------------------- - # 1. decompose `line.args[1]` appropriately (name and type) - if line.args[1] isa Symbol # case :a - param = line.args[1] - type = length(line.args) > 1 ? line.args[2] : :Any - else # case :(a::Int) - param, type = line.args[1].args[1:2] # (:a, Int) - end - push!(params, param) - # ------------------------------------------------------------------ - # 2. decompose `line.args[2]` appropriately (values and constraints) - if line.head == :(=) # assignment for default - default = line.args[2] - # if a constraint is given (value::constraint) - if default isa Expr && length(default.args) > 1 - constraints[param] = default.args[2] - # now discard the constraint to keep only the value - default = default.args[1] - end - defaults[param] = default # this will be a value not an expr - ex.args[3].args[i] = line.args[1] # name or name::Type (for the constructor) - else - # these are simple heuristics when no default value is given for the - # field but an "obvious" one can be provided implicitly (ideally this should - # not be used as it's not very clear that the intention matches the usage) - eff_type = eval(type) - if eff_type <: Number - defaults[param] = zero(eff_type) - elseif eff_type <: AbstractString - defaults[param] = "" - elseif eff_type == Any # e.g. Any or no type given - defaults[param] = missing - elseif eff_type >: Nothing # e.g. Union{Nothing, ...} - defaults[param] = nothing - elseif eff_type >: Missing # e.g. Union{Missing, ...} (unlikely) - defaults[param] = missing - else - @error "A default value for parameter '$param' (type '$type') must be given" - end - end - end - end - return ex, modelname, params, defaults, constraints -end - - -""" -_unpack!(ex, rep) - -Internal function to allow to read a constraint given after a default value for a parameter -and transform it in an executable condition (which is returned to be executed later). -For instance if we have - - alpha::Int = 0.5::(arg > 0.0) - -Then it would transform the `(arg > 0.0)` in `(alpha > 0.0)` which is executable. -""" -function _unpack!(ex::Expr, rep) - for i in eachindex(ex.args) - if ex.args[i] ∈ (:_, :arg) - ex.args[i] = rep - end - _unpack!(ex.args[i], rep) - end - return ex -end -_unpack!(ex, _) = ex # when it's been unpacked, it's not an expression anymore - - -""" -_model_constructor(modelname, params, defaults) - -Build the expression of the keyword constructor associated with a model definition. -When the constructor is called, the `MLJBase.clean!` function is called as well to check that -parameter assignments are valid. -""" -function _model_constructor(modelname, params, defaults) - Expr(:function, Expr(:call, modelname, Expr(:parameters, (Expr(:kw, p, defaults[p]) for p in params)...)), - # body of the function - Expr(:block, - Expr(:(=), :model, Expr(:call, :new, params...)), - :(message = MLJBase.clean!(model)), - :(isempty(message) || @warn message), - :(return model) - ) - ) -end - -""" -_model_cleaner(modelname, defaults, constraints) - -Build the expression of the cleaner associated with the constraints specified in a model def. -""" -function _model_cleaner(modelname, defaults, constraints) - Expr(:function, :(MLJBase.clean!(model::$modelname)), - # body of the function - Expr(:block, - :(warning = ""), - # condition and action for each constraint - # each parameter is given as field::Type = default::constraint - # here we recuperate the constraint and express it as an if statement - # for instance if we had - # alpha::Real = 0.0::(arg > 0.0) - # this would become - # if !(alpha > 0.0) - (Expr(:if, Expr(:call, :!, _unpack!(constr, :(model.$param))), - # action of the constraint is violated: - # add a message and use default for the parameter - Expr(:block, - :(warning *= $("Constraint `$constr` failed; using default: $param=$(defaults[param]).")), - :(model.$param = $(defaults[param])) - ) - ) for (param, constr) in constraints)..., - # return full message - :(return warning) - ) - ) -end - - -""" -mlj_model - -Macro to help define MLJ models with constraints on the default parameters, this can be seen as -a tweaked version of the `@with_kw` macro from `Parameters`. -""" -macro mlj_model(ex) - ex, modelname, params, defaults, constraints = _process_model_def(ex) - # keyword constructor - const_ex = _model_constructor(modelname, params, defaults) - # associate the constructor with the definition of the struct - push!(ex.args[3].args, const_ex) - # cleaner - clean_ex = _model_cleaner(modelname, defaults, constraints) - esc( - quote - Base.@__doc__ $ex - export $modelname - $ex - $clean_ex - end - ) -end diff --git a/src/registry/Metadata.toml b/src/registry/Metadata.toml index f913ffca..c34c00c3 100644 --- a/src/registry/Metadata.toml +++ b/src/registry/Metadata.toml @@ -1,7 +1,7 @@ [NearestNeighbors.KNNClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s68,1} where _s68<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s99,1} where _s99<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "NearestNeighbors" ":package_license" = "MIT" @@ -14,7 +14,7 @@ ":name" = "KNNClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":probabilistic" -":implemented_methods" = [":fit", ":predict", ":show", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":K", ":algorithm", ":metric", ":leafsize", ":reorder", ":weights"] ":hyperparameter_types" = ["Int64", "Symbol", "Distances.Metric", "Int64", "Bool", "Symbol"] @@ -33,104 +33,66 @@ ":name" = "KNNRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":show", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":K", ":algorithm", ":metric", ":leafsize", ":reorder", ":weights"] ":hyperparameter_types" = ["Int64", "Symbol", "Distances.Metric", "Int64", "Bool", "Symbol"] -[ScikitLearn.SVMNuClassifier] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s89,1} where _s89<:ScientificTypes.Finite`" -":is_pure_julia" = "`false`" -":package_name" = "ScikitLearn" -":package_license" = "unknown" -":load_path" = "MLJModels.ScikitLearn_.SVMNuClassifier" -":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" -":package_url" = "https://github.com/cstjean/ScikitLearn.jl" -":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "SVMNuClassifier from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "SVMNuClassifier" -":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!"] -":hyperparameters" = [":nu", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter", ":decision_function_shape", ":random_state"] -":hyperparameter_types" = ["Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64", "String", "Any"] - -[ScikitLearn.GaussianProcessRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" -":is_pure_julia" = "`false`" -":package_name" = "ScikitLearn" -":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.GaussianProcessRegressor" -":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" -":package_url" = "https://github.com/cstjean/ScikitLearn.jl" -":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "GaussianProcessRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "GaussianProcessRegressor" -":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":kernel", ":alpha", ":optimizer", ":n_restarts_optimizer", ":normalize_y", ":copy_X_train", ":random_state"] -":hyperparameter_types" = ["Any", "Any", "Any", "Int64", "Bool", "Bool", "Any"] - -[ScikitLearn.LassoCVRegressor] +[ScikitLearn.ProbabilisticSGDClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s569,1} where _s569<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LassoCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.ProbabilisticSGDClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LassoCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LassoCVRegressor" +":docstring" = "Linear classifier with stochastic gradient descent training.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load ProbabilisticSGDClassifier` to use the model\n→ do `?ProbabilisticSGDClassifier` for documentation." +":name" = "ProbabilisticSGDClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":precompute", ":max_iter", ":tol", ":copy_X", ":cv", ":verbose", ":n_jobs", ":positive", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Int64", "Any", "Bool", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Any", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Bool", "Int64", "String"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":loss", ":penalty", ":alpha", ":l1_ratio", ":fit_intercept", ":max_iter", ":tol", ":shuffle", ":verbose", ":epsilon", ":n_jobs", ":random_state", ":learning_rate", ":eta0", ":power_t", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":class_weight", ":warm_start", ":average"] +":hyperparameter_types" = ["String", "String", "Float64", "Float64", "Bool", "Int64", "Union{Nothing, Float64}", "Bool", "Int64", "Float64", "Union{Nothing, Int64}", "Any", "String", "Float64", "Float64", "Bool", "Float64", "Int64", "Any", "Bool", "Bool"] -[ScikitLearn.LarsRegressor] +[ScikitLearn.RidgeCVClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LarsRegressor" +":load_path" = "MLJModels.ScikitLearn_.RidgeCVClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LarsRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LarsRegressor" +":docstring" = "Ridge regression classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load RidgeCVClassifier` to use the model\n→ do `?RidgeCVClassifier` for documentation." +":name" = "RidgeCVClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":fit_intercept", ":verbose", ":normalize", ":precompute", ":n_nonzero_coefs", ":eps", ":copy_X", ":fit_path"] -":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Bool"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alphas", ":fit_intercept", ":normalize", ":scoring", ":cv", ":class_weight", ":store_cv_values"] +":hyperparameter_types" = ["AbstractArray{Float64,N} where N", "Bool", "Bool", "Any", "Int64", "Any", "Bool"] -[ScikitLearn.ElasticNetRegressor] +[ScikitLearn.LogisticClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.ElasticNetRegressor" +":load_path" = "MLJModels.ScikitLearn_.LogisticClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "ElasticNetRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "ElasticNetRegressor" +":docstring" = "Logistic regression classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load LogisticClassifier` to use the model\n→ do `?LogisticClassifier` for documentation." +":name" = "LogisticClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":l1_ratio", ":fit_intercept", ":normalize", ":precompute", ":max_iter", ":copy_X", ":tol", ":warm_start", ":positive", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Float64", "Bool", "Bool", "Union{Bool, AbstractArray{T,2} where T}", "Int64", "Bool", "Float64", "Bool", "Bool", "Any", "String"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":penalty", ":dual", ":tol", ":C", ":fit_intercept", ":intercept_scaling", ":class_weight", ":random_state", ":solver", ":max_iter", ":multi_class", ":verbose", ":warm_start", ":n_jobs", ":l1_ratio"] +":hyperparameter_types" = ["String", "Bool", "Float64", "Float64", "Bool", "Float64", "Any", "Any", "String", "Int64", "String", "Int64", "Bool", "Union{Nothing, Int64}", "Union{Nothing, Float64}"] [ScikitLearn.RandomForestRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" @@ -138,7 +100,7 @@ ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.RandomForestRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.RandomForestRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" @@ -147,7 +109,7 @@ ":name" = "RandomForestRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":n_estimators", ":criterion", ":max_depth", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_features", ":max_leaf_nodes", ":min_impurity_decrease", ":bootstrap", ":oob_score", ":n_jobs", ":random_state", ":verbose", ":warm_start"] ":hyperparameter_types" = ["Int64", "String", "Union{Nothing, Int64}", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Union{Nothing, Float64, Int64, String}", "Union{Nothing, Int64}", "Float64", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64", "Bool"] @@ -157,7 +119,7 @@ ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.ElasticNetCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.ElasticNetCVRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" @@ -166,294 +128,788 @@ ":name" = "ElasticNetCVRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":l1_ratio", ":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":precompute", ":max_iter", ":tol", ":cv", ":copy_X", ":verbose", ":n_jobs", ":positive", ":random_state", ":selection"] ":hyperparameter_types" = ["Union{Float64, Array{Float64,1}}", "Float64", "Int64", "Any", "Bool", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Any", "Bool", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Bool", "Any", "String"] -[ScikitLearn.LassoLarsRegressor] +[ScikitLearn.PerceptronClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LassoLarsRegressor" +":load_path" = "MLJModels.ScikitLearn_.PerceptronClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LassoLarsRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LassoLarsRegressor" +":docstring" = "Perceptron classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load PerceptronClassifier` to use the model\n→ do `?PerceptronClassifier` for documentation." +":name" = "PerceptronClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":fit_intercept", ":verbose", ":normalize", ":precompute", ":max_iter", ":eps", ":copy_X", ":fit_path", ":positive"] -":hyperparameter_types" = ["Float64", "Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Bool", "Any"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":penalty", ":alpha", ":fit_intercept", ":max_iter", ":tol", ":shuffle", ":verbose", ":eta0", ":n_jobs", ":random_state", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":class_weight", ":warm_start"] +":hyperparameter_types" = ["Union{Nothing, String}", "Float64", "Bool", "Int64", "Union{Nothing, Float64}", "Bool", "Int64", "Float64", "Union{Nothing, Int64}", "Any", "Bool", "Float64", "Int64", "Any", "Bool"] -[ScikitLearn.SVMLClassifier] +[ScikitLearn.MultiTaskLassoRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s89,1} where _s89<:ScientificTypes.Finite`" +":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" -":package_license" = "unknown" -":load_path" = "MLJModels.ScikitLearn_.SVMLClassifier" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.MultiTaskLassoRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "SVMLClassifier from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "SVMLClassifier" +":docstring" = "MultiTaskLassoRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "MultiTaskLassoRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!"] -":hyperparameters" = [":C", ":loss", ":dual", ":penalty", ":tol", ":max_iter", ":intercept_scaling", ":random_state"] -":hyperparameter_types" = ["Float64", "String", "Bool", "String", "Float64", "Int64", "Float64", "Any"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":copy_X", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "String"] -[ScikitLearn.AdaBoostRegressor] +[ScikitLearn.LinearRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.AdaBoostRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LinearRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "AdaBoostRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "AdaBoostRegressor" +":docstring" = "LinearRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LinearRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":base_estimator", ":n_estimators", ":learning_rate", ":loss", ":random_state"] -":hyperparameter_types" = ["Any", "Int64", "Float64", "String", "Any"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":fit_intercept", ":normalize", ":copy_X", ":n_jobs"] +":hyperparameter_types" = ["Bool", "Bool", "Bool", "Union{Nothing, Int64}"] -[ScikitLearn.LarsCVRegressor] +[ScikitLearn.RidgeRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LarsCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.RidgeRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LarsCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LarsCVRegressor" +":docstring" = "RidgeRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "RidgeRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":fit_intercept", ":verbose", ":max_iter", ":normalize", ":precompute", ":cv", ":max_n_alphas", ":n_jobs", ":eps", ":copy_X"] -":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Int64", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Any", "Int64", "Union{Nothing, Int64}", "Float64", "Bool"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":copy_X", ":max_iter", ":tol", ":solver", ":random_state"] +":hyperparameter_types" = ["Union{Float64, Array{Float64,1}}", "Bool", "Bool", "Bool", "Int64", "Float64", "String", "Any"] -[ScikitLearn.MultiTaskElasticNetRegressor] +[ScikitLearn.LassoLarsICRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.MultiTaskElasticNetRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LassoLarsICRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "MultiTaskElasticNetRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "MultiTaskElasticNetRegressor" +":docstring" = "LassoLarsICRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LassoLarsICRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":l1_ratio", ":fit_intercept", ":normalize", ":copy_X", ":max_iter", ":tol", ":warm_start", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Union{Float64, Array{Float64,1}}", "Bool", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "String"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":criterion", ":fit_intercept", ":verbose", ":normalize", ":precompute", ":max_iter", ":eps", ":copy_X", ":positive"] +":hyperparameter_types" = ["String", "Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Any"] -[ScikitLearn.LinearRegressor] +[ScikitLearn.ARDRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LinearRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.ARDRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LinearRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LinearRegressor" +":docstring" = "ARDRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "ARDRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":fit_intercept", ":normalize", ":copy_X", ":n_jobs"] -":hyperparameter_types" = ["Bool", "Bool", "Bool", "Union{Nothing, Int64}"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_iter", ":tol", ":alpha_1", ":alpha_2", ":lambda_1", ":lambda_2", ":compute_score", ":threshold_lambda", ":fit_intercept", ":normalize", ":copy_X", ":verbose"] +":hyperparameter_types" = ["Int64", "Float64", "Float64", "Float64", "Float64", "Float64", "Bool", "Float64", "Bool", "Bool", "Bool", "Bool"] -[ScikitLearn.MultiTaskLassoCVRegressor] +[ScikitLearn.SVMNuRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" -":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.MultiTaskLassoCVRegressor" +":package_license" = "unknown" +":load_path" = "MLJModels.ScikitLearn_.SVMNuRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "MultiTaskLassoCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "MultiTaskLassoCVRegressor" +":docstring" = "SVMNuRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "SVMNuRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":copy_X", ":cv", ":verbose", ":n_jobs", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Int64", "Any", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Any", "String"] +":implemented_methods" = [":fit", ":predict", ":clean!"] +":hyperparameters" = [":nu", ":C", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter"] +":hyperparameter_types" = ["Float64", "Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64"] -[ScikitLearn.MultiTaskLassoRegressor] +[ScikitLearn.RidgeClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.MultiTaskLassoRegressor" +":load_path" = "MLJModels.ScikitLearn_.RidgeClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "MultiTaskLassoRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "MultiTaskLassoRegressor" +":docstring" = "Ridge regression classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load RidgeClassifier` to use the model\n→ do `?RidgeClassifier` for documentation." +":name" = "RidgeClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":copy_X", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "String"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":copy_X", ":max_iter", ":tol", ":class_weight", ":solver", ":random_state"] +":hyperparameter_types" = ["Float64", "Bool", "Bool", "Bool", "Union{Nothing, Int64}", "Float64", "Any", "String", "Any"] -[ScikitLearn.OrthogonalMatchingPursuitRegressor] +[ScikitLearn.SGDRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.OrthogonalMatchingPursuitRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.SGDRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "OrthogonalMatchingPursuitRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "OrthogonalMatchingPursuitRegressor" +":docstring" = "SGDRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "SGDRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":n_nonzero_coefs", ":tol", ":fit_intercept", ":normalize", ":precompute"] -":hyperparameter_types" = ["Union{Nothing, Int64}", "Union{Nothing, Float64}", "Bool", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":loss", ":penalty", ":alpha", ":l1_ratio", ":fit_intercept", ":max_iter", ":tol", ":shuffle", ":verbose", ":epsilon", ":random_state", ":learning_rate", ":eta0", ":power_t", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":warm_start", ":average"] +":hyperparameter_types" = ["String", "String", "Float64", "Float64", "Bool", "Int64", "Float64", "Bool", "Union{Bool, Int64}", "Float64", "Any", "String", "Float64", "Float64", "Bool", "Float64", "Int64", "Bool", "Union{Bool, Int64}"] -[ScikitLearn.RidgeCVRegressor] +[ScikitLearn.ComplementNBClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Count)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.ComplementNBClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Similar to Multinomial NB classifier but with more robust assumptions. Suited for imbalanced datasets.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load ComplementNBClassifier` to use the model\n→ do `?ComplementNBClassifier` for documentation." +":name" = "ComplementNBClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_prior", ":class_prior", ":norm"] +":hyperparameter_types" = ["Float64", "Bool", "Union{Nothing, AbstractArray{T,1} where T}", "Bool"] + +[ScikitLearn.HuberRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.RidgeCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.HuberRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "RidgeCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "RidgeCVRegressor" +":docstring" = "HuberRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "HuberRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alphas", ":fit_intercept", ":normalize", ":scoring", ":cv", ":gcv_mode", ":store_cv_values"] -":hyperparameter_types" = ["Any", "Bool", "Bool", "Any", "Any", "Union{Nothing, String}", "Bool"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":epsilon", ":max_iter", ":alpha", ":warm_start", ":fit_intercept", ":tol"] +":hyperparameter_types" = ["Float64", "Int64", "Float64", "Bool", "Bool", "Float64"] -[ScikitLearn.SVMRegressor] +[ScikitLearn.SVMNuClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s98,1} where _s98<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "unknown" -":load_path" = "MLJModels.ScikitLearn_.SVMRegressor" +":load_path" = "MLJModels.ScikitLearn_.SVMNuClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "SVMRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "SVMRegressor" +":docstring" = "SVMNuClassifier from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "SVMNuClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" ":implemented_methods" = [":fit", ":predict", ":clean!"] -":hyperparameters" = [":C", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter", ":epsilon"] -":hyperparameter_types" = ["Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64", "Float64"] +":hyperparameters" = [":nu", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter", ":decision_function_shape", ":random_state"] +":hyperparameter_types" = ["Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64", "String", "Any"] -[ScikitLearn.MultiTaskElasticNetCVRegressor] +[ScikitLearn.GradientBoostingClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.MultiTaskElasticNetCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.GradientBoostingClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "MultiTaskElasticNetCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "MultiTaskElasticNetCVRegressor" +":docstring" = "Gradient boosting ensemble classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load GradientBoostingClassifier` to use the model\n→ do `?GradientBoostingClassifier` for documentation." +":name" = "GradientBoostingClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":l1_ratio", ":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":cv", ":copy_X", ":verbose", ":n_jobs", ":random_state", ":selection"] -":hyperparameter_types" = ["Union{Float64, Array{Float64,1}}", "Float64", "Int64", "Any", "Bool", "Bool", "Int64", "Float64", "Any", "Bool", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Any", "String"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":loss", ":learning_rate", ":n_estimators", ":subsample", ":criterion", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_depth", ":min_impurity_decrease", ":init", ":random_state", ":max_features", ":verbose", ":max_leaf_nodes", ":warm_start", ":presort", ":validation_fraction", ":n_iter_no_change", ":tol"] +":hyperparameter_types" = ["String", "Float64", "Int64", "Float64", "String", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Int64", "Float64", "Any", "Any", "Union{Nothing, Float64, Int64, String}", "Int64", "Union{Nothing, Int64}", "Bool", "Union{Bool, String}", "Float64", "Union{Nothing, Int64}", "Float64"] -[ScikitLearn.RidgeRegressor] +[ScikitLearn.GaussianProcessRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.RidgeRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.GaussianProcessRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "RidgeRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "RidgeRegressor" +":docstring" = "GaussianProcessRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "GaussianProcessRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":copy_X", ":max_iter", ":tol", ":solver", ":random_state"] -":hyperparameter_types" = ["Union{Float64, Array{Float64,1}}", "Bool", "Bool", "Bool", "Int64", "Float64", "String", "Any"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":kernel", ":alpha", ":optimizer", ":n_restarts_optimizer", ":normalize_y", ":copy_X_train", ":random_state"] +":hyperparameter_types" = ["Any", "Union{Float64, AbstractArray}", "Any", "Int64", "Bool", "Bool", "Any"] -[ScikitLearn.LassoLarsCVRegressor] +[ScikitLearn.LarsRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LassoLarsCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LarsRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LassoLarsCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LassoLarsCVRegressor" +":docstring" = "LarsRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LarsRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":fit_intercept", ":verbose", ":max_iter", ":normalize", ":precompute", ":cv", ":max_n_alphas", ":n_jobs", ":eps", ":copy_X", ":positive"] -":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Int64", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Any", "Int64", "Union{Nothing, Int64}", "Float64", "Bool", "Any"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":fit_intercept", ":verbose", ":normalize", ":precompute", ":n_nonzero_coefs", ":eps", ":copy_X", ":fit_path"] +":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Bool"] -[ScikitLearn.LassoLarsICRegressor] +[ScikitLearn.SVMLClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s98,1} where _s98<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" -":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LassoLarsICRegressor" +":package_license" = "unknown" +":load_path" = "MLJModels.ScikitLearn_.SVMLClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LassoLarsICRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LassoLarsICRegressor" +":docstring" = "SVMLClassifier from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "SVMLClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":criterion", ":fit_intercept", ":verbose", ":normalize", ":precompute", ":max_iter", ":eps", ":copy_X", ":positive"] -":hyperparameter_types" = ["String", "Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Any"] +":implemented_methods" = [":fit", ":predict", ":clean!"] +":hyperparameters" = [":C", ":loss", ":dual", ":penalty", ":tol", ":max_iter", ":intercept_scaling", ":random_state"] +":hyperparameter_types" = ["Float64", "String", "Bool", "String", "Float64", "Int64", "Float64", "Any"] + +[ScikitLearn.AdaBoostRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.AdaBoostRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "AdaBoostRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "AdaBoostRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":base_estimator", ":n_estimators", ":learning_rate", ":loss", ":random_state"] +":hyperparameter_types" = ["Any", "Int64", "Float64", "String", "Any"] + +[ScikitLearn.MultiTaskLassoCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.MultiTaskLassoCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "MultiTaskLassoCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "MultiTaskLassoCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":copy_X", ":cv", ":verbose", ":n_jobs", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Int64", "Any", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Any", "String"] + +[ScikitLearn.OrthogonalMatchingPursuitRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.OrthogonalMatchingPursuitRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "OrthogonalMatchingPursuitRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "OrthogonalMatchingPursuitRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_nonzero_coefs", ":tol", ":fit_intercept", ":normalize", ":precompute"] +":hyperparameter_types" = ["Union{Nothing, Int64}", "Union{Nothing, Float64}", "Bool", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}"] + +[ScikitLearn.RidgeCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.RidgeCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "RidgeCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "RidgeCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alphas", ":fit_intercept", ":normalize", ":scoring", ":cv", ":gcv_mode", ":store_cv_values"] +":hyperparameter_types" = ["Any", "Bool", "Bool", "Any", "Any", "Union{Nothing, String}", "Bool"] + +[ScikitLearn.PassiveAggressiveClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.PassiveAggressiveClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Passive aggressive classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load PassiveAggressiveClassifier` to use the model\n→ do `?PassiveAggressiveClassifier` for documentation." +":name" = "PassiveAggressiveClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":C", ":fit_intercept", ":max_iter", ":tol", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":shuffle", ":verbose", ":loss", ":n_jobs", ":random_state", ":warm_start", ":class_weight", ":average"] +":hyperparameter_types" = ["Float64", "Bool", "Int64", "Float64", "Bool", "Float64", "Int64", "Bool", "Int64", "String", "Union{Nothing, Int64}", "Any", "Bool", "Any", "Bool"] + +[ScikitLearn.SVMRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "unknown" +":load_path" = "MLJModels.ScikitLearn_.SVMRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "SVMRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "SVMRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":clean!"] +":hyperparameters" = [":C", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter", ":epsilon"] +":hyperparameter_types" = ["Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64", "Float64"] + +[ScikitLearn.BernoulliNBClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Count)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.BernoulliNBClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Binomial naive bayes classifier. It is suitable for classification with binary features; features will be binarized based on the `binarize` keyword (unless it's `nothing` in which\n case the features are assumed to be binary).\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load BernoulliNBClassifier` to use the model\n→ do `?BernoulliNBClassifier` for documentation." +":name" = "BernoulliNBClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":binarize", ":fit_prior", ":class_prior"] +":hyperparameter_types" = ["Float64", "Union{Nothing, Float64}", "Bool", "Union{Nothing, AbstractArray{T,1} where T}"] + +[ScikitLearn.GaussianNBClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.GaussianNBClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Gaussian naive bayes model.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load GaussianNBClassifier` to use the model\n→ do `?GaussianNBClassifier` for documentation." +":name" = "GaussianNBClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":priors", ":var_smoothing"] +":hyperparameter_types" = ["Union{Nothing, AbstractArray{Float64,1}}", "Float64"] + +[ScikitLearn.ExtraTreesClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.ExtraTreesClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Extra trees classifier, fits a number of randomized decision trees on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load ExtraTreesClassifier` to use the model\n→ do `?ExtraTreesClassifier` for documentation." +":name" = "ExtraTreesClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_estimators", ":criterion", ":max_depth", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_features", ":max_leaf_nodes", ":min_impurity_decrease", ":bootstrap", ":oob_score", ":n_jobs", ":random_state", ":verbose", ":warm_start", ":class_weight"] +":hyperparameter_types" = ["Int64", "String", "Union{Nothing, Int64}", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Union{Nothing, Float64, Int64, String}", "Union{Nothing, Int64}", "Float64", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64", "Bool", "Any"] + +[ScikitLearn.MultiTaskElasticNetCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.MultiTaskElasticNetCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "MultiTaskElasticNetCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "MultiTaskElasticNetCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":l1_ratio", ":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":max_iter", ":tol", ":cv", ":copy_X", ":verbose", ":n_jobs", ":random_state", ":selection"] +":hyperparameter_types" = ["Union{Float64, Array{Float64,1}}", "Float64", "Int64", "Any", "Bool", "Bool", "Int64", "Float64", "Any", "Bool", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Any", "String"] + +[ScikitLearn.LassoLarsCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LassoLarsCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "LassoLarsCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LassoLarsCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":fit_intercept", ":verbose", ":max_iter", ":normalize", ":precompute", ":cv", ":max_n_alphas", ":n_jobs", ":eps", ":copy_X", ":positive"] +":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Int64", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Any", "Int64", "Union{Nothing, Int64}", "Float64", "Bool", "Any"] + +[ScikitLearn.OrthogonalMatchingPursuitCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.OrthogonalMatchingPursuitCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "OrthogonalMatchingPursuitCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "OrthogonalMatchingPursuitCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":copy", ":fit_intercept", ":normalize", ":max_iter", ":cv", ":n_jobs", ":verbose"] +":hyperparameter_types" = ["Bool", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Union{Nothing, Int64}", "Union{Bool, Int64}"] + +[ScikitLearn.AdaBoostClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s569,1} where _s569<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.AdaBoostClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Adaboost ensemble classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load AdaBoostClassifier` to use the model\n→ do `?AdaBoostClassifier` for documentation." +":name" = "AdaBoostClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":base_estimator", ":n_estimators", ":learning_rate", ":algorithm", ":random_state"] +":hyperparameter_types" = ["Any", "Int64", "Float64", "String", "Any"] + +[ScikitLearn.PassiveAggressiveRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.PassiveAggressiveRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "PassiveAggressiveRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "PassiveAggressiveRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":C", ":fit_intercept", ":max_iter", ":tol", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":shuffle", ":verbose", ":loss", ":epsilon", ":random_state", ":warm_start", ":average"] +":hyperparameter_types" = ["Float64", "Bool", "Int64", "Float64", "Bool", "Float64", "Int64", "Bool", "Union{Bool, Int64}", "String", "Float64", "Any", "Bool", "Union{Bool, Int64}"] + +[ScikitLearn.BayesianRidgeRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.BayesianRidgeRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "BayesianRidgeRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "BayesianRidgeRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_iter", ":tol", ":alpha_1", ":alpha_2", ":lambda_1", ":lambda_2", ":compute_score", ":fit_intercept", ":normalize", ":copy_X", ":verbose"] +":hyperparameter_types" = ["Int64", "Float64", "Float64", "Float64", "Float64", "Float64", "Bool", "Bool", "Bool", "Bool", "Bool"] + +[ScikitLearn.RANSACRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.RANSACRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "RANSACRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "RANSACRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":base_estimator", ":min_samples", ":residual_threshold", ":is_data_valid", ":is_model_valid", ":max_trials", ":max_skips", ":stop_n_inliers", ":stop_score", ":stop_probability", ":loss", ":random_state"] +":hyperparameter_types" = ["Any", "Union{Float64, Int64}", "Union{Nothing, Float64}", "Any", "Any", "Int64", "Int64", "Int64", "Float64", "Float64", "Union{Function, String}", "Any"] + +[ScikitLearn.BaggingClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s569,1} where _s569<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.BaggingClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Bagging ensemble classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load BaggingClassifier` to use the model\n→ do `?BaggingClassifier` for documentation." +":name" = "BaggingClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":base_estimator", ":n_estimators", ":max_samples", ":max_features", ":bootstrap", ":bootstrap_features", ":oob_score", ":warm_start", ":n_jobs", ":random_state", ":verbose"] +":hyperparameter_types" = ["Any", "Int64", "Union{Float64, Int64}", "Union{Float64, Int64}", "Bool", "Bool", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64"] + +[ScikitLearn.GaussianProcessClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s569,1} where _s569<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.GaussianProcessClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Gaussian process classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load GaussianProcessClassifier` to use the model\n→ do `?GaussianProcessClassifier` for documentation." +":name" = "GaussianProcessClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":kernel", ":optimizer", ":n_restarts_optimizer", ":copy_X_train", ":random_state", ":max_iter_predict", ":warm_start", ":multi_class"] +":hyperparameter_types" = ["Any", "Any", "Int64", "Bool", "Any", "Int64", "Bool", "String"] + +[ScikitLearn.KNeighborsRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.KNeighborsRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "K-Nearest Neighbors regressor: predicts the response associated with a new point\n by taking an average of the response of the K-nearest points.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load KNeighborsRegressor` to use the model\n→ do `?KNeighborsRegressor` for documentation." +":name" = "KNeighborsRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_neighbors", ":weights", ":algorithm", ":leaf_size", ":p", ":metric", ":metric_params", ":n_jobs"] +":hyperparameter_types" = ["Int64", "Union{Function, String}", "String", "Int64", "Int64", "Any", "Any", "Union{Nothing, Int64}"] + +[ScikitLearn.LassoCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LassoCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "LassoCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LassoCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":eps", ":n_alphas", ":alphas", ":fit_intercept", ":normalize", ":precompute", ":max_iter", ":tol", ":copy_X", ":cv", ":verbose", ":n_jobs", ":positive", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Int64", "Any", "Bool", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Any", "Union{Bool, Int64}", "Union{Nothing, Int64}", "Bool", "Int64", "String"] + +[ScikitLearn.DummyRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.DummyRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "DummyRegressor is a regressor that makes predictions using simple rules.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load DummyRegressor` to use the model\n→ do `?DummyRegressor` for documentation." +":name" = "DummyRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":strategy", ":constant", ":quantile"] +":hyperparameter_types" = ["String", "Any", "Float64"] + +[ScikitLearn.LassoLarsRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LassoLarsRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "LassoLarsRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LassoLarsRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_intercept", ":verbose", ":normalize", ":precompute", ":max_iter", ":eps", ":copy_X", ":fit_path", ":positive"] +":hyperparameter_types" = ["Float64", "Bool", "Union{Bool, Int64}", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Int64", "Float64", "Bool", "Bool", "Any"] + +[ScikitLearn.LarsCVRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LarsCVRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "LarsCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LarsCVRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":fit_intercept", ":verbose", ":max_iter", ":normalize", ":precompute", ":cv", ":max_n_alphas", ":n_jobs", ":eps", ":copy_X"] +":hyperparameter_types" = ["Bool", "Union{Bool, Int64}", "Int64", "Bool", "Union{Bool, String, AbstractArray{T,2} where T}", "Any", "Int64", "Union{Nothing, Int64}", "Float64", "Bool"] + +[ScikitLearn.KNeighborsClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.KNeighborsClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "K-Nearest Neighbors classifier: predicts the class associated with a new point\n by taking a vote over the classes of the K-nearest points.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load KNeighborsClassifier` to use the model\n→ do `?KNeighborsClassifier` for documentation." +":name" = "KNeighborsClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_neighbors", ":weights", ":algorithm", ":leaf_size", ":p", ":metric", ":metric_params", ":n_jobs"] +":hyperparameter_types" = ["Int64", "Union{Function, String}", "String", "Int64", "Int64", "Any", "Any", "Union{Nothing, Int64}"] + +[ScikitLearn.DummyClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.DummyClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "DummyClassifier is a classifier that makes predictions using simple rules.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load DummyClassifier` to use the model\n→ do `?DummyClassifier` for documentation." +":name" = "DummyClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":strategy", ":constant", ":random_state"] +":hyperparameter_types" = ["String", "Any", "Any"] [ScikitLearn.BaggingRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" @@ -461,7 +917,7 @@ ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.BaggingRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.BaggingRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" @@ -470,165 +926,203 @@ ":name" = "BaggingRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":base_estimator", ":n_estimators", ":max_samples", ":max_features", ":bootstrap", ":bootstrap_features", ":oob_score", ":warm_start", ":n_jobs", ":random_state", ":verbose"] ":hyperparameter_types" = ["Any", "Int64", "Union{Float64, Int64}", "Union{Float64, Int64}", "Bool", "Bool", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64"] -[ScikitLearn.ARDRegressor] +[ScikitLearn.SGDClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{_s569,1} where _s569<:ScientificTypes.Finite`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.SGDClassifier" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "Linear classifier with stochastic gradient descent training.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load SGDClassifier` to use the model\n→ do `?SGDClassifier` for documentation." +":name" = "SGDClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":loss", ":penalty", ":alpha", ":l1_ratio", ":fit_intercept", ":max_iter", ":tol", ":shuffle", ":verbose", ":epsilon", ":n_jobs", ":random_state", ":learning_rate", ":eta0", ":power_t", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":class_weight", ":warm_start", ":average"] +":hyperparameter_types" = ["String", "String", "Float64", "Float64", "Bool", "Int64", "Union{Nothing, Float64}", "Bool", "Int64", "Float64", "Union{Nothing, Int64}", "Any", "String", "Float64", "Float64", "Bool", "Float64", "Int64", "Any", "Bool", "Bool"] + +[ScikitLearn.TheilSenRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":is_pure_julia" = "`false`" +":package_name" = "ScikitLearn" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.TheilSenRegressor" +":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" +":package_url" = "https://github.com/cstjean/ScikitLearn.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":docstring" = "TheilSenRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "TheilSenRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":fit_intercept", ":copy_X", ":max_subpopulation", ":n_subsamples", ":max_iter", ":tol", ":random_state", ":n_jobs", ":verbose"] +":hyperparameter_types" = ["Bool", "Bool", "Int64", "Union{Nothing, Int64}", "Int64", "Float64", "Any", "Union{Nothing, Int64}", "Bool"] + +[ScikitLearn.ElasticNetRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.ARDRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.ElasticNetRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "ARDRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "ARDRegressor" +":docstring" = "ElasticNetRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "ElasticNetRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":n_iter", ":tol", ":alpha_1", ":alpha_2", ":lambda_1", ":lambda_2", ":compute_score", ":threshold_lambda", ":fit_intercept", ":normalize", ":copy_X", ":verbose"] -":hyperparameter_types" = ["Int64", "Float64", "Float64", "Float64", "Float64", "Float64", "Bool", "Float64", "Bool", "Bool", "Bool", "Bool"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":l1_ratio", ":fit_intercept", ":normalize", ":precompute", ":max_iter", ":copy_X", ":tol", ":warm_start", ":positive", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Float64", "Bool", "Bool", "Union{Bool, AbstractArray{T,2} where T}", "Int64", "Bool", "Float64", "Bool", "Bool", "Any", "String"] -[ScikitLearn.LassoRegressor] +[ScikitLearn.RandomForestClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.LassoRegressor" +":load_path" = "MLJModels.ScikitLearn_.RandomForestClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "LassoRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "LassoRegressor" +":docstring" = "Random forest classifier.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load RandomForestClassifier` to use the model\n→ do `?RandomForestClassifier` for documentation." +":name" = "RandomForestClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":precompute", ":copy_X", ":max_iter", ":tol", ":warm_start", ":positive", ":random_state", ":selection"] -":hyperparameter_types" = ["Float64", "Bool", "Bool", "Union{Bool, AbstractArray{T,2} where T}", "Bool", "Int64", "Float64", "Bool", "Bool", "Any", "String"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_estimators", ":criterion", ":max_depth", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_features", ":max_leaf_nodes", ":min_impurity_decrease", ":bootstrap", ":oob_score", ":n_jobs", ":random_state", ":verbose", ":warm_start", ":class_weight"] +":hyperparameter_types" = ["Int64", "String", "Union{Nothing, Int64}", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Union{Nothing, Float64, Int64, String}", "Union{Nothing, Int64}", "Float64", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64", "Bool", "Any"] -[ScikitLearn.SVMNuRegressor] +[ScikitLearn.LogisticCVClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`AbstractArray{_s433,1} where _s433<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" -":package_license" = "unknown" -":load_path" = "MLJModels.ScikitLearn_.SVMNuRegressor" +":package_license" = "BSD" +":load_path" = "MLJModels.ScikitLearn_.LogisticCVClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "SVMNuRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "SVMNuRegressor" +":docstring" = "Logistic regression classifier with internal cross-validation.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load LogisticCVClassifier` to use the model\n→ do `?LogisticCVClassifier` for documentation." +":name" = "LogisticCVClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!"] -":hyperparameters" = [":nu", ":C", ":kernel", ":degree", ":gamma", ":coef0", ":shrinking", ":tol", ":cache_size", ":max_iter"] -":hyperparameter_types" = ["Float64", "Float64", "Union{Function, String}", "Int64", "Union{Float64, String}", "Float64", "Bool", "Float64", "Float64", "Int64"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":Cs", ":fit_intercept", ":cv", ":dual", ":penalty", ":scoring", ":solver", ":tol", ":max_iter", ":class_weight", ":n_jobs", ":verbose", ":refit", ":intercept_scaling", ":multi_class", ":random_state", ":l1_ratios"] +":hyperparameter_types" = ["Union{Int64, AbstractArray{Float64,1}}", "Bool", "Any", "Bool", "String", "Any", "String", "Float64", "Int64", "Any", "Union{Nothing, Int64}", "Int64", "Bool", "Float64", "String", "Any", "Union{Nothing, AbstractArray{Float64,1}}"] -[ScikitLearn.OrthogonalMatchingPursuitCVRegressor] +[ScikitLearn.MultiTaskElasticNetRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +":target_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.OrthogonalMatchingPursuitCVRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.MultiTaskElasticNetRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "OrthogonalMatchingPursuitCVRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "OrthogonalMatchingPursuitCVRegressor" +":docstring" = "MultiTaskElasticNetRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "MultiTaskElasticNetRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":copy", ":fit_intercept", ":normalize", ":max_iter", ":cv", ":n_jobs", ":verbose"] -":hyperparameter_types" = ["Bool", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Union{Nothing, Int64}", "Union{Bool, Int64}"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":l1_ratio", ":fit_intercept", ":normalize", ":copy_X", ":max_iter", ":tol", ":warm_start", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Union{Float64, Array{Float64,1}}", "Bool", "Bool", "Bool", "Int64", "Float64", "Bool", "Any", "String"] -[ScikitLearn.PassiveAggressiveRegressor] +[ScikitLearn.ExtraTreesRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.PassiveAggressiveRegressor" +":load_path" = "MLJModels.ScikitLearn_.ExtraTreesRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "PassiveAggressiveRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "PassiveAggressiveRegressor" +":docstring" = "Extra trees regressor, fits a number of randomized decision trees on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting.\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load ExtraTreesRegressor` to use the model\n→ do `?ExtraTreesRegressor` for documentation." +":name" = "ExtraTreesRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":C", ":fit_intercept", ":max_iter", ":tol", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":shuffle", ":verbose", ":loss", ":epsilon", ":random_state", ":warm_start", ":average"] -":hyperparameter_types" = ["Float64", "Bool", "Int64", "Float64", "Bool", "Float64", "Int64", "Bool", "Union{Bool, Int64}", "String", "Float64", "Any", "Bool", "Union{Bool, Int64}"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":n_estimators", ":criterion", ":max_depth", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_features", ":max_leaf_nodes", ":min_impurity_decrease", ":bootstrap", ":oob_score", ":n_jobs", ":random_state", ":verbose", ":warm_start"] +":hyperparameter_types" = ["Int64", "String", "Union{Nothing, Int64}", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Union{Nothing, Float64, Int64, String}", "Union{Nothing, Int64}", "Float64", "Bool", "Bool", "Union{Nothing, Int64}", "Any", "Int64", "Bool"] -[ScikitLearn.GradientBoostingRegressor] +[ScikitLearn.LassoRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.GradientBoostingRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.LassoRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "GradientBoostingRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "GradientBoostingRegressor" +":docstring" = "LassoRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "LassoRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":loss", ":learning_rate", ":n_estimators", ":subsample", ":criterion", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_depth", ":min_impurity_decrease", ":init", ":random_state", ":max_features", ":alpha", ":verbose", ":max_leaf_nodes", ":warm_start", ":presort", ":validation_fraction", ":n_iter_no_change", ":tol"] -":hyperparameter_types" = ["String", "Float64", "Int64", "Float64", "String", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Int64", "Float64", "Any", "Any", "Union{Nothing, Float64, Int64, String}", "Float64", "Int64", "Union{Nothing, Int64}", "Bool", "Union{Bool, String}", "Float64", "Union{Nothing, Int64}", "Float64"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_intercept", ":normalize", ":precompute", ":copy_X", ":max_iter", ":tol", ":warm_start", ":positive", ":random_state", ":selection"] +":hyperparameter_types" = ["Float64", "Bool", "Bool", "Union{Bool, AbstractArray{T,2} where T}", "Bool", "Int64", "Float64", "Bool", "Bool", "Any", "String"] -[ScikitLearn.BayesianRidgeRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +[ScikitLearn.MultinomialNBClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Count)`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.BayesianRidgeRegressor" +":load_path" = "MLJModels.ScikitLearn_.MultinomialNBClassifier" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "BayesianRidgeRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "BayesianRidgeRegressor" +":docstring" = "Multinomial naive bayes classifier. It is suitable for classification with discrete features (e.g. word counts for text classification).\n→ based on [ScikitLearn](https://github.com/cstjean/ScikitLearn.jl)\n→ do `@load MultinomialNBClassifier` to use the model\n→ do `?MultinomialNBClassifier` for documentation." +":name" = "MultinomialNBClassifier" ":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":n_iter", ":tol", ":alpha_1", ":alpha_2", ":lambda_1", ":lambda_2", ":compute_score", ":fit_intercept", ":normalize", ":copy_X", ":verbose"] -":hyperparameter_types" = ["Int64", "Float64", "Float64", "Float64", "Float64", "Float64", "Bool", "Bool", "Bool", "Bool", "Bool"] +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":alpha", ":fit_prior", ":class_prior"] +":hyperparameter_types" = ["Float64", "Bool", "Union{Nothing, AbstractArray{T,1} where T}"] -[ScikitLearn.SGDRegressor] +[ScikitLearn.GradientBoostingRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.SGDRegressor" +":load_path" = "MLJModels.ScikitLearn_.MLJModels.ScikitLearn_.GradientBoostingRegressor" ":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" ":package_url" = "https://github.com/cstjean/ScikitLearn.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "SGDRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "SGDRegressor" +":docstring" = "GradientBoostingRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." +":name" = "GradientBoostingRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":loss", ":penalty", ":alpha", ":l1_ratio", ":fit_intercept", ":max_iter", ":tol", ":shuffle", ":verbose", ":epsilon", ":random_state", ":learning_rate", ":eta0", ":power_t", ":early_stopping", ":validation_fraction", ":n_iter_no_change", ":warm_start", ":average"] -":hyperparameter_types" = ["String", "String", "Float64", "Float64", "Bool", "Int64", "Float64", "Bool", "Union{Bool, Int64}", "Float64", "Any", "String", "Float64", "Float64", "Bool", "Float64", "Int64", "Bool", "Union{Bool, Int64}"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [":loss", ":learning_rate", ":n_estimators", ":subsample", ":criterion", ":min_samples_split", ":min_samples_leaf", ":min_weight_fraction_leaf", ":max_depth", ":min_impurity_decrease", ":init", ":random_state", ":max_features", ":alpha", ":verbose", ":max_leaf_nodes", ":warm_start", ":presort", ":validation_fraction", ":n_iter_no_change", ":tol"] +":hyperparameter_types" = ["String", "Float64", "Int64", "Float64", "String", "Union{Float64, Int64}", "Union{Float64, Int64}", "Float64", "Int64", "Float64", "Any", "Any", "Union{Nothing, Float64, Int64, String}", "Float64", "Int64", "Union{Nothing, Int64}", "Bool", "Union{Bool, String}", "Float64", "Union{Nothing, Int64}", "Float64"] [ScikitLearn.SVMClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s89,1} where _s89<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s98,1} where _s98<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "ScikitLearn" ":package_license" = "unknown" @@ -664,47 +1158,9 @@ ":hyperparameters" = [":C", ":loss", ":fit_intercept", ":dual", ":tol", ":max_iter", ":epsilon"] ":hyperparameter_types" = ["Float64", "String", "Bool", "Bool", "Float64", "Int64", "Float64"] -[ScikitLearn.TheilSenRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" -":is_pure_julia" = "`false`" -":package_name" = "ScikitLearn" -":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.TheilSenRegressor" -":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" -":package_url" = "https://github.com/cstjean/ScikitLearn.jl" -":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "TheilSenRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "TheilSenRegressor" -":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":fit_intercept", ":copy_X", ":max_subpopulation", ":n_subsamples", ":max_iter", ":tol", ":random_state", ":n_jobs", ":verbose"] -":hyperparameter_types" = ["Bool", "Bool", "Int64", "Union{Nothing, Int64}", "Int64", "Float64", "Any", "Union{Nothing, Int64}", "Bool"] - -[ScikitLearn.HuberRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" -":is_pure_julia" = "`false`" -":package_name" = "ScikitLearn" -":package_license" = "BSD" -":load_path" = "MLJModels.ScikitLearn_.HuberRegressor" -":package_uuid" = "3646fa90-6ef7-5e7e-9f22-8aca16db6324" -":package_url" = "https://github.com/cstjean/ScikitLearn.jl" -":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "HuberRegressor from ScikitLearn.jl.\n[Documentation](https://github.com/cstjean/ScikitLearn.jl)." -":name" = "HuberRegressor" -":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] -":hyperparameters" = [":epsilon", ":max_iter", ":alpha", ":warm_start", ":fit_intercept", ":tol"] -":hyperparameter_types" = ["Float64", "Int64", "Float64", "Bool", "Bool", "Float64"] - [NaiveBayes.GaussianNBClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s658,1} where _s658<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "NaiveBayes" ":package_license" = "unknown" @@ -723,7 +1179,7 @@ [NaiveBayes.MultinomialNBClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Count)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s658,1} where _s658<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "NaiveBayes" ":package_license" = "unknown" @@ -755,7 +1211,7 @@ ":is_supervised" = "`false`" ":implemented_methods" = [":fit", ":clean!", ":fitted_params", ":transform"] ":hyperparameters" = [":k", ":alg", ":fun", ":do_whiten", ":maxiter", ":tol", ":mean", ":winit"] -":hyperparameter_types" = ["Int64", "Union{Nothing, Symbol}", "Union{Nothing, ICAGDeriv{T}} where T<:Real", "Union{Nothing, Bool}", "Union{Nothing, Int64}", "Union{Nothing, Real}", "Union{Nothing, Array{Float64,1}, Real}", "Union{Nothing, Array{Float64,2}}"] +":hyperparameter_types" = ["Int64", "Union{Nothing, Symbol}", "Union{Nothing, MultivariateStats.ICAGDeriv{T}} where T<:Real", "Union{Nothing, Bool}", "Union{Nothing, Int64}", "Union{Nothing, Real}", "Union{Nothing, Array{Float64,1}, Real}", "Union{Nothing, Array{Float64,2}}"] [MultivariateStats.RidgeRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" @@ -772,7 +1228,7 @@ ":name" = "RidgeRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict", ":clean!", ":fitted_params"] +":implemented_methods" = [":fit", ":predict", ":fitted_params"] ":hyperparameters" = [":lambda"] ":hyperparameter_types" = ["Float64"] @@ -812,7 +1268,7 @@ [DecisionTree.DecisionTreeRegressor] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Continuous`" +":target_scitype" = "`AbstractArray{_s658,1} where _s658<:ScientificTypes.Continuous`" ":is_pure_julia" = "`true`" ":package_name" = "DecisionTree" ":package_license" = "unknown" @@ -831,7 +1287,7 @@ [DecisionTree.DecisionTreeClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s658,1} where _s658<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "DecisionTree" ":package_license" = "unknown" @@ -861,7 +1317,7 @@ ":docstring" = "K-Means algorithm: find K centroids corresponding to K clusters in the data.\n\n→ based on [Clustering](https://github.com/JuliaStats/Clustering.jl)\n→ do `@load KMeans` to use the model\n→ do `?KMeans` for documentation." ":name" = "KMeans" ":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":show", ":fitted_params", ":transform"] +":implemented_methods" = [":fit", ":predict", ":fitted_params", ":transform"] ":hyperparameters" = [":k", ":metric"] ":hyperparameter_types" = ["Int64", "Distances.SemiMetric"] @@ -878,7 +1334,7 @@ ":docstring" = "K-Medoids algorithm: find K centroids corresponding to K clusters in the data.\nUnlike K-Means, the centroids are found among data points themselves.\"\n\n→ based on [Clustering](https://github.com/JuliaStats/Clustering.jl)\n→ do `@load KMedoids` to use the model\n→ do `?KMedoids` for documentation." ":name" = "KMedoids" ":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":show", ":fitted_params", ":transform"] +":implemented_methods" = [":fit", ":predict", ":fitted_params", ":transform"] ":hyperparameters" = [":k", ":metric"] ":hyperparameter_types" = ["Int64", "Distances.SemiMetric"] @@ -922,7 +1378,7 @@ [XGBoost.XGBoostClassifier] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "XGBoost" ":package_license" = "unknown" @@ -939,36 +1395,55 @@ ":hyperparameters" = [":num_round", ":booster", ":disable_default_eval_metric", ":eta", ":gamma", ":max_depth", ":min_child_weight", ":max_delta_step", ":subsample", ":colsample_bytree", ":colsample_bylevel", ":lambda", ":alpha", ":tree_method", ":sketch_eps", ":scale_pos_weight", ":updater", ":refresh_leaf", ":process_type", ":grow_policy", ":max_leaves", ":max_bin", ":predictor", ":sample_type", ":normalize_type", ":rate_drop", ":one_drop", ":skip_drop", ":feature_selector", ":top_k", ":tweedie_variance_power", ":objective", ":base_score", ":eval_metric", ":seed"] ":hyperparameter_types" = ["Int64", "String", "Int64", "Float64", "Float64", "Int64", "Float64", "Float64", "Float64", "Float64", "Float64", "Float64", "Float64", "String", "Float64", "Float64", "String", "Union{Bool, Int64}", "String", "String", "Int64", "Int64", "String", "String", "String", "Float64", "Any", "Float64", "String", "Int64", "Float64", "Any", "Float64", "Any", "Int64"] -[MLJModels.UnivariateBoxCoxTransformer] -":input_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" -":output_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +[MLJModels.ConstantClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":target_scitype" = "`AbstractArray{_s13,1} where _s13<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" ":package_license" = "unknown" -":load_path" = "MLJModels.UnivariateBoxCoxTransformer" +":load_path" = "MLJModels.ConstantClassifier" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "UnivariateBoxCoxTransformer from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "UnivariateBoxCoxTransformer" +":supports_weights" = "`false`" +":docstring" = "ConstantClassifier from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." +":name" = "ConstantClassifier" +":is_supervised" = "`true`" +":prediction_type" = ":probabilistic" +":implemented_methods" = [":fit", ":predict", ":fitted_params"] +":hyperparameters" = [] +":hyperparameter_types" = [] + +[MLJModels.Standardizer] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":is_pure_julia" = "`true`" +":package_name" = "MLJModels" +":package_license" = "MIT" +":load_path" = "MLJModels.Standardizer" +":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" +":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" +":is_wrapper" = "`false`" +":docstring" = "Standardize (whiten) data." +":name" = "Standardizer" ":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":inverse_transform", ":inverse_transform", ":transform"] -":hyperparameters" = [":n", ":shift"] -":hyperparameter_types" = ["Int64", "Bool"] +":implemented_methods" = [":fit", ":fitted_params", ":transform"] +":hyperparameters" = [":features"] +":hyperparameter_types" = ["Array{Symbol,1}"] -[MLJModels.DeterministicConstantRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +[MLJModels.DeterministicConstantClassifier] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":target_scitype" = "`AbstractArray{_s13,1} where _s13<:ScientificTypes.Finite`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" ":package_license" = "unknown" -":load_path" = "MLJModels.DeterministicConstantRegressor" -":package_uuid" = "https://github.com/alan-turing-institute/MLJModels.jl" +":load_path" = "MLJModels.DeterministicConstantClassifier" +":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" ":supports_weights" = "`false`" -":docstring" = "DeterministicConstantRegressor from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "DeterministicConstantRegressor" +":docstring" = "DeterministicConstantClassifier from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." +":name" = "DeterministicConstantClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":deterministic" ":implemented_methods" = [":fit", ":predict"] @@ -976,60 +1451,58 @@ ":hyperparameter_types" = [] [MLJModels.OneHotEncoder] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" +":package_license" = "MIT" ":load_path" = "MLJModels.OneHotEncoder" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "OneHotEncoder from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." +":docstring" = "One-Hot-Encoding of the data." ":name" = "OneHotEncoder" ":is_supervised" = "`false`" ":implemented_methods" = [":fit", ":transform"] ":hyperparameters" = [":features", ":drop_last", ":ordered_factor"] ":hyperparameter_types" = ["Array{Symbol,1}", "Bool", "Bool"] -[MLJModels.ConstantClassifier] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":target_scitype" = "`AbstractArray{_s18,1} where _s18<:ScientificTypes.Finite`" +[MLJModels.StaticTransformer] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" -":load_path" = "MLJModels.ConstantClassifier" +":package_license" = "MIT" +":load_path" = "MLJModels.StaticTransformer" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "ConstantClassifier from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "ConstantClassifier" -":is_supervised" = "`true`" -":prediction_type" = ":probabilistic" -":implemented_methods" = [":fit", ":predict", ":fitted_params"] -":hyperparameters" = [] -":hyperparameter_types" = [] +":docstring" = "Applies a given data transformation `f` (either a function or callable)." +":name" = "StaticTransformer" +":is_supervised" = "`false`" +":implemented_methods" = [":fit", ":fitted_params", ":transform"] +":hyperparameters" = [":f"] +":hyperparameter_types" = ["Any"] -[MLJModels.Standardizer] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" +[MLJModels.UnivariateBoxCoxTransformer] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" -":load_path" = "MLJModels.Standardizer" +":package_license" = "MIT" +":load_path" = "MLJModels.UnivariateBoxCoxTransformer" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "Standardizer from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "Standardizer" +":docstring" = "Box-Cox transformation of univariate data." +":name" = "UnivariateBoxCoxTransformer" ":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":fitted_params", ":transform"] -":hyperparameters" = [":features"] -":hyperparameter_types" = ["Array{Symbol,1}"] +":implemented_methods" = [":fit", ":fitted_params", ":inverse_transform", ":inverse_transform", ":transform"] +":hyperparameters" = [":n", ":shift"] +":hyperparameter_types" = ["Int64", "Bool"] [MLJModels.ConstantRegressor] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" ":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" @@ -1048,72 +1521,72 @@ ":hyperparameter_types" = ["Type{D} where D"] [MLJModels.FeatureSelector] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" +":package_license" = "MIT" ":load_path" = "MLJModels.FeatureSelector" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "FeatureSelector from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." +":docstring" = "Filter features (columns) of a table by name." ":name" = "FeatureSelector" ":is_supervised" = "`false`" ":implemented_methods" = [":fit", ":fitted_params", ":transform"] ":hyperparameters" = [":features"] ":hyperparameter_types" = ["Array{Symbol,1}"] -[MLJModels.StaticTransformer] -":input_scitype" = "`ScientificTypes.Unknown`" -":output_scitype" = "`ScientificTypes.Unknown`" +[MLJModels.FillImputer] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" -":load_path" = "MLJModels.StaticTransformer" +":package_license" = "MIT" +":load_path" = "MLJModels.FillImputer" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "StaticTransformer from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "StaticTransformer" +":docstring" = "Imputes missing data with a fixed value computed on the non-missing values. The way to compute the filler depends on the scitype of the data and can be specified." +":name" = "FillImputer" ":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":fitted_params", ":transform"] -":hyperparameters" = [":f"] -":hyperparameter_types" = ["Any"] +":implemented_methods" = [":fit", ":transform"] +":hyperparameters" = [":features", ":continuous_fill", ":count_fill", ":finite_fill"] +":hyperparameter_types" = ["Array{Symbol,1}", "Function", "Function", "Function"] -[MLJModels.UnivariateStandardizer] -":input_scitype" = "`AbstractArray{_s17,1} where _s17<:Union{Continuous, Count}`" -":output_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" +[MLJModels.DeterministicConstantRegressor] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, ScientificTypes.Found})`" +":target_scitype" = "`AbstractArray{ScientificTypes.Continuous,1}`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" ":package_license" = "unknown" -":load_path" = "MLJModels.UnivariateStandardizer" -":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" +":load_path" = "MLJModels.DeterministicConstantRegressor" +":package_uuid" = "https://github.com/alan-turing-institute/MLJModels.jl" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":docstring" = "UnivariateStandardizer from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "UnivariateStandardizer" -":is_supervised" = "`false`" -":implemented_methods" = [":fit", ":inverse_transform", ":inverse_transform", ":transform", ":transform"] +":supports_weights" = "`false`" +":docstring" = "DeterministicConstantRegressor from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." +":name" = "DeterministicConstantRegressor" +":is_supervised" = "`true`" +":prediction_type" = ":deterministic" +":implemented_methods" = [":fit", ":predict"] ":hyperparameters" = [] ":hyperparameter_types" = [] -[MLJModels.DeterministicConstantClassifier] -":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:Union{Missing, Found})`" -":target_scitype" = "`AbstractArray{_s18,1} where _s18<:ScientificTypes.Finite`" +[MLJModels.UnivariateStandardizer] +":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Infinite)`" +":output_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" ":is_pure_julia" = "`true`" ":package_name" = "MLJModels" -":package_license" = "unknown" -":load_path" = "MLJModels.DeterministicConstantClassifier" +":package_license" = "MIT" +":load_path" = "MLJModels.UnivariateStandardizer" ":package_uuid" = "d491faf4-2d78-11e9-2867-c94bc002c0b7" ":package_url" = "https://github.com/alan-turing-institute/MLJModels.jl" ":is_wrapper" = "`false`" -":supports_weights" = "`false`" -":docstring" = "DeterministicConstantClassifier from MLJModels.jl.\n[Documentation](https://github.com/alan-turing-institute/MLJModels.jl)." -":name" = "DeterministicConstantClassifier" -":is_supervised" = "`true`" -":prediction_type" = ":deterministic" -":implemented_methods" = [":fit", ":predict"] +":docstring" = "Standardize (whiten) univariate data." +":name" = "UnivariateStandardizer" +":is_supervised" = "`false`" +":implemented_methods" = [":fit", ":inverse_transform", ":inverse_transform", ":transform", ":transform"] ":hyperparameters" = [] ":hyperparameter_types" = [] @@ -1138,7 +1611,7 @@ [LIBSVM.LinearSVC] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "LIBSVM" ":package_license" = "unknown" @@ -1176,7 +1649,7 @@ [LIBSVM.NuSVC] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "LIBSVM" ":package_license" = "unknown" @@ -1195,7 +1668,7 @@ [LIBSVM.SVC] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":target_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite`" +":target_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite`" ":is_pure_julia" = "`false`" ":package_name" = "LIBSVM" ":package_license" = "unknown" @@ -1214,7 +1687,7 @@ [LIBSVM.OneClassSVM] ":input_scitype" = "`ScientificTypes.Table{_s13} where _s13<:(AbstractArray{_s12,1} where _s12<:ScientificTypes.Continuous)`" -":output_scitype" = "`AbstractArray{_s491,1} where _s491<:ScientificTypes.Finite{2}`" +":output_scitype" = "`AbstractArray{_s659,1} where _s659<:ScientificTypes.Finite{2}`" ":is_pure_julia" = "`false`" ":package_name" = "LIBSVM" ":package_license" = "unknown" @@ -1244,7 +1717,7 @@ ":name" = "LinearBinaryClassifier" ":is_supervised" = "`true`" ":prediction_type" = ":probabilistic" -":implemented_methods" = [":fit", ":predict", ":show", ":predict_mean"] +":implemented_methods" = [":show", ":fit", ":predict", ":predict_mean"] ":hyperparameters" = [":fit_intercept", ":link"] ":hyperparameter_types" = ["Bool", "GLM.Link01"] @@ -1263,7 +1736,7 @@ ":name" = "LinearCountRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":probabilistic" -":implemented_methods" = [":fit", ":predict", ":show"] +":implemented_methods" = [":show", ":fit", ":predict"] ":hyperparameters" = [":fit_intercept", ":distribution", ":link"] ":hyperparameter_types" = ["Bool", "Distributions.Distribution", "GLM.Link"] @@ -1282,6 +1755,6 @@ ":name" = "LinearRegressor" ":is_supervised" = "`true`" ":prediction_type" = ":probabilistic" -":implemented_methods" = [":fit", ":predict", ":show"] +":implemented_methods" = [":show", ":fit", ":predict"] ":hyperparameters" = [":fit_intercept", ":allowrankdeficient"] ":hyperparameter_types" = ["Bool", "Bool"] diff --git a/src/registry/Models.toml b/src/registry/Models.toml index 1ebfb49a..b6968140 100644 --- a/src/registry/Models.toml +++ b/src/registry/Models.toml @@ -1,11 +1,11 @@ NearestNeighbors = ["KNNClassifier", "KNNRegressor"] -ScikitLearn = ["SVMNuClassifier", "GaussianProcessRegressor", "LassoCVRegressor", "LarsRegressor", "ElasticNetRegressor", "RandomForestRegressor", "ElasticNetCVRegressor", "LassoLarsRegressor", "SVMLClassifier", "AdaBoostRegressor", "LarsCVRegressor", "MultiTaskElasticNetRegressor", "LinearRegressor", "MultiTaskLassoCVRegressor", "MultiTaskLassoRegressor", "OrthogonalMatchingPursuitRegressor", "RidgeCVRegressor", "SVMRegressor", "MultiTaskElasticNetCVRegressor", "RidgeRegressor", "LassoLarsCVRegressor", "LassoLarsICRegressor", "BaggingRegressor", "ARDRegressor", "LassoRegressor", "SVMNuRegressor", "OrthogonalMatchingPursuitCVRegressor", "PassiveAggressiveRegressor", "GradientBoostingRegressor", "BayesianRidgeRegressor", "SGDRegressor", "SVMClassifier", "SVMLRegressor", "TheilSenRegressor", "HuberRegressor"] +ScikitLearn = ["ProbabilisticSGDClassifier", "RidgeCVClassifier", "LogisticClassifier", "RandomForestRegressor", "ElasticNetCVRegressor", "PerceptronClassifier", "MultiTaskLassoRegressor", "LinearRegressor", "RidgeRegressor", "LassoLarsICRegressor", "ARDRegressor", "SVMNuRegressor", "RidgeClassifier", "SGDRegressor", "ComplementNBClassifier", "HuberRegressor", "SVMNuClassifier", "GradientBoostingClassifier", "GaussianProcessRegressor", "LarsRegressor", "SVMLClassifier", "AdaBoostRegressor", "MultiTaskLassoCVRegressor", "OrthogonalMatchingPursuitRegressor", "RidgeCVRegressor", "PassiveAggressiveClassifier", "SVMRegressor", "BernoulliNBClassifier", "GaussianNBClassifier", "ExtraTreesClassifier", "MultiTaskElasticNetCVRegressor", "LassoLarsCVRegressor", "OrthogonalMatchingPursuitCVRegressor", "AdaBoostClassifier", "PassiveAggressiveRegressor", "BayesianRidgeRegressor", "RANSACRegressor", "BaggingClassifier", "GaussianProcessClassifier", "KNeighborsRegressor", "LassoCVRegressor", "DummyRegressor", "LassoLarsRegressor", "LarsCVRegressor", "KNeighborsClassifier", "DummyClassifier", "BaggingRegressor", "SGDClassifier", "TheilSenRegressor", "ElasticNetRegressor", "RandomForestClassifier", "LogisticCVClassifier", "MultiTaskElasticNetRegressor", "ExtraTreesRegressor", "LassoRegressor", "MultinomialNBClassifier", "GradientBoostingRegressor", "SVMClassifier", "SVMLRegressor"] ScientificTypes = [] NaiveBayes = ["GaussianNBClassifier", "MultinomialNBClassifier"] MultivariateStats = ["ICA", "RidgeRegressor", "KernelPCA", "PCA"] DecisionTree = ["DecisionTreeRegressor", "DecisionTreeClassifier"] Clustering = ["KMeans", "KMedoids"] XGBoost = ["XGBoostCount", "XGBoostRegressor", "XGBoostClassifier"] -MLJModels = ["UnivariateBoxCoxTransformer", "DeterministicConstantRegressor", "OneHotEncoder", "ConstantClassifier", "Standardizer", "ConstantRegressor", "FeatureSelector", "StaticTransformer", "UnivariateStandardizer", "DeterministicConstantClassifier"] +MLJModels = ["ConstantClassifier", "Standardizer", "DeterministicConstantClassifier", "OneHotEncoder", "StaticTransformer", "UnivariateBoxCoxTransformer", "ConstantRegressor", "FeatureSelector", "FillImputer", "DeterministicConstantRegressor", "UnivariateStandardizer"] LIBSVM = ["EpsilonSVR", "LinearSVC", "NuSVR", "NuSVC", "SVC", "OneClassSVM"] GLM = ["LinearBinaryClassifier", "LinearCountRegressor", "LinearRegressor"] diff --git a/test/Constant.jl b/test/Constant.jl index 47334696..5b8793b6 100644 --- a/test/Constant.jl +++ b/test/Constant.jl @@ -1,12 +1,7 @@ module TestConstant -# using Revise -using Test -using MLJModels -import MLJBase -using CategoricalArrays -import Distributions -import Distributions.pdf +using Test, MLJBase, MLJModels +using Distributions ## REGRESSOR @@ -25,7 +20,7 @@ d=Distributions.Normal(1.5, 0.5) @test MLJBase.predict_mean(model, fitresult, X) ≈ fill(1.5, 10) MLJBase.info_dict(model) -MLJBase.info_dict(MLJModels.DeterministicConstantRegressor) +MLJBase.info_dict(DeterministicConstantRegressor) ## CLASSIFIER @@ -35,12 +30,12 @@ y = categorical(yraw) model = ConstantClassifier() fitresult, cache, report = MLJBase.fit(model, 1, X, y) -d = MLJBase.UnivariateFinite([y[1], y[2], y[4]], [0.5, 0.25, 0.25]) +d = MLJBase.UnivariateFinite([y[1], y[2], y[4]], [0.5, 0.25, 0.25]) @test all([pdf(d, c) ≈ pdf(fitresult, c) for c in MLJBase.classes(d)]) yhat = MLJBase.predict_mode(model, fitresult, X) @test MLJBase.classes(yhat[1]) == MLJBase.classes(y[1]) -@test yhat[5] == y[1] +@test yhat[5] == y[1] @test length(yhat) == 10 yhat = MLJBase.predict(model, fitresult, X) @@ -48,7 +43,7 @@ yhat1 = yhat[1] @test all([pdf(yhat1, c) ≈ pdf(d, c) for c in MLJBase.classes(d)]) MLJBase.info_dict(model) -MLJBase.info_dict(MLJModels.DeterministicConstantClassifier) +MLJBase.info_dict(DeterministicConstantClassifier) end # module true diff --git a/test/ScikitLearn/linear-classifiers.jl b/test/ScikitLearn/linear-classifiers.jl index 326e02ac..de776bd0 100644 --- a/test/ScikitLearn/linear-classifiers.jl +++ b/test/ScikitLearn/linear-classifiers.jl @@ -71,6 +71,7 @@ end # NOTE: SGD classifier with few points is tricky which is why we remove the dummy test @testset "SGDClf" begin + ((ScikitLearn.Skcore).pyimport("numpy.random")).seed(0) m, f = simple_test_classif(SGDClassifier(), Xc2, yc2; nodummy=true) fp = fitted_params(m, f) @test keys(fp) == (:coef, :intercept) @@ -78,7 +79,7 @@ end @test infos[:input_scitype] == MLJBase.Table(MLJBase.Continuous) @test infos[:target_scitype] == AbstractVector{<:MLJBase.Finite} @test !isempty(infos[:docstring]) - + ((ScikitLearn.Skcore).pyimport("numpy.random")).seed(0) m, f = simple_test_classif_prob(ProbabilisticSGDClassifier(), Xc2, yc2; nodummy=true) fp = fitted_params(m, f) @test keys(fp) == (:coef, :intercept) diff --git a/test/Transformers.jl b/test/Transformers.jl index dc0b2284..48629eb4 100644 --- a/test/Transformers.jl +++ b/test/Transformers.jl @@ -1,17 +1,16 @@ module TestTransformer -using Test -using MLJModels, MLJBase, ScientificTypes -using Statistics, CategoricalArrays, Tables, StatsBase, Random +using Test, MLJBase, MLJModels +using Tables, CategoricalArrays, Random #### STATIC TRANSFORMER #### -t = MLJModels.StaticTransformer(f=log) -f, = MLJBase.fit(t, 1, nothing) +t = StaticTransformer(f=log) +f, = fit(t, 1, nothing) @test transform(t, f, 5) ≈ log(5) -infos = MLJBase.info_dict(t) -@test infos[:input_scitype] == MLJBase.Table(Scientific) +infos = info_dict(t) +@test infos[:input_scitype] == MLJBase.Table(MLJBase.Scientific) @test infos[:output_scitype] == MLJBase.Table(Scientific) #### FEATURE SELECTOR #### @@ -24,7 +23,7 @@ X = (Zn = rand(N), namesX = Tables.schema(X).names |> collect selector = FeatureSelector() -f, = MLJBase.fit(selector, 1, X) +f, = fit(selector, 1, X) @test f == namesX @@ -33,24 +32,25 @@ Xt = transform(selector, f, selectrows(X, 1:2)) @test Set(Tables.schema(Xt).names) == Set(namesX) @test length(Xt.Zn) == 2 -selector = FeatureSelector([:Zn, :Crim]) -f, = MLJBase.fit(selector, 1, X) +selector = FeatureSelector(features=[:Zn, :Crim]) +f, = fit(selector, 1, X) -@test transform(selector, f, selectrows(X, 1:2)) == selectcols(selectrows(X, 1:2), [:Zn, :Crim]) +@test transform(selector, f, selectrows(X, 1:2)) == + selectcols(selectrows(X, 1:2), [:Zn, :Crim]) -infos = MLJBase.info_dict(selector) +infos = info_dict(selector) @test infos[:input_scitype] == MLJBase.Table(Scientific) @test infos[:output_scitype] == MLJBase.Table(Scientific) #### UNIVARIATE STANDARDIZER #### stand = UnivariateStandardizer() -f, = MLJBase.fit(stand, 1, [0, 2, 4]) +f, = fit(stand, 1, [0, 2, 4]) @test round.(Int, transform(stand, f, [0,4,8])) == [-1.0,1.0,3.0] @test round.(Int, inverse_transform(stand, f, [-1, 1, 3])) == [0, 4, 8] -infos = MLJBase.info_dict(stand) +infos = info_dict(stand) @test infos[:package_name] == "MLJModels" @test infos[:name] == "UnivariateStandardizer" @test infos[:input_scitype] == AbstractVector{<:Infinite} @@ -74,7 +74,7 @@ x4 = [round(Int, x) for x in X.x1stFlrSF] X = (x1=x1, x2=X[2], x3=X[3], x4=x4, x5=X[5]) stand = Standardizer() -f, = MLJBase.fit(stand, 1, X) +f, = fit(stand, 1, X) Xnew = transform(stand, f, X) @test Xnew[1] == X[1] @@ -84,11 +84,11 @@ Xnew = transform(stand, f, X) @test std(Xnew[5]) ≈ 1.0 stand.features = [:x1, :x5] -f, = MLJBase.fit(stand, 1, X) +f, = fit(stand, 1, X) Xnew = transform(stand, f, X) -f, = MLJBase.fit(stand, 1, X) +f, = fit(stand, 1, X) -@test issubset(Set(keys(f)), Set(MLJBase.schema(X).names[[5,]])) +@test issubset(Set(keys(f)), Set(Tables.schema(X).names[[5,]])) Xt = transform(stand, f, X) @@ -112,12 +112,11 @@ infos = info_dict(stand) Random.seed!(1551) v = abs.(randn(1000)) v = v .- minimum(v) -@test 0.9 ≤ MLJModels.Transformers.normality(v) ≤ 1.1 t = UnivariateBoxCoxTransformer(shift=true) -f, = MLJBase.fit(t, 2, v) +f, = fit(t, 2, v) -@test sum(abs.(v - MLJBase.inverse_transform(t, f, MLJBase.transform(t, f, v)))) <= 5000*eps() +@test sum(abs.(v - inverse_transform(t, f, transform(t, f, v)))) <= 5000*eps() infos = info_dict(t) @@ -135,7 +134,7 @@ X = (name = categorical(["Ben", "John", "Mary", "John"], ordered=true), age = [23, 23, 14, 23]) t = OneHotEncoder() -f, = @test_logs((:info, r"Spawning 3"), (:info, r"Spawning 3"), MLJBase.fit(t, 1, X)) +f, = @test_logs((:info, r"Spawning 3"), (:info, r"Spawning 3"), fit(t, 1, X)) Xt = transform(t, f, X) @@ -151,7 +150,7 @@ Xt = transform(t, f, X) # test that *entire* pool of categoricals is used in fit, including # unseen levels: f, = @test_logs((:info, r"Spawning 3"), (:info, r"Spawning 3"), - MLJBase.fit(t, 1, MLJBase.selectrows(X,1:2))) + fit(t, 1, MLJBase.selectrows(X,1:2))) Xtsmall = transform(t, f, X) @test Xt == Xtsmall @@ -162,10 +161,10 @@ Xtsmall = transform(t, f, X) # test exclusion of ordered factors: t = OneHotEncoder(ordered_factor=false) -f, = MLJBase.fit(t, 1, X) +f, = fit(t, 1, X) Xt = transform(t, f, X) -@test :name in MLJBase.schema(Xt).names -@test :favourite_number__5 in MLJBase.schema(Xt).names +@test :name in Tables.schema(Xt).names +@test :favourite_number__5 in Tables.schema(Xt).names # test that one may not add new columns: X = (name = categorical(["Ben", "John", "Mary", "John"], ordered=true), diff --git a/test/parameters_utils.jl b/test/parameters_utils.jl deleted file mode 100644 index 78f70585..00000000 --- a/test/parameters_utils.jl +++ /dev/null @@ -1,93 +0,0 @@ -module TestMacroMLJ - -using MLJBase, Test, Distances -using MLJModels: @mlj_model - -# No type, no default -@mlj_model mutable struct A1 - a -end -a = A1() -@test ismissing(a.a) -a.a = 5 -@test a.a == 5 - -# No type, with default -@mlj_model mutable struct A1b - a = 5 -end -a = A1b() -@test a.a == 5 -a.a = "hello" -@test a.a == "hello" - -# If a type is given but no default value is given, then the macro tries to fill -# a default value; either 0 if it's a Number type, or an empty string and otherwise fails. -@mlj_model mutable struct A1c - a::Int -end -a = A1c() -@test a.a == 0 -a = A1c(a=7) -@test a.a == 7 -@test_throws InexactError A1c(a=5.3) -@test_throws MethodError A1c(a="hello") - -# Type is given and default is given -@mlj_model mutable struct A1d - a::Int = 5 -end -a = A1d() -@test a.a == 5 -a = A1d(a=7) -@test a.a == 7 - -# No type is given but a default and constraint -@mlj_model mutable struct A1e - a = 5::(_ > 0) -end -a = A1e() -@test a.a == 5 -a = A1e(a=7) -@test a.a == 7 -@test @test_logs (:warn, "Constraint `model.a > 0` failed; using default: a=5.") A1e(a=-1).a==5 -a = A1e(a=7.5) -@test a.a == 7.5 - -# Type is given with default and constraint -@mlj_model mutable struct A1f - a::Int = 5::(_ > 0) -end -a = A1f() -@test a.a == 5 -a = A1f(a=7) -@test a.a == 7 -@test_throws InexactError A1f(a=7.5) -@test @test_logs (:warn, "Constraint `model.a > 0` failed; using default: a=5.") A1f(a=-1).a==5 - -abstract type FooBar end -@mlj_model mutable struct B1a <: FooBar - a::Symbol = :auto::(_ in (:auto, :semi)) -end -b = B1a() -@test b.a == :auto -b = B1a(a=:semi) -@test b.a == :semi -@test @test_logs (:warn, "Constraint `model.a in (:auto, :semi)` failed; using default: a=:auto.") B1a(a=:autos).a == :auto -@test_throws MethodError B1a(b="blah") - -# == dependence on other types -@mlj_model mutable struct B1b - a::SemiMetric = Euclidean()::(_ isa Metric) -end -@test B1b().a isa Euclidean -@test @test_logs (:warn, "Constraint `model.a isa Metric` failed; using default: a=Euclidean().") B1b(a=BhattacharyyaDist()).a isa Euclidean - -@mlj_model mutable struct B1c - a::SemiMetric = Euclidean() -end -@test B1c().a isa Euclidean - - -end -true diff --git a/test/runtests.jl b/test/runtests.jl index fb701275..d26fe3c3 100755 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,35 +6,24 @@ using Test @testset "metadata" begin - @testset "reading and extracting model metadata" begin @test include("metadata.jl") end - @testset "model search" begin @test include("model_search.jl") end - @testset "loading model code" begin @test include("loading.jl") end - end @testset "built-in models" begin - @testset "Constant" begin @test include("Constant.jl") end - @testset "Transformers" begin @test include("Transformers.jl") end - -end - -@testset "@mlj_model macro" begin - include("parameters_utils.jl") end @testset "MultivariateStats " begin