diff --git a/Project.toml b/Project.toml index 995a8e1a..9ac34ecd 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 f0a19e93..bde58cc4 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 00000000..f555fbe5 --- /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