Skip to content
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

Percentiles Bayes Plot for QMM #44

Open
greenTara opened this issue Dec 6, 2016 · 32 comments
Open

Percentiles Bayes Plot for QMM #44

greenTara opened this issue Dec 6, 2016 · 32 comments

Comments

@greenTara
Copy link
Collaborator

Let's start with delta = 0 to verify we get the same as the MM plot.

We also need to add a plot underneath with the same horizontal scale showing the value of mu at the estimation time.

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 8, 2016

@greenTara
Copy link
Collaborator Author

greenTara commented Dec 8, 2016

Is this plot for a single model (numruns = 1)?
Please print out all parameters and include in the comment with the plot, includling the additional parameters for the QMM model. I don't see any parameters in the attached text file.

@greenTara
Copy link
Collaborator Author

greenTara commented Dec 8, 2016

The QMM parameters include:

tauquasi
edgewidth
edgeshift
gammamin
gammamax
delta
gamma

@greenTara
Copy link
Collaborator Author

The decile plot itself looks like it is working ok for delta = 0.

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 8, 2016

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 8, 2016

Deciles_Bayes_QMM_Mu.pdf

For a test, I executed the script with num_trajectories=5, numsims=1.
Deciles_Bayes_QMM_Mu.pdf

@alexlafleur
Copy link
Collaborator

@alexlafleur
Copy link
Collaborator

@alexlafleur
Copy link
Collaborator

@alexlafleur
Copy link
Collaborator

Edgeshift=8
Tauquasi=4
num_estimations_min=2
Deciles_Bayes_QMM_Mu.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Edgeshift=64
Tauquasi=4
num_estimations_min=5

Deciles_Bayes_QMM_Mu.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

@alexlafleur
Copy link
Collaborator

With random seed 1101
num_estimations_min=7
Deciles_Bayes_QMM_Mu_Delta_0.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 8, 2016

With random seed 1101
num_estimations_min=7
Deciles_Bayes_QMM_Mu_Delta_0_1.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Edgeshift=52
With random seed 1101
num_estimations_min=7
Deciles_Bayes_QMM_Mu_Delta_0.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Edgeshift=48
With random seed 1101
num_estimations_min=9
Deciles_Bayes_QMM_Mu_Delta_0.1.pdf
evaluate_deciles_qmm_mu.txt

@greenTara
Copy link
Collaborator Author

Some plots to generate:

Delta: 0.2, 0.5, 1.0
with all other factors the same.

Also with these values of delta,
Edgewidth = 8, 64, 256

@alexlafleur
Copy link
Collaborator

Delta=0.2
Edgewidth = 8
Deciles_Bayes_QMM_Mu_Delta_0.2.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Delta=0.5
Edgewidth = 64
Deciles_Bayes_QMM_Mu_Delta_0.5.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Delta=1
Edgewidth=256

[Deciles_Bayes_QMM_Mu_Delta_1.pdf](https://github.com/ag-csw/LDStreamHMMLearn/files/642053
/Deciles_Bayes_QMM_Mu_Delta_1.pdf)
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Delta = 1
Edgewidth=4
Num_trajs=8
Deciles_Bayes_QMM_Mu_Delta_1.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

Delta=0.5
Edgewidth=4
Num_trajs=8
Deciles_Bayes_QMM_Mu_Delta_0.5.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 9, 2016

Delta=0.2
Edgewidth=4
Num_trajs=8
Deciles_Bayes_QMM_Mu_Delta_0.2.pdf
evaluate_deciles_qmm_mu.txt

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 9, 2016

Deciles_Bayes_QMM_Mu_Delta_0.2.pdf

Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 96
Gammamin: 1
Gammamax: 1.01
Delta: 0.2
Gamma: 1.00837315683
Simulating data
num_trajectories = 256
numsims = 32
num_trajs per simulation = 8
Parameter Overview:
taumeta: 4
tauquasi: 4
eta: 16
scale_window : 16
shift: 64
window_size: 1024
num_estimations: 34
len_trajectory: 3201
num_trajectories: 8
num_trajectorieslen_trajectory: 25608
NAIVE window_size * num_estimations 35840
BAYES window_size + num_estimations
shift 3200

@alexlafleur
Copy link
Collaborator

Deciles_Bayes_QMM_Mu_Delta_0.2.pdf
Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 128
Gammamin: 1
Gammamax: 1.01
Delta: 0.2
Gamma: 1.00837315683
Simulating data
num_trajectories = 256
numsims = 32
num_trajs per simulation = 8
Parameter Overview:
taumeta: 4
tauquasi: 4
eta: 16
scale_window : 16
shift: 64
window_size: 1024
num_estimations: 48
len_trajectory: 4097
num_trajectories: 8
num_trajectorieslen_trajectory: 32776
NAIVE window_size * num_estimations 50176
BAYES window_size + num_estimations
shift 4096

@alexlafleur
Copy link
Collaborator

Deciles_Bayes_QMM_Mu_Delta_0.pdf
Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 128
Gammamin: 1
Gammamax: 1.01
Delta: 0
Gamma: 1.00713131633
Simulating data
num_trajectories = 256
numsims = 32
num_trajs per simulation = 8
Parameter Overview:
taumeta: 4
tauquasi: 4
eta: 16
scale_window : 16
shift: 64
window_size: 1024
num_estimations: 48
len_trajectory: 4097
num_trajectories: 8
num_trajectorieslen_trajectory: 32776
NAIVE window_size * num_estimations 50176
BAYES window_size + num_estimations
shift 4096

@alexlafleur
Copy link
Collaborator

Current Time 1023
Mu at Current Time 7.16093850883e-15
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1087
Mu at Current Time 5.30686605771e-14
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1151
Mu at Current Time 3.92130772298e-13
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1215
Mu at Current Time 2.89762658312e-12
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1279
Mu at Current Time 2.14106510299e-11
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1343
Mu at Current Time 1.58204616074e-10
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1407
Mu at Current Time 1.1689825774e-09
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1471
Mu at Current Time 8.63767796178e-09
TM at Current Time [[ 0.93620659 0.02020545 0.03760997 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1535
Mu at Current Time 6.38242834139e-08
TM at Current Time [[ 0.93620659 0.02020545 0.03760997 0.00597798]

@alexlafleur
Copy link
Collaborator

Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 128
Gammamin: 1
Gammamax: 1.01
Delta: 0.2
Gamma: 1.00837315683
Simulating data
num_trajectories = 256
numsims = 32
num_trajs per simulation = 8
Parameter Overview:
taumeta: 4
tauquasi: 4
eta: 16
scale_window : 16
shift: 64
window_size: 1024
num_estimations: 48
len_trajectory: 4097
num_trajectories: 8
num_trajectorieslen_trajectory: 32776
NAIVE window_size * num_estimations 50176
BAYES window_size + num_estimations
shift 4096

Current Time 1023
Mu at Current Time 7.16093850883e-15
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1087
Mu at Current Time 5.30686605771e-14
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1151
Mu at Current Time 3.92130772298e-13
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1215
Mu at Current Time 2.89762658312e-12
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1279
Mu at Current Time 2.14106510299e-11
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1343
Mu at Current Time 1.58204616074e-10
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1407
Mu at Current Time 1.1689825774e-09
TM at Current Time [[ 0.93620659 0.02020545 0.03760998 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1471
Mu at Current Time 8.63767796178e-09
TM at Current Time [[ 0.93620659 0.02020545 0.03760997 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]
Current Time 1535
Mu at Current Time 6.38242834139e-08
TM at Current Time [[ 0.93620659 0.02020545 0.03760997 0.00597798]
[ 0.07053943 0.88780283 0.03583715 0.0058206 ]
[ 0.05236292 0.0241041 0.91465715 0.00887582]
[ 0.04702273 0.02403464 0.05817443 0.8707682 ]]

Mean Error Values: [0.026900390407634679, 0.026487959547234659, 0.026371743540016215, 0.026058675413958891, 0.026341695692404209, 0.026085129241899763, 0.026181652870564807, 0.026301357226336385, 0.026490314244742075, 0.027263698145661892, 0.026708046028690102, 0.027093521638468232, 0.026705168211816645, 0.026281696662821624, 0.026359483098434149, 0.026735609953965098, 0.026203569309121384, 0.026207115910270078, 0.026454542385539435, 0.026284778203748908, 0.026231035943473601, 0.025639438931464635, 0.025449511192637747, 0.026666827867684137, 0.027177702600081177, 0.027399698155350191, 0.027324393281464188, 0.027369350145145143, 0.027542970055314787, 0.027226917288331851, 0.025026575528892869, 0.019260776899486874, 0.017478008144701913, 0.018087178714074965, 0.017751302081677252, 0.017334221290740214, 0.017327483234945141, 0.017454255014777761, 0.016406343533274872, 0.016396225064162918, 0.016993315694030106, 0.016707418129165819, 0.016579936105311194, 0.015692355106793131, 0.016092772051300337, 0.016656757792221002, 0.016304742902234229, 0.016496414634735383, 0.015886500740220157]

@alexlafleur
Copy link
Collaborator

Deciles_Bayes_QMM_Mu_Delta_0.2.pdf
Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 256
Gammamin: 1
Gammamax: 1.01
Delta: 0.2
Gamma: 1.00837315683
Simulating data
num_trajectories = 256
numsims = 32
num_trajs per simulation = 8
Parameter Overview:
taumeta: 4
tauquasi: 4
eta: 16
scale_window : 16
shift: 64
window_size: 1024
num_estimations: 48
len_trajectory: 4097
num_trajectories: 8
num_trajectorieslen_trajectory: 32776
NAIVE window_size * num_estimations 50176
BAYES window_size + num_estimations
shift 4096

@alexlafleur
Copy link
Collaborator

@alexlafleur
Copy link
Collaborator

alexlafleur commented Dec 9, 2016

@greenTara
Copy link
Collaborator Author

greenTara commented Dec 16, 2016

I made some changes in parameter handling, but the main fix is to include the scaling by tauquasi when the data is simulated. Now the error behaves the way it is supposed to, that is it is close to the predicted formula except in a region around the non-stationary behavior that has a buffer of about window_size.

Deciles_Bayes_QMM_Mu_Delta_1.0.pdf

Numruns 1
Statconc: [ 1. 1. 1. 1.]
Timescaledisp: 2
Edgewidth: 4
Edgeshift: 64
Gammamin: 1
Gammamax: 1.01
Delta: 1.0
Gamma: 1.00222097524
Simulating data
num_trajectories = 512
numsims = 32
num_trajs per simulation = 16
Parameter Overview:
taumeta: 4
lag: 1
tauquasi: 8
eta: 8
scale_window : 8
shift: 32
window_size: 256
num_estimations: 128
len_trajectory: 4353
num_trajectories: 16
num_trajectorieslen_trajectory: 69648
NAIVE window_size * num_estimations 33024
BAYES window_size + num_estimations
shift 4352

Transition Matrix Error Calc: [[ 0.83971433 0.06173242 0.0596093 0.03894396]
[ 0.01116055 0.92779761 0.04130821 0.01973363]
[ 0.02699801 0.03281698 0.88764996 0.05253506]
[ 0.02560979 0.05728527 0.07012157 0.84698338]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants