SossMLJ.jl
SossMLJ.jl copied to clipboard
Reorganization of the predictor types
Currently, we only have a single predictor type:
struct SossMLJPredictor{M} <: Distributions.Distribution{MixedVariate, MixedSupport}
model::M
post
pred
args
end
I think we'll need a slightly more complicated set of types.
For predict_joint
, we will continue to use SossMLJPredictor
. But for predict
, I think we'll need different types.
For predict
with a classification model, we'll need to use MLJBase.UnivariateFinite
for compliance with the MLJ model interface.
For predict
with a regression model, it's not immediately obvious to me what we should return.
Yeah, I think you're right. How about this:
- We keep
SossMLJPredictor
as the "general" case, which is probably also good for regression - Add
SossMLJMarginalPredictor
for marginals. I think users shouldn't have to type this, we can have amarginalize
function to build it -
MLJSossClassifier
for classification in the MLJ sense, since that needs this special treatment
Oh, and we'll need type parameters on these, I just left it open to get a quick start
For consistency, can we name the last one SossMLJClassifier
?
Oops, yes that's what I meant :)
The parts of this that are blocking 0.1.0 are implemented in #91.
There is still additional work to be done, but it doesn't block 0.1.0.
I'm now second-guessing whether we really need a SossMLJClassifier
type. Let's see how it goes first
I'm going to mark this as potentially breaking, since it will probably result in some changes to the return types of public functions.