Skip to content

Commit be21a46

Browse files
committed
Merge branch 'algorithm' into predict
2 parents 988eddc + e6ecacf commit be21a46

File tree

3 files changed

+14
-163
lines changed

3 files changed

+14
-163
lines changed

docs/src/algorithm_traits.jl

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/algorithm_traits.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Every LearnAPI method that is not a trait and which is specifically implemented
6969
return value is a tuple of symbols from this list: $(join(FUNCTIONS, ", ")). To regenerate
7070
this list, do `LearnAPI.functions()`.
7171
72-
See also [`LearnAPI.Model`](@ref).
72+
See also [`LearnAPI.Algorithm`](@ref).
7373
7474
"""
7575
functions(::Type) = ()
@@ -100,13 +100,13 @@ Here's a sample implementation for a supervised model where predictions are ordi
100100
values of the target variable:
101101
102102
```julia
103-
@trait MyNewModel predict_proxy = LearnAPI.TrueTarget()
103+
@trait MyNewAlgorithm predict_proxy = LearnAPI.TrueTarget()
104104
```
105105
106106
which is shorthand for
107107
108108
```julia
109-
LearnAPI.predict_proxy(::Type{<:MyNewModelType}) = LearnAPI.TrueTarget()
109+
LearnAPI.predict_proxy(::Type{<:MyNewAlgorithmType}) = LearnAPI.TrueTarget()
110110
```
111111
112112
"""
@@ -132,13 +132,13 @@ The possible return values for this trait are: `LearnAPI.JointSampleable()`,
132132
Here's a sample implementation:
133133
134134
```julia
135-
@trait MyNewModel predict_joint_proxy = LearnAPI.JointDistribution()
135+
@trait MyNewAlgorithmType predict_joint_proxy = LearnAPI.JointDistribution()
136136
```
137137
138138
which is shorthand for
139139
140140
```julia
141-
LearnAPI.predict_joint_proxy(::Type{<:MyNewModelType}) = LearnAPI.JointDistribution()
141+
LearnAPI.predict_joint_proxy(::Type{<:MyNewAlgorithmType}) = LearnAPI.JointDistribution()
142142
```
143143
144144
"""

src/algorithms.jl

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
abstract type MLType end
1+
abstract type LearnAPIType end
22

33
"""
4-
LearnAPI.Model
4+
LearnAPI.Algorithm
55
6-
An optional abstract type for models implementing LearnAPI.jl.
6+
An optional abstract type for algorithms implementing LearnAPI.jl.
77
8-
If `typeof(m) <: LearnAPI.Model`, then `m` is guaranteed to be a model in the LearnAPI
9-
sense.
8+
If `typeof(alg) <: LearnAPI.Algorithm`, then `alg` is guaranteed to be an ML/statistical
9+
algorithm in the strict LearnAPI sense.
1010
11-
# New model implementations
11+
# New implementations
1212
13-
While not a formal requirement, model types implementing the LearnAPI interface are
14-
encouraged to subtype `LearnAPI.Model`, unless it is disruptive to do so.
13+
While not a formal requirement, algorithm types implementing the LearnAPI.jl are
14+
encouraged to subtype `LearnAPI.Algorithm`, unless it is disruptive to do so.
1515
1616
See also [`LearnAPI.functions`](@ref).
1717
1818
"""
19-
abstract type Model <: MLType end
20-
21-
# See src/model_traits.jl for the `methods` trait definition.
19+
abstract type Algorithm <: LearnAPIType end

0 commit comments

Comments
 (0)