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

Vacancy: Request for new collaborators #323

Open
tBuLi opened this issue Jan 18, 2021 · 8 comments
Open

Vacancy: Request for new collaborators #323

tBuLi opened this issue Jan 18, 2021 · 8 comments

Comments

@tBuLi
Copy link
Owner

tBuLi commented Jan 18, 2021

I think it would be good for this project to invite some extra hands on deck. Both @pckroon's and my own agenda or filling up with more and more with other responsibilities, meaning we have less time to actively manage this project.

But I wouldn't want it to stop just because of that. So we are hereby inviting other volunteers to become a collaborator to this project. This can be anything from making PRs to open issues, or even people to help merge PR's etc.

Because github does not allow PM's, let me know if you would like to help by replying to this issue.

@tBuLi tBuLi changed the title Request for new collaborators Vacancy: Request for new collaborators Jan 18, 2021
@Jhsmit
Copy link
Collaborator

Jhsmit commented Mar 26, 2021

I wouldn't mind doing some light maintenance such as keeping (conda) releases up-to-date etc.
I'm not too familiar with the code so I'm able to judge for all PRs if they can be merged, but I think there are some PRs ready to merge at the moment, such as #321 or #327.
@pckroon Are you at the moment taking care of this? I can go through the PRs and remove some of my old and outdates ones to clean things up.

Also, it looks like the test arent passing, we should probably have a look at fixing those.
I've moved some of my projects from Travis to GitHub actions, I could do the same for symfit since travis-ci.org is about to shut down and move to travis-ci.com.

@pckroon
Copy link
Collaborator

pckroon commented Mar 26, 2021

I can do code reviews, those don't take me too much time in general.
The failing tests are due to a change in string formatting in sympy, I think (in the interactive fit module). If anyone can find time to fix that, that would be great.
It would be great if you could migrate us to GH actions (or any other CI provider).

@pckroon
Copy link
Collaborator

pckroon commented Mar 26, 2021

As a second note, I can't review my own PRs :)
So should I find time to actually do something productive, would you be available for review duty?

@MaximeLucasSky
Copy link

This is an awesome project. From what I can see it is still suffering from lack of contributors ?
I would be glad to help. I'm not too sure of where to begin though. Do you have any suggestions?

@pckroon
Copy link
Collaborator

pckroon commented Oct 10, 2023

Hi Maxime,

Unfortunately, yes. I for one would be very happy with your involvement. Although I have time for code review, I don't really have the time to do a lot of programming myself.

Is there any aspect that interests you in particular? Any feature you're missing?

For example, the tests could use some love (read overhaul); there's a strange separation between normal and ODE models; there's probably a few new minimizers in Scipy that could/should be wrapped; I'd like Objectives to be symbolic rather than hardcoded; and there's probably a couple open issues that would improve the user experience...

Peter

@MaximeLucasSky
Copy link

One thing that was slightly painful was that I couldn't find a nice way to interface with sympy's matrices : something along the line of {Y : A * X + B} (but maybe I missed it). Is this more or less what the "Indexed Variables" is about ?
The Lagrange multipliers thing also looks interesting. I read in the PR that it may behave better in some cases. Do you also expect that it may lead to performance improvements by transforming an constrained fit to an unconstrained fit ?

I'll take a look at some of your suggestions, which feel like a good way to familiarize myself with the codebase.

@pckroon
Copy link
Collaborator

pckroon commented Oct 10, 2023

@tBuLi will know about those specific trains of thought :)

And yes, I do expect langrange multipliers to improve performance for constrained fits, since constrained optimizations are hard.

@Jhsmit
Copy link
Collaborator

Jhsmit commented Oct 10, 2023

My main issue is that I have a lot of difficulty understanding what's going on in symfit's internals, party because of (dark) magic and project structure, and party because there is a requirement for models to be analytical.

I think relaxing that constraint (ie determination of jacobians analytically for models) could help a lot in simplifying things, using numerical approaches by default and only solving analytically in special cases.

For example, I wanted to add expectation-maximization likelihood fitting to symfit, because I needed it for a project, but it was easier for me to start from scratch rather then plug into existing symfit infrastructure.

I have now implemented this in slimfit 2.0. The feature set there is way less extensive, and the expectation-maximization is a bit of a mess, but there is a gain in flexibility as symbols can be any shape and thus you can use numpy broadcasting, or any other numpy ufunc, including slicing in your models.

For example, you can define models like this:

from slimfit.operations import MatMul
from sympy import symbols, Matrix
from slimfit.np_funcs import logaddexp2

import numpy as np


x, a, b, c = symbols('x a b c')

m = Matrix([[
    b*c,
    2*b**c,
    5,
]])

expr = MatMul(logaddexp2(a, m), x)[:, ::5]
expr
>>> MatMul(np.logaddexp2(a, Matrix([[b*c, 2*b**c, 5]]), ), x)[:, ::5]

You can the immediately call this kind of expression if you give it data with compatible shapes:

data = {'x': np.random.rand(3, 100)}
params = {'a': np.random.rand(1, 3), 'b': 3., 'c': 2.}

expr(**data, **params).shape
>>>(1, 20)

Fitting also works, if you define parameters with these shapes, but its not very clever, there is no inspection the model and then selecting the appropriate solver. Everything just goes into scipy.optimize.minimize.

My aim with this project is mainly to satisfy my own selfish fitting needs. But if it can help anyone else or improve symfit, that would be great.

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

No branches or pull requests

4 participants