Code Monkey home page Code Monkey logo

cdei-development's Introduction

Bias exploration

Build and Deploy Site Clean and Release Notebooks

This repository contains an analysis of bias mitigation algorithms in machine learning. We apply a range of interventions to two data sets and compare results.

You can view the results of our analysis and an accompanying discussion on our accompanying website.

Notebooks containing all of our analysis can be found in the notebooks/ folder. You can run any one of them in your browser without installing anything courtesy of Binder. Alternatively clone this repository to run the notebooks locally. You can install the required dependencies with

pip install -r ./src/requirements.txt

Development

All source code is contained in src/, including raw versions of the notebooks. See the README in src/ for more details.

cdei-development's People

Contributors

github-actions[bot] avatar imrehg avatar railton12 avatar tcbegley avatar tschwedes avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

railton12

cdei-development's Issues

Code cleanup

This is a tracking issue for things to do to clean up the code.

  • favour fig over fig.show() in notebooks so that browser tabs aren't spawned when building locally
  • run black on all source, black-nb on all notebooks
  • check for unused imports
  • sort imports
  • Use f-strings rather than old school string interpolation with %
  • Consistent use of fairness terminology (e.g. demographic parity rather than independence)
  • Format floating point numbers to 3 decimal places

Binder previews

Likely could have a page (per subtopic) with all binder links and context, to help people understand what is expected to happen when the click those links, and also highlight the chance to do that, otherwise in the text it might be too subtle.

Unresponsive collapsibles on page load

Collapsibles are waiting for other JS to be loaded which might take some time, and they cannot be opened while that is ongoing. This is not great UX.

Plotly issue when revisiting a page

On first view, the plots are displayed with the right size, but if navigating to another page, and then back, it can be squashed. One stark example is the baseline pages hours worked per week plot, which is quite long, but then squashed to a standard small size when navigated away & then back.

The console shows an error like this:

Uncaught (in promise) Error: Resize must be passed a displayed plot div element.
    at plotly.js:141605
    at new Promise (<anonymous>)
    at Object.plots.resize (plotly.js:141603)
    at resizeHandler (factory.js:206)

Pleiss updates

I don't think the way we measure fairness, nor the way we visualise it is quite right for Pleiss experiments. @baba-mpe perhaps you could take a look at this tomorrow?

Navigation buttons tuning

Currently it's backwards / forwards link text, but it is usually ellipsized and that doesn't look great. Look for alternatives, or fall back to Previous / Next.

Should artifacts go in src?

Currently we have data/ getting generated inside src/, but artifacts/ in the root directory. Should we keep them in the same place. Or perhaps data/ even belongs inside artifacts/?

Build site without deploying off master

I think it would be helpful to have Actions build the site without deploying it on all branches. Just merged something and only found out on master that I had broken something ๐Ÿ˜ณ (all fixed, don't worry)

Are dependencies needed for linting?

Currently we install requirements.txt in the linting workflow, but I think this is actually not necessary. The requirements are pretty overbearing and take a good few minutes to install. I think black, flake8 etc. can analyse code without running it, so perhaps we can remove this step.

Design update task tracker

Things need to happen to design before handover, add new items as they come:

  • Header logo replacement with CDEI one
  • Licenses update #6
  • Author update in files
  • Updated favicon #5
  • New social preview image
  • Loader colour
  • Fonts review
  • Dealing with "Theme by Rocketseat" item in the bottom (repurpose it for copyright?)
  • Plot theming #24
  • Styling of 404 page
  • Small screen plots #91
  • Soften code snippet styling (it's too dark)
  • Unresponsive collapsibles on page load #92

Collapsible element is highlighted when clicked

I think it doesn't look great, looking for options to do away with that highlight.

Screenshot_2020-06-19_22-31-31

There's react-collapse that we use at the moment.

An alternative is react-component/collapse, and there I see the highlight in in their demo already, though a bit less jarring: http://react-component.github.io/collapse/examples/custom-icon.html (also the demo already does the tabbing and expand-on-keypress, that we added manually, so it seems better equipped out of the box?)

Also looking at react-collapsible which might be an alternative (and seems to need less code? but maybe that's just how they write their readme. Tried it out through the JSFiddle link in the repo). Less nice looking though.

Opening this issue to look at these for a quick facelift, if that's possible.

Add site previews to PRs

Connects to #9 somewhat, but extra as well. Eg. deploy into an S3 bucket. But we'll see, and it might be just during development time. We'll see.

Pin dependencies

Currently we have only pinned a subset of the dependencies we're using. Might be worth installing contents of requirements.txt in a clean virtual environment and saving the output of pip list / pip freeze or something?

Save kamishima model outputs

It seems its not possible to save the predjudice remover model directly, so instead we should save the outputs for reproducibility.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.