-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PartitionedLS model to the registry #552
Comments
Great to have this contribution, thanks. A cursory look at the code suggests this looks good. Can you please bring the the hyperparmeter struct docstring up to spec? @ablaom To do:
|
Hi,
I've tried to follow the spec, but I was not able to use the $(MLJModelInterface.doc_header(...)) call. For some reason if I include it precompiling the package fails asserting that MLJModelInterface is not defined (regardless to importing or using it). To overcome the problem I updated the docstring for PartLS to match the required format. I left the docstring I was trying to use at the end of the file, with the only modification that $(MLJModelInterface... is commented out. If you have any suggestion about how to fix the problem I will be glad to incorporate it. You can find the updated files in commit bcafc93. |
This has been fixed in commit 6b9a3f7. |
Thanks @boborbt for that. Would you consider updating the docstring as indicated above? |
Okay, I see this is done, many thanks! Please see my proposed update, ml-unito/PartitionedLS.jl#7. |
As I mentioned above, I tried my best, but was not able to use the $(MLJModelInterface.doc_header(...)) call. It breaks compilation and I could not figure out why -- the error message says it cannot find MMI (which is defined as an alias for MLJModelInterface). As a workaround I reported the docstring as a "normal" docstring for the struct. If you have any hint about to overcome the compilation problem I am more than willing to incorporate the fix. Thanks. |
Sorry, I completely missed this. I don't think we need to worry about including the Now you have made Float64 generic, I suggest we amend the docstring as follows:
is replaced with
Then I think we're ready to roll. |
I just updated the documentation as suggested (see commit b1ca7ba9). By the way, thanks for all the suggestions you gave me. It was worth registering to MLJ just for the free code review it comes with it 😉. |
Any news about this issue? I believe everything needed is in place now. |
Sorry, I posted an comment but must have forgotten to click "comment". I'm waiting for you to tag a new release to make the doc strings live. The registration process grabs the doc strings from the latest tagged release to include in the registry metadata (which is searchable from MLJ without loading model-providing code) and appears here also. Please ping me when this is ready. |
Fixed the issue you opened yesterday. |
I would like to add support for PrecompileTools, but to do so I would need to add a workload including fitting the whole model which implies using MLJBase.machine. This makes MLJBase a dependency of the package, which was frown upon in one of your previous messages. What do you suggest? Do I drop support of PrecompileTools? Do I add MLJBase to the dependencies? Do you see any way to add it as a non-hard depenedency? If you need to have a look, you find the candidate code in branch |
I suggest you only add a precompile load for your "native" API. If your native API depends on MLJBase to work, then we ought to be able to fix that. For example, if you use There is a known issue preventing precompilation loads for MLJBase having much impact: JuliaAI/MLJBase.jl#900 . This has to do with the way we made MLJBase an "optional" dependency for model-providing packages before Julia introduced weak dependencies and package extensions (and recompilation workloads) to do this. And we can't "modernise" without breaking MLJModelInterface, which we really don't want to do right now. I think this issue would carry over to your case: If you make MLJBase a hard dependency, then you won't actually realize much benefit. I'm no expert on this issue, but this is my general impression. |
Hi, I would like to have PartitionedLS added to the registry.
A PartitionedLS model solves a constrained least squared problem where the features are partitioned by the user into groups. The solution is constrained to have all features in a group contributing in the same "direction" (i.e., positively or negatively) to the solution. Also, the solution is given in terms of two kind of variables:$\beta$ variables specify how much and in which direction each group contributes to the solution, $\alpha$ variables specify how much each feature contributes to each group.
The implementation is here. It supports MLJ interface since version 1.0.0.
The code supporting the MLJ interface can be found here.
More information about the technique can be found in this paper (currently submitted to the Machine Learning Journal after a major revision).
The text was updated successfully, but these errors were encountered: