Skip to content

Commit 6e3e285

Browse files
authored
Merge pull request #951 from MilesCranmer/plotting
Forward `(::Machine).fitresult` to RecipesBase
2 parents 081fec8 + ad03525 commit 6e3e285

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Project.toml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
2222
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
2323
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
2424
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
25+
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
2526
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2627
ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81"
2728
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
@@ -52,6 +53,7 @@ OrderedCollections = "1.1"
5253
Parameters = "0.12"
5354
PrettyTables = "1, 2"
5455
ProgressMeter = "1.7.1"
56+
RecipesBase = "1"
5557
Reexport = "1.2"
5658
ScientificTypes = "3"
5759
StatisticalMeasures = "0.1.1"

src/MLJBase.jl

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ const Dist = Distributions
9191
# Measures
9292
import StatisticalMeasuresBase
9393

94+
# Plots
95+
using RecipesBase: RecipesBase, @recipe
96+
9497
# from Standard Library:
9598
using Statistics, LinearAlgebra, Random, InteractiveUtils
9699

@@ -172,6 +175,8 @@ include("data/datasets_synthetic.jl")
172175

173176
include("default_measures.jl")
174177

178+
include("plots.jl")
179+
175180
include("composition/models/stacking.jl")
176181

177182
const EXTENDED_ABSTRACT_MODEL_TYPES = vcat(

src/plots.jl

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@recipe function default_machine_plot(mach::Machine)
2+
# Allow downstream packages to define plotting recipes
3+
# for their own machine types.
4+
mach.fitresult
5+
end

0 commit comments

Comments
 (0)