ircv3-ideas
ircv3-ideas copied to clipboard
Server favicon of sorts
Perhaps a nice idea for a server to provide a favicon for the client to display somewhere appropriate like the server window icon or cough like discord down the left hand side =]]] cough
Welcome back @tomaszkacprzak ! $\epsilon$ is a vector, so I'm not sure how $1[\epsilon > 0]$ is to be interpreted, when multiplying $\Vert \epsilon \Vert^2$?
Is it not something like:
$L (\epsilon, \alpha) = 2 · \sum_i ( \alpha + (1 − 2\alpha) · 1[\epsilon_i > 0] ) \epsilon_i^2$
Can you give the implementation a try through a PR, like you did for positive group lasso ? Thanks a lot
Also I believe it should be $1 / 2$ instead of $2$ to get ride of the coefficient that pops up after differentiation
$L (\epsilon, \alpha) = \frac{1}{2} \sum_i ( \alpha + (1 − 2\alpha) · 1[\epsilon_i > 0] ) \epsilon_i^2$
Hi @mathurinm thank you for a fast reply. Indeed there was a mistake in my equation, the one you gave should be right. I can try a PR. I could start with a Quadratic and modify all the functions. Do you expect any difficulties for optimisation?
Yes that sounds like a plan, and no I don't foresee any difficulty!
@tomaszkacprzak could you also please let us know in which context you use skglm, and what it brings you compared to alternatives?
Hi @tomaszkacprzak, any news on this?
Hi @mathurinm i recently gone through your discussion approach is understandable. I can try a PR
Hi @mathurinm @tomaszkacprzak!
I've successfully implemented the DoubleQuadratic datafit as discussed.
Implementation highlights:
- Asymmetric quadratic loss:
L(ε,α) = (1/2n) * Σᵢ (2α + 2(1-2α) * 1[εᵢ>0]) * εᵢ² - When α=0.5, gives identical results to standard Quadratic (verified )
- Support for both dense and sparse matrices
- Full compatibility with existing penalties (L1, MCP, etc.)
- Comprehensive test coverage
Verification:
- α=0.5 matches Quadratic exactly (loss and gradient)
- Integration with AndersonCD solver works
- Asymmetric behavior confirmed for α≠0.5
- All tests pass
I'll submit the PR shortly. Thanks for the clear mathematical specification!
Hi @mathurinm @Badr-MOUFAD @tomaszkacprzak 👋
Just wanted to follow up on this PR adding the DoubleQuadratic datafit discussed in issue #272.
The implementation is complete, all tests are green , and the behavior matches Quadratic when α=0.5 while supporting asymmetric loss otherwise.
Would you be able to take a look when you get a chance?
Happy to adjust anything if needed. Thanks a lot for your time and review 🙏