Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

synthetic-aia-mia

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synthetic-aia-mia

AIA and MIA attack versus synthetic and real data.

  • 0.0.45
  • PyPI
  • Socket score

Maintainers
1

Impact of using synthetic data on MIA and AIA

API documentation

The documentation is generated using sphinx. To view it, clone the repo and use your web browser to open docs/build/html/index.html. To regenerate the API documentation:

sphinx-apidoc -f -F -o docs src;
sphinx-build -M html docs docs/build/

Tests

Unit tests are setup in the test directory. They use the python unittest packages. To run all tests:

python -m unittest discover -v -p "*.py" -s test

Installation

Instal with pip in a venv. In the directory containing pyproject.toml :

 pip install --editable .

Usage

Running experiments through the command line interface

python -m synthetic_aia_mia.experiments.adult <generator> <k>;
  • Generator is either identity or ctgan.
  • k folding step in 0,1,2,3,4.

Key features

#Load data
from synthetic_aia_mia.fetch_data import adult
from synthetic_aia_mia.fetch_data import utk
data_adult = adult.load()
data_utk = utk.load()

#Train a neural network an adult 
form synthetic.predictor.adult import AdultNN
adultNN = AdultNN()
adultNN.fit(data_adult["train"])

#Evalute trained neural network
adultNN.predict(data_adult["test"])

#Generate synthetic data
from synthetic_aia_mia.generator.adult import ctgan 
from synthetic_aia_mia.generator import identity 
synthetic_identity = identity(data_adult(["train"]))
synthetic_ctgan = ctgan(data_adult(["train"]))

Datasets

Adult

We are using folktables adult.

UTKFaces

From Kaggle: jangedoo/utkfaces-new. For loading and parsing files we use aia_fairness.dataset_processing

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc