Supporting the CSVWriter in our evaluation scripts
So far bob bio evaluate
(and it's siblings) does not have support for scores written with CSVScoreWriter
(bob bio pipelines vanilla-biometrics --write-metadata-scores
).
This MR fixes that
Merge request reports
Activity
assigned to @amohammadi
assigned to @ydayer and unassigned @amohammadi
- Resolved by Tiago de Freitas Pereira
- Resolved by Tiago de Freitas Pereira
- Resolved by Tiago de Freitas Pereira
Pandas is a well maintained, and heavily used library by the vast majority of the data science community. Furthermore,
dask-dataframes
uses the same API as pandas dataframes (https://docs.dask.org/en/latest/dataframe.html); hence we can hook with dask and have things done distributed for FREE if necessary. We gain more than losing by relying on pandas.Furthermore, and more important, I need this for my work. For instance, I use https://gitlab.idiap.ch/bob/bob.bio.base/-/blob/csvsupport/bob/bio/base/score/load.py#L168 this for my demographic analysis. I would like the positive and negative scores as dataframes for further analysis.
Edited by Tiago de Freitas Pereira
added 1 commit
- 7645d984 - Apply suggestion to bob/bio/base/score/load.py
added 1 commit
- 4e00dd4f - Apply suggestion to bob/bio/base/score/load.py
added 1 commit
- a541988e - Apply suggestion to bob/bio/base/score/load.py
added 1 commit
- fbf8f2bc - Add a score-generation option for the CSV format
Thanks @ydayer That's indeed better
544 585 545 586 The last element of the line (which is the score) will be transformed to float, the other elements will be str 546 587 """ 547 opened = open_file(filename, "rb") 548 if sys.version_info.major > 2: 588 if iscsv(filename): 589 df = pd.read_csv(filename) 590 for _, row in df.iterrows(): @ydayer please change here to python's csv reader
changed this line in version 9 of the diff
- Resolved by Yannick DAYER
let's also make .csv files the default output of vanilla_biometrics.