You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only algorithm we offer is LBFGSB - it will be great to support other algorithms. And with the changes in #13, it should now be possible to handle default algorithms in an elegant and extensible way.
where default_algorithm(X, r, loss) applies some heuristics to choose a default algorithm (e.g., ALS for LeastSquaresLoss, etc), and we add some algorithm types that have fields holding their parameters (with default values chosen):
LBFGSB
ALS
Note: thinking it's a good idea to remove the type restriction on loss to prevent duplication in LossFunctionsExt - losses from LossFunctions.jl will simply get routed through this signature too. Means we'll need to move that dispatch logic into _gcp, which is probably more sensible anyways (separates the user-friendly signature that has defaults from the dispatching logic).[UPDATE 10/12/2023: addressed in #22]
A couple more ideas:
Could have LossFunctionsExt simply introduce a wrapper type LossFunctionsLoss <: AbstractLoss that wraps loss functions from LossFunctionsExt which could unify things even more.
Could also consider explicitly enumerating the actual concrete LossFunctions.jl types supported in LossFunctionsExt. The current code defines the domains on abstract types, which seems reasonable and applies for current losses but may not apply for all subtypes in the future. Needs some more thought.
The text was updated successfully, but these errors were encountered:
Currently, the only algorithm we offer is LBFGSB - it will be great to support other algorithms. And with the changes in #13, it should now be possible to handle default algorithms in an elegant and extensible way.
Idea change definition of
gcp
to be:where
default_algorithm(X, r, loss)
applies some heuristics to choose a default algorithm (e.g., ALS forLeastSquaresLoss
, etc), and we add some algorithm types that have fields holding their parameters (with default values chosen):LBFGSB
ALS
Note: thinking it's a good idea to remove the type restriction on[UPDATE 10/12/2023: addressed in #22]loss
to prevent duplication inLossFunctionsExt
- losses from LossFunctions.jl will simply get routed through this signature too. Means we'll need to move that dispatch logic into_gcp
, which is probably more sensible anyways (separates the user-friendly signature that has defaults from the dispatching logic).A couple more ideas:
LossFunctionsExt
simply introduce a wrapper typeLossFunctionsLoss <: AbstractLoss
that wraps loss functions fromLossFunctionsExt
which could unify things even more.LossFunctionsExt
. The current code defines the domains on abstract types, which seems reasonable and applies for current losses but may not apply for all subtypes in the future. Needs some more thought.The text was updated successfully, but these errors were encountered: