<jupyter_start><jupyter_text>Datasplit-1<jupyter_code># Define the global directory path.
directoryPath = '/home/adgdri/pFedMe/results/Datasplit-1/'<jupyter_output><empty_output><jupyter_text>Num Epochs: 50<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50<jupyter_text>Num Epochs: 100<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_100',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_100',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_100',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_100',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_100',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_100
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_100
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_100
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_100
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_100<jupyter_text>Num Epochs: 150<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_150',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_150',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_150',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_150',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_150',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_150
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_150
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_150
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_150
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_150<jupyter_text>Num Epochs: 200<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_200',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_200',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_200',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_200',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_200',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_200
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_200
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_200
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_200
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_200<jupyter_text>Num Epochs: 250<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_250',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_250',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_250',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_250',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_250',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_250
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_250
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_250
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_250
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_250<jupyter_text>Num Epochs: 300<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_300',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_300',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_300',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_300',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_300',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]
    plt.plot(ob['rs_train_loss'])
    
plt.title('Train loss curves.')
plt.legend(['R0','R1','R2','R3','R4',])
plt.show()
# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_300
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_300
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_300
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_300
/home/adgdri/pFedMe/results/Datasplit-1/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_300<jupyter_text>Datasplit-2<jupyter_code># Define the global directory path.
directoryPath = '/home/adgdri/pFedMe/results/'
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.005_avg_roundNum_0_globalIters_800_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.005_avg_roundNum_0_globalIters_1200_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_800_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_1200_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
# Hyper-params for CIFAR-10 DS-1 fixed.
# personal learning rate: 0.001 
# global epochs: 800
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1200_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_800_dataSplit_1'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_1000_dataSplit_2',
#     'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_1000_dataSplit_2',
#     'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_1000_dataSplit_2',
#     'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_1000_dataSplit_2',
#    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_1000_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
# DS2 params
# Global Iters: 1000
# Personal learning rate: 0.0025
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_1000_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_1200_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.005_avg_roundNum_0_globalIters_1000_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.005_avg_roundNum_0_globalIters_1200_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_0_globalIters_1000_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_0_globalIters_1200_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1800_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1800_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.6001199640107968]

 Average accuracy across all the different runs : 0.600120.

 Average per user accuracy averaged over different runs: 
 [[0.6244]
 [0.5693]
 [0.5843]
 [0.6382]
 [0.6114]
 [0.6383]
 [0.5645]
 [0.5831]
 [0.5881]
 [0.5875]].

 Average accuracy averaged over different runs: 
 0.5989099999999999.<jupyter_text>Datasplit-3<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_800_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_0_globalIters_800_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.005_avg_roundNum_0_globalIters_800_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_800_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_3<jupyter_text>Num Epochs: 25<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_25_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_25_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.15375387383784864, 0.16205138458462462, 0.15346930613877224, 0.14385684294711587, 0.1375587323802859]

 Average accuracy across all the different runs : 0.150138.

 Average per user accuracy averaged over different runs: 
 [[0.1717]
 [0.124 ]
 [0.1241]
 [0.1603]
 [0.1174]
 [0.1142]
 [0.2111]
 [0.[...]<jupyter_text>Num Epochs: 50<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_50_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_50_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.15255423372988103, 0.2210336898930321, 0.21105778844231154, 0.1858442467259822, 0.20703788863340997]

 Average accuracy across all the different runs : 0.195506.

 Average per user accuracy averaged over different runs: 
 [[0.2099]
 [0.172 ]
 [0.1541]
 [0.2043]
 [0.2043]
 [0.1629]
 [0.2826]
 [0.2[...]<jupyter_text>Num Epochs: 100<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_100_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_100_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_100_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_100_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_100_dataSplit_2',
]

# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_100_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_100_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_100_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_100_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_100_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.3962811156653004, 0.4239728081575527, 0.38962207558488304, 0.3580925722283315, 0.35379386184144757]

 Average accuracy across all the different runs : 0.384352.

 Average per user accuracy averaged over different runs: 
 [[0.3981]
 [0.3939]
 [0.3453]
 [0.4064]
 [0.3961]
 [0.4061]
 [0.4036]
 [...]<jupyter_text>Num Epochs: 200<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_200_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_200_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.455963211036689, 0.47515745276417076, 0.46010797840431916, 0.4322703189043287, 0.4221733479956013]

 Average accuracy across all the different runs : 0.449134.

 Average per user accuracy averaged over different runs: 
 [[0.4633]
 [0.4539]
 [0.4249]
 [0.4756]
 [0.4584]
 [0.4642]
 [0.4536]
 [[...]<jupyter_text>Num Epochs: 300<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_300_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_300_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_300_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_300_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_300_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_300_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_300_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_300_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_300_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_300_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.49545136459062283, 0.5149455163450964, 0.49300139972005597, 0.47665700289913027, 0.4695591322603219]

 Average accuracy across all the different runs : 0.489923.

 Average per user accuracy averaged over different runs: 
 [[0.5016]
 [0.4907]
 [0.4652]
 [0.5185]
 [0.4887]
 [0.5002]
 [0.4888]
[...]<jupyter_text>Num Epochs: 400<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_400_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_400_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_400_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_400_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_400_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_400_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_400_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_400_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_400_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_400_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5185444366689993, 0.5402379286214136, 0.5112977404519096, 0.4980505848245526, 0.48805358392482256]

 Average accuracy across all the different runs : 0.511237.

 Average per user accuracy averaged over different runs: 
 [[0.523 ]
 [0.5106]
 [0.4887]
 [0.5382]
 [0.5112]
 [0.5234]
 [0.5116]
 [[...]<jupyter_text>Num Epochs: 500<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_500_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_500_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5345396381085674, 0.5598320503848845, 0.5302939412117577, 0.5148455463360991, 0.5089473158052584]

 Average accuracy across all the different runs : 0.529692.

 Average per user accuracy averaged over different runs: 
 [[0.5446]
 [0.5203]
 [0.5083]
 [0.5556]
 [0.5297]
 [0.5425]
 [0.5296]
 [0[...]<jupyter_text>Num Epochs: 600<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_600_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_600_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_600_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_600_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_600_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_600_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_600_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_600_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_600_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_600_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5453363990802759, 0.570628811356593, 0.5429914017196561, 0.5276417074877536, 0.5226432070378886]

 Average accuracy across all the different runs : 0.541848.

 Average per user accuracy averaged over different runs: 
 [[0.5612]
 [0.5263]
 [0.521 ]
 [0.5576]
 [0.5369]
 [0.5629]
 [0.5377]
 [0.[...]<jupyter_text>Num Epochs: 800<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_800_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_800_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_800_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_800_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_800_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5630310906727981, 0.5916225132460262, 0.5585882823435313, 0.548335499350195, 0.5429371188643407]

 Average accuracy across all the different runs : 0.560903.

 Average per user accuracy averaged over different runs: 
 [[0.5789]
 [0.5439]
 [0.5373]
 [0.5701]
 [0.5576]
 [0.5779]
 [0.5564]
 [0.[...]<jupyter_text>Num Epochs: 1000<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1000_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1000_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5813256023193042, 0.6083175047485754, 0.5721855628874225, 0.566630010996701, 0.5598320503848845]

 Average accuracy across all the different runs : 0.577658.

 Average per user accuracy averaged over different runs: 
 [[0.5951]
 [0.5598]
 [0.5524]
 [0.5886]
 [0.5794]
 [0.5965]
 [0.5737][...]<jupyter_text>Num Epochs: 1200<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1200_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1200_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1200_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1200_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5884234729581126, 0.6231130660801759, 0.5843831233753249, 0.5752274317704689, 0.5711286614015795]

 Average accuracy across all the different runs : 0.588455.

 Average per user accuracy averaged over different runs: 
 [[0.6054]
 [0.5615]
 [0.5698]
 [0.592 ]
 [0.5924]
 [0.6092]
 [0.584 [...]<jupyter_text>Num Epochs: 1500<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1500_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1500_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_1500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_1500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_1500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_1500_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_1500_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5974207737678696, 0.6320103968809357, 0.5921815636872626, 0.5810256922923123, 0.584924522643207]

 Average accuracy across all the different runs : 0.597513.

 Average per user accuracy averaged over different runs: 
 [[0.6144]
 [0.5685]
 [0.5784]
 [0.6031]
 [0.5991]
 [0.6209]
 [0.5897][...]<jupyter_text>Datasplit-2<jupyter_code># Define the global directory path.
directoryPath = '/home/adgdri/pFedMe/results/'<jupyter_output><empty_output><jupyter_text>Num Epochs: 25<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_25_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_25_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T, 4))<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_25_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_25_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.32100108813928185, 0.26811956413076077, 0.2437268819354194, 0.24020391843262695, 0.29518192722910835]

 Average accuracy across all the different runs : 0.273647.

 Average per user accuracy averaged over different runs: 
 [[0.2831]
 [0.2717]
 [0.2529]
 [0.2345]
 [0.2822]
 [0.2884]
 [0.2538]
 [0.2775][...]<jupyter_text>Num Epochs: 50<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50_dataSplit_2'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % perUserAcc.T)<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.30359085963003263, 0.26552034389683093, 0.24582625212436268, 0.23940423830467814, 0.29518192722910835]

 Average accuracy across all the different runs : 0.269905.

 Average per user accuracy averaged over different runs: 
 [[0.28260379]
 [0.26907898]
 [0.24615437]
 [0.21783808]
 [0.28177729]
 [0.2889[...]<jupyter_text>Datasplit-3  Num Epochs: 50<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T, 4))<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_50_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_50_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_50_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_50_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_50_dataSplit_3
----------------------------------------

 Average accuracies across all the users over different runs : [0.5133577789418544, 0.5217391304347826, 0.5210406844770386, 0.5219137419242186, 0.5233106338397067]

 Average accuracy across all the different runs : 0.520272.

 Average per user accuracy averaged over different runs: 
 [[0.7646]
 [0.5462]
 [0.4798]
 [0.5109]
 [0.7282]
 [0.5557]
 [0.4816]
 [0.5418]
 [0[...]<jupyter_text>Num Epochs: 100<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_100_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_100_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_100_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_100_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_100_dataSplit_3'
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:, -1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T, 4))<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_0_globalIters_100_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_1_globalIters_100_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_2_globalIters_100_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_3_globalIters_100_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.01_avg_roundNum_4_globalIters_100_dataSplit_3
----------------------------------------

 Average accuracies across all the users over different runs : [0.5119608870263663, 0.5165007857517024, 0.5177230661777545, 0.5243583027763227, 0.5213899074559106]

 Average accuracy across all the different runs : 0.518387.

 Average per user accuracy averaged over different runs: 
 [[0.7646]
 [0.5462]
 [0.4798]
 [0.4734]
 [0.7282]
 [0.5557]
 [0.4816]
 [0.5418[...]<jupyter_text>Datasplit - 2<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_1_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_2_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_3_globalIters_1000_dataSplit_2',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_4_globalIters_1000_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_0_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_1_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_2_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_3_globalIters_1000_dataSplit_2
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0025_avg_roundNum_4_globalIters_1000_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.5931220633809857, 0.6175147455763271, 0.5991801639672065, 0.5862241327601719, 0.5679296211136659]

 Average accuracy across all the different runs : 0.592794.

 Average per user accuracy averaged over different runs: 
 [[0.6166]
 [0.5725]
 [0.5729]
 [0.5892]
 [0.595 ]
 [0.6062]
 [0[...]<jupyter_text>Datasplit - 1<jupyter_code>directoryPath = '/home/adgdri/pFedMe/results_oldRuns/tempResults/'
fileNames = [
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_1',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_800_dataSplit_1',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_800_dataSplit_1',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_800_dataSplit_1',
    'Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_800_dataSplit_1',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results_oldRuns/tempResults/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_0_globalIters_800_dataSplit_1
/home/adgdri/pFedMe/results_oldRuns/tempResults/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_1_globalIters_800_dataSplit_1
/home/adgdri/pFedMe/results_oldRuns/tempResults/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_2_globalIters_800_dataSplit_1
/home/adgdri/pFedMe/results_oldRuns/tempResults/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_3_globalIters_800_dataSplit_1
/home/adgdri/pFedMe/results_oldRuns/tempResults/Cifar10_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.001_avg_roundNum_4_globalIters_800_dataSplit_1
----------------------------------------

 Average accuracies across all the users over different runs : [0.7344, 0.675, 0.7351, 0.6594, 0.6437]

 Average accuracy across all the different runs : 0.689520.

 Average per user accuracy averaged over different runs: 
 [[0.7428]
 [0.6412]
 [0.6956]
 [0.[...]<jupyter_text>Datasplit-2<jupyter_code>fileNames = [
    'Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_0_globalIters_800_dataSplit_2',
    'Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_1_globalIters_800_dataSplit_2',
    'Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_2_globalIters_800_dataSplit_2',
    'Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_3_globalIters_800_dataSplit_2',
    'Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_4_globalIters_800_dataSplit_2',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_0_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_1_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_2_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_3_globalIters_800_dataSplit_2
/home/adgdri/pFedMe/results/Mnist_pFedMe_p_0.01_1.0_15_10u_128b_20_5_0.0075_avg_roundNum_4_globalIters_800_dataSplit_2
----------------------------------------

 Average accuracies across all the users over different runs : [0.8736024579670564, 0.8736240293540405, 0.8668601177775881, 0.8685782556750299, 0.868236900494965]

 Average accuracy across all the different runs : 0.870180.

 Average per user accuracy averaged over different runs: 
 [[0.8821]
 [0.8608]
 [0.8536]
 [0.867 ]
 [0.8739]
 [0.8531]
 [0.8795]
 [0.8774][...]<jupyter_text>CIFAR-10 pFedMe paper check<jupyter_code>fileNames = [
    'Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_0_globalIters_800_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_1_globalIters_800_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_2_globalIters_800_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_3_globalIters_800_dataSplit_3',
    'Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_4_globalIters_800_dataSplit_3',
]


# Get the number of users.
numUsers = int(fileNames[0].split('u')[0].split('_')[-1])

avgPersAcc = []
perUserAcc = np.zeros((1, numUsers))

for fileName in fileNames:
    ob = simple_read_data(directoryPath + fileName)
    avgPersAcc.append( ob['rs_glob_acc'][-1] )
    # Take the per user accuracy from the last epoch.
    perUserAcc += ob['perUserAccs'][:,-1, :]

# Average out over the different runs.
perUserAcc /= len(fileNames)


print ('----------------------------------------')

print ('\n Average accuracies across all the users over different runs : %s' % avgPersAcc)

print ('\n Average accuracy across all the different runs : %f.' % np.mean(avgPersAcc) )

print ('\n Average per user accuracy averaged over different runs: \n %s.' % np.round(perUserAcc.T,4))

print ('\n Average accuracy averaged over different runs: \n %s.' % np.mean(np.round(perUserAcc.T,4)) )<jupyter_output>/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_0_globalIters_800_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_1_globalIters_800_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_2_globalIters_800_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_3_globalIters_800_dataSplit_3
/home/adgdri/pFedMe/results/Cifar10_pFedMe_p_0.01_2.0_30_10u_20b_20_5_0.05_avg_roundNum_4_globalIters_800_dataSplit_3
----------------------------------------

 Average accuracies across all the users over different runs : [0.7756242360747337, 0.7815610267155579, 0.7778941854374017, 0.7646237122402654, 0.7726558407543216]

 Average accuracy across all the different runs : 0.774472.

 Average per user accuracy averaged over different runs: 
 [[0.9416]
 [0.7922]
 [0.6437]
 [0.7249]
 [0.7996]
 [0.7745]
 [0.8834]
 [0.8401]
 [0[...]
{'fraction_non_alphanumeric': 0.14375979741951042, 'fraction_numerical': 0.1251055106716508, 'mean_word_length': 4.706785026149188, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '30', 'dir': 'jupyter-structured-clean-dedup', 'id': '335760', 'license': 'MIT', 'n_tokens_mistral': 39824, 'n_tokens_neox': 34622, 'n_words': 5249, 'path': 'pFedMe/Notebooks/pFedMe-Results-Analyzer.ipynb', 'repo_name': 'siddharthdivi/Unifying-Distillation-with-Personalization-in-Federated-Learning', 'size': '82930'}