ashryaagr / Fairness.jl

Julia Toolkit with fairness metrics and bias mitigation algorithms
https://ashryaagr.github.io/Fairness.jl/dev/
MIT License
31 stars 14 forks source link

Change postprocessing structs subtyping #47

Closed jademackay closed 3 years ago

jademackay commented 3 years ago

Change post-processing structs EqOddsWrapper and LinProgWrapper (back?) to subtype Deterministic rather than DeterministicComposite. Changes enable the content of https://nextjournal.com/ashryaagr/fairness to be run.

Thanks for creating this package!

ashryaagr commented 3 years ago

Thanks a lot for the Pull Request. MLJ Docs (https://alan-turing-institute.github.io/MLJ.jl/dev/composing_models/#Method-II:-Finer-control-(advanced)-1) uses DeterministicComposite for creating composite wrappers and that's why all Fairness algorithms are subtypes of DeterministicComposite. The notebook https://nextjournal.com/ashryaagr/fairness ran perfectly with DeterministicComposite. So, could you please explain what exactly is the need for change of DeterministicComposite to Deterministic

jademackay commented 3 years ago

How curious. I think that the most notable difference between the Deterministic and and DeterministicComposite types is seen in the implementation of fit and predict - in particular, the form of the return value:

Could it be that you changed the implementation of fit/predict rather than the model type as I suggested initially?

ashryaagr commented 3 years ago

Ok. This makes sense to me. I somehow didn't know the difference in the usage of both.

I am merging this Pull Request.

Thanks a lot!!