This commit is contained in:
Si11ium
2019-03-15 21:26:27 +01:00
parent 8d6283ff95
commit 3af568a478
5 changed files with 17 additions and 7 deletions
code
bar_plot.py
setups
experiments
exp-mixed-soup-_1552674483.9866457-0

@ -29,18 +29,20 @@ def plot_bars(names_bars_tuple, filename='histogram_plot'):
# catagorical # catagorical
ryb = cl.scales['10']['div']['RdYlBu'] ryb = cl.scales['10']['div']['RdYlBu']
names, bars = names_bars_tuple names, bars = names_bars_tuple
names = ['Recurrent', 'Aggregating', 'Weightwise']# [name.split(' ')[0] for name in names] situations = list(bars[0].keys())
names = ['Weightwise', 'Aggregating', 'Recurrent'] # [name.split(' ')[0] for name in names]
data_dict = {} data_dict = {}
for idx, name in enumerate(names): for idx, name in enumerate(names):
data_dict[name] = bars[idx] data_dict[name] = bars[idx]
data = [] data = []
for idx, name in enumerate(data_dict.keys()): for idx, situation in enumerate(situations):
bar = go.Bar( bar = go.Bar(
y=[val for val in data_dict[name].values()], y=[data_dict[name][situation] for name in names],
x=[key for key in data_dict[name].keys()], # x=[key for key in data_dict[name].keys()],
name=name, x=names,
name=situation,
showlegend=True, showlegend=True,
) )
data.append(bar) data.append(bar)
@ -49,7 +51,7 @@ def plot_bars(names_bars_tuple, filename='histogram_plot'):
barmode='stack', barmode='stack',
# height=400, width=400, # height=400, width=400,
# margin=dict(l=20, r=20, t=20, b=20) # margin=dict(l=20, r=20, t=20, b=20)
legend=dict(orientation="h", x=0.2) legend=dict(orientation="h", x=0.05)
) )
fig = go.Figure(data=data, layout=layout) fig = go.Figure(data=data, layout=layout)
@ -90,5 +92,5 @@ if __name__ == '__main__':
in_file = args.in_file[0] in_file = args.in_file[0]
out_file = args.out_file out_file = args.out_file
search_and_apply(in_file, plot_bars, files_to_look_for=['all_counters.dill']) search_and_apply(in_file, plot_bars, files_to_look_for=['all_data.dill'])
# , 'all_names.dill', 'all_notable_nets.dill']) # , 'all_names.dill', 'all_notable_nets.dill'])

@ -0,0 +1,8 @@
TrainingNeuralNetworkDecorator activiation='linear' use_bias=False
{'xs': [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], 'ys': [0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0], 'zs': [0.0, 0.0, 0.7, 1.9, 3.6, 4.3, 6.0, 6.1, 8.3, 7.7, 8.8]}
TrainingNeuralNetworkDecorator activiation='linear' use_bias=False
{'xs': [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], 'ys': [0.8, 0.4, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3], 'zs': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}