Skip to content

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
JKomorniczak committed Nov 7, 2023
1 parent bff6877 commit c354c7f
Show file tree
Hide file tree
Showing 6 changed files with 17,227 additions and 17,224 deletions.
11 changes: 7 additions & 4 deletions E_MOA_2P.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@

res = np.load('results/moa_clf.npy') # measures, datasets, reps, folds, clfs

res_mean = np.mean(res, axis=2)
print(res_mean.shape)
print(res.shape)
res = res.reshape(9,4,3,10,5)

fig, ax = plt.subplots(4, 3, figsize=(10,20), sharex=True, sharey=True)
res_mean = np.mean(res, axis=(2,3))


fig, ax = plt.subplots(2, 2, figsize=(8,10), sharex=True, sharey=True)
ax=ax.ravel()
plt.suptitle('MOA', fontsize=18, y=0.99)

for dataset_id, dataset in enumerate(streams):
for dataset_id, dataset in enumerate(['RBF', 'LED', 'HYPERPLANE', 'SEA']):

axx = ax[dataset_id]

Expand Down
10 changes: 5 additions & 5 deletions E_MOA_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
res = np.load('results/combined_moa_%i.npy' % i)
res_all.append(res)

res = np.array(res_all).reshape(3,4,119,500)
print(res.shape) # reps, types, features+label, chunks
res = np.array(res_all).reshape(4,3,119,500)
print(res.shape) # types, reps, features+label, chunks

X = res[:,:,indexes]
print(X.shape)# reps, types, selected features, chunks
print(X.shape)# types, reps, selected features, chunks

types = ['RBF', 'LED', 'HYPERPLANE', 'SEA']

Expand All @@ -33,7 +33,7 @@

for rep in range(3):

X_all = X[rep, t]
X_all = X[t, rep]

for a in range(len(labels)):
X_all[a] -= np.mean(X_all[a])
Expand Down Expand Up @@ -69,7 +69,7 @@
covs = []
for rep in range(3):

X_temp = X_w[rep, t]
X_temp = X_w[t, rep]

for a in range(len(labels)):
X_temp[a] -= np.mean(X_temp[a])
Expand Down
Binary file modified figures/fig_clf/MOA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c354c7f

Please sign in to comment.