Skip to content

Commit

Permalink
Updated HMM emission parameters and rerun HMM validation script
Browse files Browse the repository at this point in the history
  • Loading branch information
kcajj committed Jan 22, 2025
1 parent 5e8035d commit 56646e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions run_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ HMM_parameters:
B: "0.99996"
emission_probability:
A:
0: "0.967"
1: "0.03"
2: "0.003"
0: "0.972"
1: "0.027"
2: "0.001"
B:
0: "0.967"
1: "0.003"
2: "0.03"
0: "0.972"
1: "0.001"
2: "0.027"

optimization_recombination_parameter:
flag: true
Expand Down
12 changes: 6 additions & 6 deletions test/model_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

initial_p={"A":0.5,"B":0.5}

transition_p_froma={"A":0.99999,"B":0.00001}
transition_p_fromb={"A":0.00001,"B":0.99999}
transition_p_froma={"A":0.99996,"B":0.00004}
transition_p_fromb={"A":0.00004,"B":0.99996}

emission_p_froma={".":0.967,"a":0.03,"b":0.003}
emission_p_fromb={".":0.967,"a":0.003,"b":0.03}
emission_p_froma={".":0.972,"a":0.027,"b":0.001}
emission_p_fromb={".":0.972,"a":0.001,"b":0.027}

ip_np=np.array(list(initial_p.values()))
tp_np=np.array([list(transition_p_froma.values()),
Expand Down Expand Up @@ -76,6 +76,6 @@
print(np.mean(accuracies))

'''
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9991000899910009, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.991700414979251, 1.0, 1.0, 1.0, 1.0, 0.9957502124893756, 1.0, 1.0, 1.0, 1.0, 0.9999333355554815, 1.0, 1.0, 0.9968001066631113, 1.0, 0.9995333488883704, 1.0, 0.9961750956226094, 0.9997250068748281, 0.997000074998125, 1.0, 0.9984750381240469, 1.0, 0.9981000474988125, 0.9978250543736407, 1.0, 0.99910001799964, 1.0, 1.0, 1.0, 1.0, 0.999720005599888, 0.998940021199576, 1.0, 0.999560008799824, 1.0, 1.0, 0.9998000033332778, 1.0, 0.9997166713888102, 1.0, 1.0, 0.9989833502774954, 1.0, 0.9997666705554907, 1.0, 0.9993285810202711, 1.0, 0.999600005714204, 0.9995428636733761, 1.0, 1.0, 0.999800002857102, 1.0, 1.0, 1.0, 0.999737503281209, 1.0, 1.0, 0.9990625117186035, 1.0, 1.0, 1.0, 0.9999625004687441, 0.9999125010937363, 1.0, 0.9997777802468861, 0.9997888912345418, 1.0, 0.9998888901234431, 1.0, 1.0, 1.0, 0.9993000077776913, 0.9993777846912812, 1.0, 1.0, 0.999610003899961, 0.999580004199958, 0.999970000299997, 0.999840001599984, 0.99940000599994, 1.0, 0.999650003499965, 1.0, 1.0, 0.9999363642148708, 1.0, 1.0, 0.9998090926446124, 1.0, 0.9994909137189661, 0.9998000018181653, 0.9990909173552968, 0.9999636366942118, 0.9994545504131781, 1.0, 0.9997416688194265, 0.9986750110415746, 0.9991666736110533, 0.9985000124998958, 0.9992083399305006, 0.9990583411804902, 1.0, 1.0, 0.9999000008333264, 0.9979000161537219, 0.9978307859170314, 1.0, 0.9997461557988016, 1.0, 0.999861539526619, 1.0, 0.9993615433727433, 0.999300005384574, 0.9987153944969654, 0.9991642916836309, 0.9988857222448411, 1.0, 0.9990357211734202, 0.9999000007142806, 0.9997214305612103, 0.999921429132649, 0.9972357340304712, 1.0, 1.0]
0.9995514979541436
[0.9976002399760024, 1.0, 1.0, 1.0, 1.0, 0.9948005199480052, 1.0, 1.0, 1.0, 1.0, 0.9958002099895005, 1.0, 1.0, 0.9935503224838758, 1.0, 0.9957502124893756, 1.0, 1.0, 0.9945502724863757, 0.9943502824858758, 0.9981667277757408, 0.9985667144428519, 0.999600013332889, 0.9998333388887037, 0.9960667977734076, 0.9988333722209259, 0.9991333622212593, 0.9993000233325556, 0.9993333555548148, 1.0, 1.0, 0.9978750531236719, 1.0, 1.0, 0.9984750381240469, 0.9986750331241719, 0.995800104997375, 0.999800004999875, 1.0, 1.0, 1.0, 0.999220015599688, 0.998640027199456, 0.999840003199936, 1.0, 0.996820063598728, 0.99970000599988, 1.0, 1.0, 1.0, 1.0, 0.9991833469442176, 1.0, 0.9980833652772454, 0.9998833352777454, 0.9962000633322778, 0.9999333344444259, 0.9986666888885185, 0.9980833652772454, 0.998683355277412, 1.0, 0.9993714375508921, 1.0, 0.9970857559177726, 0.9994000085713062, 0.9988857302038542, 0.9991857259182012, 0.9975714632648105, 0.9993428665304781, 0.9948857873458951, 1.0, 0.9990875114061074, 0.9999125010937363, 0.9987875151560606, 0.9991125110936113, 0.9941750728115899, 0.9986375170310371, 0.9998000024999687, 0.9983000212497344, 0.9989250134373321, 1.0, 0.9959444895056722, 0.9988000133331851, 0.9980444661725981, 0.9983889067899245, 0.9995444495061167, 0.9968444795057833, 0.9995444495061167, 0.9995333385184609, 0.9960889323451961, 0.998720012799872, 0.998460015399846, 0.997130028699713, 0.999650003499965, 0.999150008499915, 0.997930020699793, 0.998430015699843, 0.997260027399726, 0.997030029699703, 0.996380036199638, 0.9990454632230616, 0.999709093553695, 0.996336396941846, 0.9995363678512014, 0.9987818292560977, 0.9989454641321442, 0.9993000063635785, 0.9990454632230616, 0.9986454668593922, 0.9984091053717693, 0.9996833359722003, 0.9981250156248698, 0.9984750127082275, 0.9970083582636812, 0.9994166715277373, 0.9995083374305214, 0.9970333580553495, 0.9997916684027633, 0.9981416821526488, 0.9989250089582586, 0.999346158875701, 0.9985230882839363, 0.9982846285797802, 0.9979538618933701, 0.9985461650294998, 0.9988307782247828, 0.9995230805916877, 0.999630772070984, 0.9984846270413305, 0.9961231067453328, 0.9975285890815065, 0.9984500110713495, 0.9978357297447875, 0.9961143134691895, 0.9977643016835595, 0.9971071635202605, 0.9983500117856301, 0.9978214441325419, 0.9960643138263298, 0.9990142927550517]
0.9985664119945016
'''

0 comments on commit 56646e5

Please sign in to comment.