weighted Logistic regression in MATLAB?

4 views (last 30 days)
jack
jack on 16 May 2016
Commented: Alessio Atzori on 15 Sep 2020
hello,
Is there a way to apply weighted logistic regression where the weights are on the Data which we are trying to fit? Can this be done with glmfit or mnrfit?
Please advice and thanks in advance.
  2 Comments
Alessio Atzori
Alessio Atzori on 15 Sep 2020
Same question here!
Also: could be possible to weight the features in the linear combination using something like the inverse variance? Maybe something like the weighted average where the more precise is a measurement the more is its influence on the average....
For the logistic regression it would be something like this
where P is the probability of belonging to the positive class and are the weights.
In the case of weigthed average we are summing features with the same dimensions and the weights have the same dimension inversely squared.
For the logistic regression the sum is between different dimension and the necessarly is expressed as the inverse dimension of because the exponent have to be dimensionless. Considering this assumption have to be dimensionless, right?
I think that a feasible choice for the weigths could be the relative error of the feature which is dimensionless.
Thank you!

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!