Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import plotly.graph_objects as go
import pandas as pd

# Corrected data with equal lengths for all arrays
data = {
'Dataset': ['BM1', 'BM2', 'BM3', 'BM4', 'BM5', 'BM6', 'BM7', 'BM8',
'GC1', 'GC2', 'GC3', 'GC4', 'GC5',
'AC1', 'AC2', 'AC3', 'AC4', 'AC5', 'AC6', 'AC7', 'AC8', 'AC9', 'AC10', 'AC11', 'AC12'],
'Model': ['Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', '[8]',
'Kaggle', '[1, 24]', 'Kaggle', 'Kaggle', '[8]',
'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', 'Kaggle', '[8]', '[27, 28]', '[27, 28]', '[27, 28]', '[27, 28]', '[27, 28]'],
'Source': ['', '', '[1, 24]', '', '', '', '', '',
'', '[1, 24]', '', '', '',
'', '[1, 24]', '', '', '', '', '', '', '', '', '', ''],
'Layers': [4, 4, 3, 5, 4, 4, 4, 7,
3, 3, 3, 4, 4,
4, 3, 3, 4, 4, 4, 7, 4, 6, 6, 6, 11],
'Neurons': [97, 65, 117, 318, 49, 35, 145, 141,
64, 114, 23, 24, 138,
45, 121, 71, 221, 149, 45, 145, 10, 12, 20, 40, 45],
'Accuracy': [89.20, 88.76, 88.22, 89.55, 88.90, 88.94, 88.70, 89.20,
72.67, 74.67, 75.33, 70.67, 69.33,
85.24, 84.70, 84.52, 84.86, 85.19, 84.77, 84.85, 82.15, 81.22, 78.56, 79.25, 81.46]
}

df = pd.DataFrame(data)

# Create the figure
fig = go.Figure()

# Add bar trace for accuracy
fig.add_trace(go.Bar(
x=df['Dataset'],
y=df['Accuracy'],
name='Accuracy',
marker_color='blue',
text=df['Accuracy'],
textposition='outside'
))

# Add scatter trace for neurons and layers
fig.add_trace(go.Scatter(
x=df['Dataset'],
y=df['Neurons'],
mode='markers',
name='Neurons',
marker=dict(color='green', symbol='circle'),
text=df.apply(lambda row: f'Neurons: {row["Neurons"]}, Layers: {row["Layers"]}', axis=1),
hoverinfo='text'
))

# Customize layout
fig.update_layout(
title='Neurons, Layers, and Accuracy Visualization',
xaxis=dict(title='Dataset'),
yaxis=dict(title='Value'),
barmode='group'
)

# Show the figure
fig.show()
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
z3-solver
tensorflow==2.5.0
aif360
aif360
4 changes: 2 additions & 2 deletions src/AC/Verify-AC.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# In[]
model_dir = '../../models/adult/'
result_dir = './libra/sex-'
result_dir = './res-'
PARTITION_THRESHOLD = 10

SOFT_TIMEOUT = 100
Expand Down Expand Up @@ -303,7 +303,7 @@

import csv
file_exists = os.path.isfile(file)
with open(file, "a", newline='') as fp:
with open(file, "w", newline='') as fp:
if not file_exists:
wr = csv.writer(fp, dialect='excel')
wr.writerow(res_cols)
Expand Down
2 changes: 1 addition & 1 deletion stress/AC/Verify-AC.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#print_metadata(df)

# In[]
model_dir = './AC-Model/'
model_dir = './../models/adult'
result_dir = './res/sex-'
PARTITION_THRESHOLD = 6

Expand Down
2 changes: 1 addition & 1 deletion stress/BM/Verify-BM.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#print_metadata(df)

# In[]
model_dir = './../BM-Model/'
model_dir = './../models/bank'
result_dir = './age-'
PARTITION_THRESHOLD = 10

Expand Down
2 changes: 1 addition & 1 deletion targeted2/AC/Verify-AC.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
if model_name == '':
continue

model_funcs = 'utils.' + model_name + '-Model-Functions'
model_funcs = 'utils.' + 'Model-Functions'
mod = import_module(model_funcs)
layer_net = getattr(mod, 'layer_net')
net = getattr(mod, 'net')
Expand Down
2 changes: 1 addition & 1 deletion targeted2/BM/Verify-BM.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
if model_name == '':
continue

model_funcs = 'utils.' + model_name + '-Model-Functions'
model_funcs = 'utils.' + 'Model-Functions'
mod = import_module(model_funcs)
layer_net = getattr(mod, 'layer_net')
net = getattr(mod, 'net')
Expand Down
2 changes: 1 addition & 1 deletion targeted2/GC/Verify-GC.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
print('================== STARTING MODEL ' + model_file)
model_name = model_file.split('.')[0]

model_funcs = 'utils.' + model_name + '-Model-Functions'
model_funcs = 'utils.' + 'Model-Functions'
mod = import_module(model_funcs)
layer_net = getattr(mod, 'layer_net')
net = getattr(mod, 'net')
Expand Down
48 changes: 0 additions & 48 deletions utils/AC-1-Model-Functions.py

This file was deleted.

101 changes: 0 additions & 101 deletions utils/AC-10-Model-Functions.py

This file was deleted.

101 changes: 0 additions & 101 deletions utils/AC-11-Model-Functions.py

This file was deleted.

Loading