Skip to content
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

Minor MLJ docstring fixes #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ablaom
Copy link
Contributor

@ablaom ablaom commented Nov 18, 2024

I've left the descriptions for input X unchanged, despite the incongruence with input_scitype, as noted here.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.00%. Comparing base (d3f0ed5) to head (c53c2f3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #133   +/-   ##
=======================================
  Coverage   97.00%   97.00%           
=======================================
  Files          22       22           
  Lines         734      734           
=======================================
  Hits          712      712           
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pasq-cat
Copy link
Member

pasq-cat commented Nov 18, 2024

@ablam you are right with the scytipe error. i guess i must change

    input_scitype=Union{
        AbstractMatrix{<:Union{MLJBase.Finite,MLJBase.Continuous}}, # matrix with mixed types
        MLJBase.Table(MLJBase.Finite, MLJBase.Continuous), # table with mixed types

in

    input_scitype=Union{
        AbstractMatrix{<:Union{MLJBase.Finite,MLJBase.Infinite}}, # matrix with mixed types
        MLJBase.Table(MLJBase.Finite, MLJBase.Infinite), # table with mixed types

right? afterall i don't see why it shouldn't work with Count types

@pasq-cat
Copy link
Member

pasq-cat commented Nov 18, 2024

@ablaom regarding μ₀ and P₀ , i can change the structs but i will have to keep them in the Laplacereduc.laplace objects like this one for regression but also for classification

    la = LaplaceRedux.Laplace(
        copied_model;
        likelihood=:regression,
        subset_of_weights=m.subset_of_weights,
        subnetwork_indices=m.subnetwork_indices,
        hessian_structure=m.hessian_structure,
        backend=m.backend,
        σ=m.σ,
        μ₀=m.mu0,
        P₀=m.p0
    )

is this enough?

@ablaom
Copy link
Contributor Author

ablaom commented Nov 18, 2024

your input_scitype correction looks consistent with the doc-string now. as to whether Count will actually work, I expect so, but that is your responsibility to check 😉

re the notation change: my suggestion is to modify only the keyword constructor to look something like LaplaceRegressor(; m0=1.0, μ₀=m0, ....) = LaplaceRegressor(..., μ₀, ....) but only do this if you are also prepared, in documentation, to always write m0 instead of μ₀ because otherwise this option is not discoverable. The alternative is to completely rename, which would simplify the code but also break it.

i am only making a suggestion, and I expect @pat-alt will want to chime in here before you proceed with a change. you may want to kick the can and raise in a new issue tagged "next breaking release" or something .

@pasq-cat
Copy link
Member

i am only making a suggestion, and I expect @pat-alt will want to chime in here before you proceed with a change. you may want to kick the can and raise in a new issue tagged "next breaking release" or something.

ok the scitype isn't a problem, it's just another type of feature. I ill fix the input_scitype. Regarding the other problem,
i asked him via ms teams, i guess he will look as soon as he can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants