ModelParameters.jl
ModelParameters.jl copied to clipboard
Facilities to update Table
update!(ruleset,df) is fantastic.
Maybe some facilities to update df would be nice (maybe already implemented but I'm not aware of).
Using DataFrame.jl, I do:
df[(df.component .== MyRule) .& (df.fieldname .== :myParam), :val] .= NewValue
No, nothing implemented for that, I haven't actually used this for dataframes much. My main goals were use with Optim and Interact, and simple Tables.jl load/save of parameters. I kind of stalled on adding anything once those were working well. So ideas are appreciated.
It also might not be the best structure for updating specific things like that because components/fieldnames can be duplicates. I guess I would update a model directly with Accessors.jl and make a new dataframe from it if I wanted to change something specific like that, in any case that the differences weren't just stored in a CSV.
This workflow wasn't really my intention for it I guess - it was more just verbatim load/save of the data. But I'm also not a data scientist so I don't really think about these things much or very clearly.
Ok fine.
components/fieldnames can be duplicates
Indeed, that's why I considered using both colum. But maybe you can have combination of components*fieldnames duplicated ... but it would mean that it's the same model called several time.
Component x field name can be duplicated. A simple example is a collection of objects of the same type. I have this problem at the moment, unfortunately.
Could you elaborate on the interface that you are looking for with update!(ruleset, df)?