JuliaML / ObjectiveFunctions.jl

Generic definitions of objective functions using abstractions from LearnBase
Other
5 stars 3 forks source link

Laundry List of Losses and Penalties #1

Open ahwillia opened 8 years ago

ahwillia commented 8 years ago

In our other comically long conversation (https://github.com/JuliaML/Roadmap.jl/issues/8#issuecomment-229838082), we came up with the following types:

abstract Cost
    abstract Loss <: Cost
        abstract SupervisedLoss <: Loss
        abstract UnsupervisedLoss <: Loss
    abstract Penalty <: Cost
    abstract DiscountedFutureRewards <: Cost

IMPORTANT: everybody should edit this comment to check off Costs as they are done and also to add new Costs

This post a work-in-progress...

Supervised Losses: (implemented in Losses.jl)

Unsupervised Losses:

Penalties: (implemented in ObjectiveFunctions perhaps?)

Constrants: These are actually penalties. The penalty is "infinitely bad" when the constraint is violated.

Combinations of Penalties: I would like an easy/automatic way of combining instead of defining by hand, but this may not be feasible.

Discounted Future Rewards:

@tbreloff -- halp!

Some sources:

Evizero commented 8 years ago

An example for a unsupervised loss is the density level detection loss (DLD) L(x, t) = 1_{(-\infty, 0)} ((g(x) - p) sign t)), where t = f(x) and g is the unknown density. Obviously this loss cannot be computed because g is unknown, but that's what surrogate losses are for. Interestingly a lot of surrogate losses for DLD are supervised losses as you observed.

However, I think even then practically speaking the types would be different to implement, no? x is in general a matrix here, while in the supervised case y wouldn't be, or in the cases where y would be (multivariate regression) the matrix would be interpreted differently I think.

All in all I am not sure about this as I haven't spend a lot of time dwelling on unsupervised losses. I simply wanted to keep the option open