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

Why do we have the weights argument can we remove it? #20

Open
willtebbutt opened this issue Aug 7, 2020 · 3 comments
Open

Why do we have the weights argument can we remove it? #20

willtebbutt opened this issue Aug 7, 2020 · 3 comments
Labels
question Further information is requested

Comments

@willtebbutt
Copy link
Member

It's unclear to me what situations necessitate having a weights argument for fit. Is there some situation in which they cannot be baked into the Template and really have to be external?

Certainly, it's not the case that having weights always makes sense, so it would be great to remove it from the API if possible.

@willtebbutt willtebbutt added the question Further information is requested label Aug 7, 2020
@willtebbutt willtebbutt changed the title Why do we have the weights field Why do we have the weights field / can we remove it? Aug 11, 2020
@nickrobinson251
Copy link
Contributor

fyi @oxinabox who's thought about this previously, i think.

@oxinabox oxinabox changed the title Why do we have the weights field / can we remove it? Why do we have the weights argument can we remove it? Aug 11, 2020
@oxinabox
Copy link
Member

We can not incorperate it into the template as it depends on the data.
In particular it is the weights of each observation in the data, so needs to be the same length.
How much data you have is not known until you call fit.
Further the weight might be determined nontrivially, for example if we were doing classification and had unbalanced classes observation we might want to increase the weight on things in the rarer class.

@wytbella
Copy link
Member

I'm actually not sure having weights or weights_generaltion_function in the model_template can achieve everything we've done easily.

(1) if weights vector is in the model_template, how do you know the length of it before knowing the length of inputs (#observations)

(2) if weight_generation_function is in the model_template, it's probably fine if the function doesn't have complicated inputs. The easiest situation is that the inputs to weight_generation_function is the same as inputs to model. The more complicated situation is weight_generation_function require other features, or even data at test time. (although you might be able to come across all of them by having more complicated inputs to fit)

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

No branches or pull requests

4 participants