or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Return type
How should we handle unnamed columns provided as sensitive features or control features? By unnamed columns I mean any
ndarray
,list
or an unnamedpandas.Series
.Besides sensible printouts, we would like to enable expressions like these seamlessly:
Pandas approach
Pandas creates a concatenated index, where unnamed columns have automatically generated names, which are integers beginning with 0. For example:
This returns:
What should Fairlearn do?
I think that we have three options.
Option 1: We only allow named sensitive and control features.
MD: I think that this is the minimal option. I'd be okay with this. However, this will still run into strange behavior if there are some repeated feature names, and especially if there are repeated int names. So I would suggest that we require that
Option 2: Allow unnamed features and impute as in pandas
MD: Frankly, after I spelled out this approach below, I don't think that this is a good idea. Covering all the cases below would be confusing. However, only covering 2a and 2b below would probably suffice and would remove the confusion I think (that's my most preferred proposal Option 4, see below).
Example 2a: Two unnamed sensitive features provided in an
ndarray
Example 2b: Two unnamed sensitive features, one unnamed control feature
Example 2c: Two unnamed sensitive features, one named control feature
Example 2d: Two named sensitive features, one unnamed control feature
Option 3: Allow unnamed features and impute with strings
MD: This is probably preferred over Option 2, but I like Option 4 below even better.
Example 3a: Two unnamed sensitive features provided in an
ndarray
Example 3b: Two unnamed sensitive features, one unnamed control feature
Example 3c: Two unnamed sensitive features, one named control feature
Example 3d: Two named sensitive features, one unnamed control feature
Option 4 = Option 2 limited to:
MD: This is my currently preferred choice.
Example 4a: Two unnamed sensitive features provided in an
ndarray
Example 4b: Two unnamed sensitive features, one unnamed control feature
Example 4c: Two unnamed sensitive features, one named control featureExample 4d: Two named sensitive features, one unnamed control featureTwo API variants [old stuff; disgregard!!!]
Variant 1 (final proposal)
Variant 2 (simplified
make_derived_metric
)TASKS
TASK 1: report one disaggregated metric
TASK 2: report multiple disaggregated metrics
TASK 3: Report several performance and fairness metrics of several models in a data frame.
MD: Issues with the above pattern (both status quo and proposed): it doesn't work so well with multiple metrics if some metrics need scores, i.e.,
score()
orpredict_proba()
and some raw predictions, i.e.,predict()
.AM: sklearn has the scorer interface to deal with the different requiements, and to ensure multiple metrics don't call the same method multiple times, we have a private _MultimetricScorer that implements some caching.
RGE: I don't quite understand what the above means
TASK 4: Report several performance and fairness metrics as well as some disaggregated metrics of several models in a data frame.
Skip for now
TASK 5: Create a fairness-performance raster plot of several models.
TASK 6: Run sklearn.model_selection.cross_validate
Use demographic parity and precision score as the metrics
TASK 7: Run GridSearchCV
With demographic parity and accuracy score, where the goal is to find the lowest-error model whose demographic parity is <= 0.05.