You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the eofs reconstructedField() function to reconstructing the matrix that decomposed by Eof, but I found that even the neofs is setted as the maximum, I still cannot get the original dataset. I check through out the code, and found that the center value haven't be added back to the reconstruced dataset. Could your help me to make sure that?
# This is the code that I used to do the simple testimportnumpyasnpimportmatplotlib.pyplotaspltfromeofs.standardimportEofa=np.random.randint(-10,10,(10,20))
solver=Eof(a)
reconstructed_data=solver.reconstructedField(solver.neofs)
plt.scatter(a.reshape(-1),reconstructed_data.reshape(-1))
plt.grid()
plt.show()
plt.scatter(a.reshape(-1),(reconstructed_data+a.mean(axis=0)).reshape(-1))
plt.grid()
plt.show()
The text was updated successfully, but these errors were encountered:
I would recommend always removing the mean yourself before passing the array to the solver, the automatic removal is more of a convenience thing. For that reason the subtracted mean is deliberately not stored and added back when reconstructing a field.
Hi,
I have used the eofs reconstructedField() function to reconstructing the matrix that decomposed by Eof, but I found that even the neofs is setted as the maximum, I still cannot get the original dataset. I check through out the code, and found that the center value haven't be added back to the reconstruced dataset. Could your help me to make sure that?
The text was updated successfully, but these errors were encountered: