Skip to content

Commit bd443db

Browse files
authored
Merge pull request #63 from DilumAluthge/dpa/joint-probabilistic-subtype-of-probabilistic
Add `JointProbabilistic` as a subtype of `Probabilistic`, and add generic function stub for `predict_joint`
2 parents b26f014 + 345ed0f commit bd443db

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/MLJModelInterface.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export LightInterface, FullInterface
1414
# MLJ model hierarchy
1515
export MLJType, Model, Supervised, Unsupervised,
1616
Probabilistic, Deterministic, Interval, Static,
17-
UnivariateFinite
17+
UnivariateFinite,
18+
JointProbabilistic
1819

1920
# parameter_inspection:
2021
export params
@@ -88,6 +89,8 @@ abstract type Interval <: Supervised end
8889

8990
abstract type Static <: Unsupervised end
9091

92+
abstract type JointProbabilistic <: Probabilistic end
93+
9194
# ------------------------------------------------------------------------
9295
# includes
9396

src/model_api.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ probabilistic supervised models may overload `predict_median`
4444
"""
4545
function predict_median end
4646

47+
"""
48+
`JointProbabilistic` supervised models MUST overload `predict_joint`.
49+
50+
`Probabilistic` supervised models MAY overload `predict_joint`.
51+
"""
52+
function predict_joint end
53+
4754
"""
4855
unsupervised methods must implement the `transform` operation
4956
"""

0 commit comments

Comments
 (0)