arx icon indicating copy to clipboard operation
arx copied to clipboard

[FEATURE/BUG] Enable definition of traning and validation set for privacy-preserving machine learning

Open prasser opened this issue 3 years ago • 8 comments

Is your feature request related to a problem? Please describe.

The privacy-preserving machine learning framwork in ARX uses k-fold cross-validation to quantify the performance of privacy-preserving models. This can lead to misleading estimates as training and validation sets both influence the optimization process performed during anonymization.

Describe the solution you'd like As an alternative it would be good to enable users to specify a training and a validation set in such a way that only the training set influences the anonymization process. This can easily be done in ARX by using the "research subset" feature, which allows selecting a subset of the records in a dataset that are then anonymized. What would needed to be added is a feature that allows to specify that machine learning performance is determined based on the set of records that is not included in the research subset.

prasser avatar Jan 29 '22 14:01 prasser

@srcds or @idhamari might want to take a look at this.

prasser avatar Jan 29 '22 14:01 prasser

@prasser @srcds sounds interesting, I will have a look at this next week.

idhamari avatar Jan 29 '22 18:01 idhamari

@prasser

When a user select random records by clicking on "Select Randomly", a view output does not reflect that e.g. by selecting 0.80:

    System.out.println("this.model.getOutput().getNumRows()                   : " + this.model.getOutput().getNumRows());
    System.out.println("this.model.getOutput().getView().getNumRows()         : " + this.model.getOutput().getView().getNumRows());
    System.out.println("this.model.getInputConfig().getResearchSubset.size()  : " + this.model.getInputConfig().getResearchSubset().size());  

I get the output:

         this.model.getOutput().getNumRows()                          : 30162
         this.model.getOutput().getView().getNumRows()          : 30162
         this.model.getInputConfig().getResearchSubset.size()  : 24070

I am using the view output to get the training and the testing subset which makes a problem.

idhamari avatar May 10 '22 09:05 idhamari

This is OK and the expected behaviour.

prasser avatar May 10 '22 10:05 prasser

An implementation of this is provided in the following branch: feature-training-test

Might still need a little bit of polishing, though.

prasser avatar Jun 19 '22 21:06 prasser

I was wondering if this feature can already be used it it's current state?

jenno-verdonck avatar Oct 05 '22 12:10 jenno-verdonck

Yes, should work. We would be happy to receive feedback.

prasser avatar Oct 05 '22 16:10 prasser

To be clear. The feature lives here in this branch:

https://github.com/arx-deidentifier/arx/tree/feature-training-test

prasser avatar Oct 05 '22 16:10 prasser