From 1edb593a83c4478810681d63070e777c475a4716 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 3 Oct 2023 08:01:55 +1300 Subject: [PATCH 1/6] rm measures from docs --- README.md | 2 +- docs/make.jl | 1 - docs/src/measures.md | 25 ------------------------- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 docs/src/measures.md diff --git a/README.md b/README.md index 8e9fc1e55..a506c5bab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## MLJBase +## MLJBase Repository for developers that provides core functionality for the [MLJ](https://github.com/alan-turing-institute/MLJ.jl) machine diff --git a/docs/make.jl b/docs/make.jl index 9c2ac9ef9..4397b4f92 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -8,7 +8,6 @@ makedocs(; format=Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), pages=[ "Home" => "index.md", - "Measures" => "measures.md", "Resampling" => "resampling.md", "Composition" => "composition.md", "Datasets" => "datasets.md", diff --git a/docs/src/measures.md b/docs/src/measures.md deleted file mode 100644 index 62fadeb31..000000000 --- a/docs/src/measures.md +++ /dev/null @@ -1,25 +0,0 @@ -# Measures - -## Helper functions -```@autodocs -Modules = [MLJBase] -Pages = ["measures/registry.jl", "measures/measures.jl"] -``` - -## Continuous loss functions -```@autodocs -Modules = [MLJBase] -Pages = ["measures/continuous.jl"] -``` - -## Confusion matrix -```@autodocs -Modules = [MLJBase] -Pages = ["measures/confusion_matrix.jl"] -``` - -## Finite loss functions -```@autodocs -Modules = [MLJBase] -Pages = ["measures/finite.jl"] -``` From 96256f78cf43e02220a6de303a1311cbdefcbcf2 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 3 Oct 2023 08:42:49 +1300 Subject: [PATCH 2/6] update codecov config --- .github/codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000..dda9ad064 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,5 @@ +coverage: + status: + project: + default: + threshold: 0.5% \ No newline at end of file From f0b6b8e15e65d71ca71e4c9fa51a590e4a485384 Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Sun, 29 Oct 2023 01:09:01 +0000 Subject: [PATCH 3/6] CompatHelper: add new compat entry for Statistics at version 1, (keep existing compat) --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 8986bd864..995a8e1aa 100644 --- a/Project.toml +++ b/Project.toml @@ -57,6 +57,7 @@ ScientificTypes = "3" StatisticalMeasures = "0.1.1" StatisticalMeasuresBase = "0.1.1" StatisticalTraits = "3.2" +Statistics = "1" StatsBase = "0.32, 0.33, 0.34" Tables = "0.2, 1.0" julia = "1.6" From d993e388bcdf680a61d6d7914c52f92999f1c063 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Mon, 8 Jan 2024 13:50:29 +1300 Subject: [PATCH 4/6] docstring comment --- src/machines.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/machines.jl b/src/machines.jl index 2023f4819..a1a3afc51 100644 --- a/src/machines.jl +++ b/src/machines.jl @@ -218,8 +218,9 @@ function check(model::Model, scitype_check_level, args...) return is_okay end - # we use `elscitype` here instead of `scitype` because the data is - # wrapped in source nodes: + # Sometimes (X, ) is a table, when X is a table, which leads to scitype((X,)) = + # Table(...) where `Tuple{scitype(X)}` is wanted. Also, we use `elscitype` here + # instead of `scitype` because the data is wrapped in source nodes; S = Tuple{elscitype.(args)...} if !(S <: F) is_okay = false From ad0352559fd7f5612302e63f973d0274fca2bbe1 Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Mon, 8 Jan 2024 01:35:36 +0000 Subject: [PATCH 5/6] Forward `Machine.fitresult` to RecipesBase --- Project.toml | 2 ++ src/MLJBase.jl | 5 +++++ src/plots.jl | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 src/plots.jl diff --git a/Project.toml b/Project.toml index 995a8e1aa..9ac34ecd0 100644 --- a/Project.toml +++ b/Project.toml @@ -22,6 +22,7 @@ Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -52,6 +53,7 @@ OrderedCollections = "1.1" Parameters = "0.12" PrettyTables = "1, 2" ProgressMeter = "1.7.1" +RecipesBase = "1" Reexport = "1.2" ScientificTypes = "3" StatisticalMeasures = "0.1.1" diff --git a/src/MLJBase.jl b/src/MLJBase.jl index f0a19e938..bde58cc4e 100644 --- a/src/MLJBase.jl +++ b/src/MLJBase.jl @@ -91,6 +91,9 @@ const Dist = Distributions # Measures import StatisticalMeasuresBase +# Plots +using RecipesBase: RecipesBase, @recipe + # from Standard Library: using Statistics, LinearAlgebra, Random, InteractiveUtils @@ -172,6 +175,8 @@ include("data/datasets_synthetic.jl") include("default_measures.jl") +include("plots.jl") + include("composition/models/stacking.jl") const EXTENDED_ABSTRACT_MODEL_TYPES = vcat( diff --git a/src/plots.jl b/src/plots.jl new file mode 100644 index 000000000..f555fbe5b --- /dev/null +++ b/src/plots.jl @@ -0,0 +1,5 @@ +@recipe function default_machine_plot(mach::Machine) + # Allow downstream packages to define plotting recipes + # for their own machine types. + mach.fitresult +end From 5d8224ea3d0bd27d26243df9104f659e5b57abd1 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Wed, 10 Jan 2024 08:30:02 +1300 Subject: [PATCH 6/6] bump 1.1.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9ac34ecd0..8875a41d2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MLJBase" uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d" authors = ["Anthony D. Blaom "] -version = "1.0.1" +version = "1.1.0" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"