Giter Site home page Giter Site logo

lydiatliu / delayedimpact Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 7.0 267 KB

Code for reproducing results in Delayed Impact of Fair Machine Learning (Liu et al 2018)

License: BSD 3-Clause "New" or "Revised" License

Python 4.81% Jupyter Notebook 95.19%

delayedimpact's People

Contributors

lydiatliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

delayedimpact's Issues

Delayed Impact - More Topics?

Hello Lydia.

Are you still doing the research on delayed impact?
I'm wondering if ChatGPT might be a topic for delayed impact..

How ChatGPT generates convenient error-free codes for users.
Quickly, less people are relying on StackOverFlow or its Documentations over time.
As a result, ChatGPT has less resources to learn from.. or rather less variety forms to study it.
This cycle leads up to something like a knowledge rigidity, where they're persisting a particular answer, due to its training.
These accumulation will add up to have an inevitable consequences for the future.

Similarly, with Mid-Journey or Stable Diffusion on the rampage.
Where the training is based on existing arts and manipulating them.
But with these A.I.s generating high-quality arts with no efforts or time.
The consequences would be less artists drawing or rather uploading/sharing their art.
But only those with A.I. generated arts flood on the internet.
Making these A.I. less variety to learn from. It reaches the end of its own path.
Not sure if that made sense, but it reminded me of your lecture on delayed impact.

fico.py needs updating as "from_csv" is deprecated and key error

Hi Lydia! I loved your paper and wanted to reproduce your results. However, when I ran the jupyter notebook, I got an error from the fico.py file when reading the csv's. After investigating, I realized that the "from_csv" method from pandas has been deprecated as this link reveals. On my local delayedimpact repository, I changed the three instances of "pd.DataFrame.from_csv" in fico.py on lines 28, 63, and 64 to "pd.read_csv". However, even with these changes, I'm getting this new key error, after running the first cell below "0. Load and parse data"? Please let me know if you can update the fico.py file (or I can push once the new error is sorted) and have any idea how I can solve this new error. Thank you!


KeyError Traceback (most recent call last)
in
----> 1 all_cdfs, performance, totals = fico.get_FICO_data(data_dir="/home/mackenzie/git_repositories/delayedimpact/data/")

~/git_repositories/delayedimpact/fico.py in get_FICO_data(data_dir, do_convert_percentiles)
70 """Get FICO data in desired format"""
71 data_pair = parse_data(data_dir)
---> 72 totals = read_totals(data_dir)
73
74 if do_convert_percentiles:

~/git_repositories/delayedimpact/fico.py in read_totals(data_dir)
27 """Read the total number of people of each race"""
28 frame = cleanup_frame(pd.read_csv(data_dir + FILES['overview']))
---> 29 return {r: frame[r]['SSA'] for r in frame.columns}
30
31

~/git_repositories/delayedimpact/fico.py in (.0)
27 """Read the total number of people of each race"""
28 frame = cleanup_frame(pd.read_csv(data_dir + FILES['overview']))
---> 29 return {r: frame[r]['SSA'] for r in frame.columns}
30
31

~/.local/lib/python3.8/site-packages/pandas/core/series.py in getitem(self, key)
880
881 elif key_is_scalar:
--> 882 return self._get_value(key)
883
884 if is_hashable(key):

~/.local/lib/python3.8/site-packages/pandas/core/series.py in _get_value(self, label, takeable)
988
989 # Similar to Index.get_value, but we do not fall back to positional
--> 990 loc = self.index.get_loc(label)
991 return self.index._get_values_for_loc(self, loc, label)
992

~/.local/lib/python3.8/site-packages/pandas/core/indexes/range.py in get_loc(self, key, method, tolerance)
356 except ValueError as err:
357 raise KeyError(key) from err
--> 358 raise KeyError(key)
359 return super().get_loc(key, method=method, tolerance=tolerance)
360

KeyError: 'SSA'

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.