This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Synthetic Data SDK | |
# see also https://github.com/mostly-ai/mostlyai | |
#!uv pip install "mostlyai[local]" | |
# load training data | |
import pandas as pd | |
trn = pd.read_csv('/Users/mplatzer/github/the-prize-data/flat/flat-training.csv') | |
# instantiate SDK in LOCAL mode | |
from mostlyai.sdk import MostlyAI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LOAD original data | |
import pandas as pd | |
census_df = pd.read_csv('https://github.com/mostly-ai/public-demo-data/raw/refs/heads/dev/census/census.csv.gz') | |
# INITIALIZE python client | |
from mostlyai import MostlyAI | |
mostly = MostlyAI() | |
# TRAIN with Differential Privacy | |
for m in [0.25, 0.5, 1, 1.5, 2, 4, 8, 16, 32]: # noise multipliers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mostlyai import MostlyAI | |
# initialize client | |
mostly = MostlyAI() | |
# train generator for BERKA dataset | |
config = { | |
"name": "berka", | |
"tables": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(magick) | |
fns <- list.files(patt='jpg') | |
lapply(fns, function(fn) { | |
cat(basename(fn), '\n') | |
img <- image_read(fn) | |
cdate <- exif_read(fn)$CreateDate | |
if (!is.null(cdate)) { | |
cdate <- as.Date(cdate, format='%Y:%m:%d') | |
} else { | |
cdate <- Sys.Date() |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users_id,date,cds,amt | |
1,1997-01-01,1,11.77 | |
2,1997-01-12,1,12 | |
2,1997-01-12,5,77 | |
3,1997-01-02,2,20.76 | |
3,1997-03-30,2,20.76 | |
3,1997-04-02,2,19.54 | |
3,1997-11-15,5,57.45 | |
3,1997-11-25,4,20.96 | |
3,1998-05-28,1,16.99 |