)
plt_dist.plot_similarities(
    neuron_distance_csv,
    data_DIR,
    algorithms_ordered,
    metric="neuron_distance_perc",
    CASE_BY_CASE_PLOT=0,
    value_label="Similarity (0~1) based on Neuron Different Structure Percentage (D3)",
)


plt_dist.plot_neuron_distance(neuron_distance_csv, data_DIR, algorithms_ordered, CASE_BY_CASE_PLOT=0)


########################################  for all generated reconstructions ############################
# plot runnign time

output_time_csv = data_DIR + "/running_time_algorithm.csv"

rp.summerize_running_time(time_csv, algorithm_plugin_match_csv, lookup_image_id_table_file, output_time_csv)


df_gold = pd.read_csv(GOLD_CSV)
df_silver_time = pd.read_csv(output_time_csv)
df_share_time = pd.merge(df_silver_time, df_gold, on="image_file_name")
df_share_time.to_csv(data_DIR + "/running_time_algorithm_gold.csv", index=False)
plt_dist.plot_running_time(data_DIR + "/running_time_algorithm_gold.csv", data_DIR, algorithms_ordered)
plt_dist.plot_running_time_validation(
    data_DIR + "/running_time_algorithm_gold.csv", neuron_distance_csv, data_DIR, algorithms_ordered
)
Example #2
0
    data_DIR,
    algorithms_ordered,
    metric='neuron_distance_perc',
    CASE_BY_CASE_PLOT=0,
    value_label='Similarity (0~1) on Neuron Different Structure Percentage (D3)'
)

plt_dist.plot_neuron_distance(neuron_distance_csv,
                              data_DIR,
                              algorithms_ordered,
                              CASE_BY_CASE_PLOT=0)

########################################  for all generated reconstructions ############################
#plot runnign time
df_silver_gt = pd.read_csv(SILVER_CSV)

output_time_csv = data_DIR + "/running_time_algorithm.csv"

rp.summerize_running_time(time_csv, algorithm_plugin_match_csv,
                          lookup_image_id_table_file, output_time_csv)

df_rc_time = pd.read_csv(output_time_csv)
df_share_time = pd.merge(df_rc_time, df_silver_gt, on="image_file_name")
df_share_time.to_csv(data_DIR + "/running_time_algorithm_silver_gt.csv",
                     index=False)
plt_dist.plot_running_time(data_DIR + "/running_time_algorithm_silver_gt.csv",
                           data_DIR, algorithms_ordered)
plt_dist.plot_running_time_validation(
    data_DIR + "/running_time_algorithm_silver_gt.csv", neuron_distance_csv,
    data_DIR, algorithms_ordered)
Example #3
0
df_nd = pd.read_csv(neuron_distance_csv)
algorithms = np.unique(df_nd.algorithm)
print algorithms

dfg = df_nd.groupby('algorithm')
sample_size_per_algorithm = np.zeros(algorithms.size)
for i in range( algorithms.size):
    print algorithms[i]
    sample_size_per_algorithm[i] = (dfg.get_group(algorithms[i]).shape[0])

order = sample_size_per_algorithm.argsort()
algorithms_ordered = algorithms[order[::-1]]


time_csv="/data/mat/xiaoxiaol/data/reconstructions_2015_1214/auto_recons/running_time.csv"
output_time_csv= "/data/mat/xiaoxiaol/data/reconstructions_2015_1214/running_time_algorithm.csv"
algorithm_plugin_match_csv ="/data/mat/xiaoxiaol/data/reconstructions_2015_1214/ported_neuron_tracing_spreadsheet.csv"
rp.summerize_running_time(time_csv, algorithm_plugin_match_csv,output_time_csv)


df_gold = pd.read_csv(GOLD_CSV)
df_silver = pd.read_csv(SILVER_CSV)
#print df_silver.columns
#print df_gold.columns

df_share = pd.merge(df_silver,df_gold,on="image_file_name")


plt_dist.plot_running_time(output_time_csv, data_DIR,algorithms_ordered)