cgi-fr / mimo Goto Github PK
View Code? Open in Web Editor NEWMasked Input Metrics Output
Home Page: https://cgi-fr.github.io/MIMO/dev/bench/
License: GNU General Public License v3.0
Masked Input Metrics Output
Home Page: https://cgi-fr.github.io/MIMO/dev/bench/
License: GNU General Public License v3.0
A new flag --debug-field <field-name>
should enable additional informations on a specific field :
Disparity in data type (e.g. number vs string) or data structure (e.g. value vs array) should always trigger an error because data protection cannot be asserted.
Difficult to compute inter-stream coherence/identifiable rates when columns are built differently (by format or composition)
Example :
A/real.jsonl
{"id":1,"name":"Clothilde","surname":"Renard"}
{"id":2,"name":"Andrée","surname":"Mathieu"}
A/masked.jsonl
{"id":1,"name":"John","surname":"Doe"}
{"id":2,"name":"Jade","surname":"Doe"}
B/real.jsonl
{"id":1,"idutil":"1 - Clothilde Renard"}
{"id":2,"idutil":"2 - Andrée Mathieu"}
B/masked.jsonl
{"id":1,"idutil":"1 - John Doe"}
{"id":2,"idutil":"2 - John Doe"}
MIMO should be able to compute pre-values in the stream.
A/config.yaml
version: "1"
preprocess:
- name: "idutil"
value: "{{.id}} - {{.name}} {{.surname}}"
metrics:
- name: "idutil"
coherentWith: ["id"]
B/config.yaml
version: "1"
metrics:
- name: "idutil"
coherentWith: ["id"]
$ cat A/masked.jsonl | mimo --config A/config.yaml --persist localdb A/real.jsonl
$ cat B/masked.jsonl | mimo --config B/config.yaml --persist localdb B/real.jsonl
computation matrix (stored in localdb)
1 - John Doe | 2 - Jane Doe | 2 - John Doe | coherent rate = 50% | |
---|---|---|---|---|
1 | x | 1 | ||
2 | x | x | 2 | |
identifiant rate = 100% | 1 | 1 | 1 |
report.html
Field | Nil | Empty | Masked | Missed | Masking Rate | Coherent Rate | Identifiable Rate |
---|---|---|---|---|---|---|---|
idutil | 0 | 0 | 4 | 0 | 100% | 50% | 100% |
When an alias is set, contraints are disabled
The report is generated at the root workspace, insome context i need to change the outpur$t path and the file name
Indeed (because I m a maven man) all build information is write in * target * directory and this directory is in my * .gitignore *
Example :
> cat masked.jsonl | mimo --output target/ real.jsonl
> cat masked.jsonl | mimo -o target/ real.jsonl
> cat masked.jsonl | mimo --output myHTML.html real.jsonl
> cat masked.jsonl | mimo -o target/myHTML.html real.jsonl
The final * / * should define the stringis a directory (and create this path if not exist)
Does not seem to be working
As a user of MIMO, I want to validate
Define a validation profile with a YAML configuration file:
mimo.yaml
metrics:
- name: # name of the field to validate
exclude: [ nil, "" ] # exclude nil and empty values from the masking rate computation (default: only nil values)
coherentWith: ["name", "surname"] # list of fields from witch the coherent rate is computed (default: the current field)
constraints:
maskingRate:
shouldEqualsTo: 1
coherentRate:
shouldBeGreaterThan: 0.95
$ mkfifo real.jsonl
$ lino pull bdd | tee real.jsonl | pimo | mimo --config mimo.yaml real.jsonl | lino push bdd
multmap should be an interface to switch from different implementations
A column could use an alias to be identified across multiple execution context
version: "1"
metrics:
- name: "person.phone"
alias: "phone_number"
{"batchs":[{"id":1,"accounts":[{"number":"A"},{"number":"B"}]}]}
version: "1"
metrics:
- name: "batchs.[].accounts.[].number"
coherentSource: "{{.current}} {{._1.id}}"
Path should be able to start from the current context of execution (inside an array structure for example)
.current
will reference the current object.root
will reference the root object._1
will reference the current first level object._2
will reference the current second level object$ mkfifo real.jsonl
$ lino pull bdd | tee real.jsonl | pimo | mimo real.jsonl | lino push bdd
$ # mimo starts the subprocess (pimo)
$ lino pull bdd | mimo pimo | lino push bdd
or
$ # mimo reads masked data from a file
$ lino pull bdd | tee real.jsonl | pimo | mimo --from-file real.jsonl | lino push bdd
MIMO should process object and array structures.
$ cat masked.jsonl | mimo --config cfg.yaml real.jsonl
5:05PM ERR summmary for column value count-ignored=0 count-masked=8 count-missed=2 count-nil=0 field=value rate-coherence=0.6 rate-identifiable=0.8 rate-masking=0.8
5:05PM ERR masking-rate shouldEqual 1 for column value failed, below are some example of failed values field=value
5:05PM ERR value was not masked field=value value=John
5:05PM ERR value was not masked field=value value=Jane
5:05PM ERR coherence-rate shouldEqual 1 for column value failed, below are some example of failed values field=value
5:05PM ERR value was attributed 3 pseudonyms field=value value=John pseudonyms=[Rob,John,Jane]
5:05PM ERR identifiable-rate shouldEqual 1 for column value failed, below are some example of failed values field=value
5:05PM ERR pseudonym was attributed to 2 values field=value pseudonym=Rob values=[John,Jane]
5:05PM FTL end MIMO error="report contains unsatisfied constraint(s)"
And all counters
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.