Git Product home page Git Product logo

Comments (5)

sylvaticus avatar sylvaticus commented on June 6, 2024 1

Should have been fixed in master:

using Pkg
pkg"activate --temp"
pkg"add MLJBase, MLJModels, BetaML#master"
using MLJBase, MLJModels
import BetaML: GaussianMixtureRegressor, MultitargetGaussianMixtureRegressor

model = GaussianMixtureRegressor()
X, y = make_regression();
mach = machine(model, X, y) |> fit!
yhat = predict(mach, X);
l2(yhat, y) # ok

y2=hcat(y,y)
model2 = MultitargetGaussianMixtureRegressor()
mach2 = machine(model2, X, y2) |> fit!
yhat2 = predict(mach2, X);
l2(yhat2, y2) # ok

from betaml.jl.

sylvaticus avatar sylvaticus commented on June 6, 2024

Thanks, going check it...

from betaml.jl.

sylvaticus avatar sylvaticus commented on June 6, 2024

Hello, BetaMLGMMRegressor (that I have now renamed GaussianMixtureRegressor) is not predicting a row vector, but a matrix with a single column, as it can predict multiple targets, so currently always return matrices.
What do you suggest I change:

  • the model registration metadata
  • I automatically remove one dimension when y is a single variable
    ?

from betaml.jl.

ablaom avatar ablaom commented on June 6, 2024

For better or worse, the MLJ standard for returning multi-target predictions is to return a table. (This may not be actually documented but it is adopted in several places) . So there is a case distinction here. This means we generally have separate model types for regular and multitarget predictors. Which is not too bad, as it is not the main use-case.

I suppose you could have a single model that always predicts a table, but I think this will be totally unexpected for users. So, while I realize this is a pain, I think the best plan is a separate MultitargetGaussianMixtureRegressor for the MLJ interface.

a row vector, but a matrix with a single column

Same thing, in my vernacular 😉

from betaml.jl.

ablaom avatar ablaom commented on June 6, 2024

And if y2 is a table instead of a matrix, is that allowed? Elswhere, y2 and yhat2 would both be tables. See eg https://github.com/JuliaAI/NearestNeighborModels.jl/blob/f4362b3967dc1e4874cd9875f428c4d13316b761/src/models.jl#L312

Sorry this isn't documented anywhere.

from betaml.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.