-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to calculate 3 significance level at the same time #1
Comments
Hi,
Thank you for noticing this. I agree it should not look like this. I remember having some issues with the confidence intervals and I thought they were solved, but apparently there are still some. I will look into this. The problem is certainly in the mtm_svd_conf script.
Please let me know if you find the issue.
I am however confident that the spectrum itself is ok.
Mathilde
…________________________________
From: Liu-Yitao ***@***.***>
Sent: December 6, 2021 7:21 AM
To: mathildejutras/mtm-svd-python ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [mathildejutras/mtm-svd-python] Error when trying to calculate 3 significance level at the same time (Issue #1)
I changed the No.101 line of the origin mtm-svd-python.py file from
sl = [.9]
to
sl = [0.99,0.95,0.9]
[spectrum_1000]<https://user-images.githubusercontent.com/59553921/144842865-69c3f41e-80f4-4819-829a-0d34d2ce2568.png>
The upper pic is the output plot of the spectrum and the confidence level. The lines of confidence intersected.
________________________________
Here is part 2 of the script
# 2) Compute the LVF
print('Apply the MTM-SVD...')
# Slepian tapers
nw = 2; # bandwidth
kk = 3; # number of orthogonal windows
o2 = var.copy().values
# Reshape the 2d array to a 1d array
o2ts = o2.reshape((o2.shape[0],o2.shape[1]*o2.shape[2]), order='F')
p, n = o2ts.shape
# Compute the LFV
[freq, lfv] = mtm_svd_lfv(o2ts,nw,kk,dt)
# Compute the confidence intervals
niter = 10000 # minimum of 1000 iterations
sl = [0.99,0.95,0.9]
[conffreq, conflevel] = mtm_svd_conf(o2ts,nw,kk,dt,niter,sl)
# Display the plot to allow the user to choose the frequencies associated with peaks
plt.plot(freq, lfv, '-', c='k')
plt.plot(conffreq, conflevel[0,:], '--', c='tab:red', label=str(sl[0]))
plt.plot(conffreq, conflevel[1,:], '--', c='tab:orange', label=str(sl[1]))
plt.plot(conffreq, conflevel[2,:], '--', c='tab:blue', label=str(sl[2]))
plt.xlim([0.01,.1])
plt.legend()
plt.savefig(f'./spectrum_{model}{niter}.png')
# plt.show()
plt.clf()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#1>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALY62GZLARU6LA6TEHLG44TUPSTEJANCNFSM5JOPQILA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I changed the No.101 line of the origin mtm-svd-python.py file from
to
The upper pic is the output plot of the spectrum and the confidence level. The lines of confidence intersected.
Here is part 2 of the script
The text was updated successfully, but these errors were encountered: