metamorph.ml icon indicating copy to clipboard operation
metamorph.ml copied to clipboard

pass column names to `:fastmath/ols` models

Open daslu opened this issue 1 year ago • 7 comments

fastmath.ml.regression/lm supports a :names option that controls the names of the coefficients when the model is printed. https://generateme.github.io/fastmath/clay/ml.html#lm

In the metamorph.ml context, our data originate from a dataset, so we may use the column names for that.

daslu avatar Oct 23 '24 20:10 daslu

@daslu did you mention this as one of the changes you wanted to do, if /when we would add the model to tablecloth itself ?

(which I am not sure, we should do, as the model is available here)

behrica avatar Nov 17 '24 10:11 behrica

Sorry for missing this message earlier.

Yes, I think we should have a Tablecloth function to take care of that eventually.

daslu avatar Dec 04 '24 16:12 daslu

are you refering to pass :names as written here: https://generateme.github.io/fastmath/clay/ml.html#lm

If so, then fixing #27 will fix this as well.

behrica avatar Dec 04 '24 18:12 behrica

Yes

daslu avatar Dec 04 '24 18:12 daslu

Yes, but I am proposing this will happen automatically -- the dataset column names will be passed as :names by default.

daslu avatar Dec 04 '24 18:12 daslu

@daslu I don't understand what you mean with this change request. Maybe you can do an PR ?

behrica avatar Feb 02 '25 14:02 behrica

Thanks, good idea, I will do a PR.

(I mean something like we did in Tablemath: https://github.com/scicloj/tablemath/blob/a667be6/src/scicloj/tablemath/v1/api.clj#L242 The option map to lm can automatically receive the column names of the dataset.)

daslu avatar Feb 02 '25 14:02 daslu