Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward (::Machine).fitresult to RecipesBase #951

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 5 additions & 0 deletions src/MLJBase.jl
Original file line number Diff line number Diff line change
@@ -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(
5 changes: 5 additions & 0 deletions src/plots.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@recipe function default_machine_plot(mach::Machine)

Check warning on line 1 in src/plots.jl

Codecov / codecov/patch

src/plots.jl#L1

Added line #L1 was not covered by tests
# Allow downstream packages to define plotting recipes
# for their own machine types.
mach.fitresult

Check warning on line 4 in src/plots.jl

Codecov / codecov/patch

src/plots.jl#L4

Added line #L4 was not covered by tests
end