Skip to content

Commit

Permalink
Merge branch 'release-2023-december' into scai
Browse files Browse the repository at this point in the history
  • Loading branch information
tiadams committed Dec 18, 2023
2 parents bfdc031 + 0bd8a94 commit 12e21e8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 19 deletions.
5 changes: 3 additions & 2 deletions backend/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
app = FastAPI(
title="SYNDAT API",
description="API interface to access programmatic functionalities of SYNDAT.",
version="0.6.4",
version="0.7.0",
terms_of_service="https://www.scai.fraunhofer.de/",
contact={
"name": "Prof. Dr. Holger Fröhlich",
Expand Down Expand Up @@ -232,7 +232,8 @@ def get_available_violin_plots(identifier: str):
for filename in os.listdir("datasets/{}/plots/violin".format(identifier)):
if filename.endswith(".png"):
# remove file ending and append to list
columns.append(filename.split(".")[0])
basename, extension = os.path.splitext(filename)
columns.append(basename)
return {"available_columns": columns}


Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/results/ClassifierReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ClassifierReport extends React.Component<ReportProps, ReportState> {
value={ScoreUtils.calculateAucScore(this.state.auc)}
maxValue={100}
/>
<h4>Classification Score</h4>
<h4>Discrimination Complexity</h4>
<OverlayTrigger
placement="right"
delay={{ show: 250, hide: 400 }}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/results/PrivacyReport.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ h2 {

.newFeatureAltert {
padding-bottom: 50px;
}

.citationBox {
padding-bottom: 50px;
}
53 changes: 37 additions & 16 deletions frontend/src/components/results/PrivacyReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ class PrivacyReport extends React.Component<Props, PrivacyRisks> {
this.getMetrics();
}

colors = [
"#53b83a",
"#84c42b",
"#f1bc00",
"#ed8d00",
"#ed8d00",
"#d12000",
"#d12000",
"#d12000",
];

// update plots if props (-> dataset) changes
componentDidUpdate(prevProps: any, prevState: any) {
if (prevProps.dataset !== this.props.dataset) {
Expand Down Expand Up @@ -96,24 +107,30 @@ class PrivacyReport extends React.Component<Props, PrivacyRisks> {
<h2>Privacy Evaluation Results:</h2>
<Row>
<Col></Col>
<Col className="newFeatureAltert">
<Col className="citationBox">
{" "}
<Alert severity="warning">
Experimental feature, results may deviate.
</Alert>{" "}
<Alert severity="info">
<b>Displayed Metrics are based on:</b><br/>
Giomi, Matteo, et al. "A Unified Framework for Quantifying Privacy
Risk in Synthetic Data." <i>arXiv</i> preprint{" "}
<a href="https://arxiv.org/abs/2211.10459">arXiv:2211.10459</a>{" "}
(2022).
</Alert>
</Col>
<Col></Col>
</Row>
<Row>
<Col>
{" "}
<ReactScoreIndicator
value={ScoreUtils.calculatePrivacyScore(
this.state.singling_out_risk
)}
value={
100 -
ScoreUtils.calculatePrivacyScore(this.state.singling_out_risk)
}
maxValue={100}
stepsColors={this.colors}
/>
<h4>Singling Out Risk Score</h4>
<h4>Singling Out Risk</h4>
<OverlayTrigger
placement="right"
delay={{ show: 250, hide: 400 }}
Expand All @@ -125,12 +142,14 @@ class PrivacyReport extends React.Component<Props, PrivacyRisks> {
<Col>
{" "}
<ReactScoreIndicator
value={ScoreUtils.calculatePrivacyScore(
this.state.linkability_risk
)}
value={
100 -
ScoreUtils.calculatePrivacyScore(this.state.linkability_risk)
}
maxValue={100}
stepsColors={this.colors}
/>
<h4>Linkability Risk Score</h4>
<h4>Linkability Risk</h4>
<OverlayTrigger
placement="right"
delay={{ show: 250, hide: 400 }}
Expand All @@ -142,12 +161,14 @@ class PrivacyReport extends React.Component<Props, PrivacyRisks> {
<Col>
{" "}
<ReactScoreIndicator
value={ScoreUtils.calculatePrivacyScore(
this.state.inference_risk
)}
value={
100 -
ScoreUtils.calculatePrivacyScore(this.state.inference_risk)
}
maxValue={100}
stepsColors={this.colors}
/>
<h4>Inferrence Risk Score</h4>
<h4>Inferrence Risk</h4>
<OverlayTrigger
placement="right"
delay={{ show: 250, hide: 400 }}
Expand Down

0 comments on commit 12e21e8

Please sign in to comment.