noshot 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- noshot/__init__.py +1 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(A) Breadth First Search.ipynb +112 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(B) Depth First Search.ipynb +111 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(C) Uniform Cost Search.ipynb +134 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(D) Depth Limites Search.ipynb +115 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(E) Iterative Deepening DFS.ipynb +123 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/2_ANOVA.csv +769 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA (Repeated Measure).ipynb +126 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA.ipynb +134 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Sample 1 Way ANOVA Test.ipynb +119 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Two Way ANOVA.ipynb +138 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/reaction_time.csv +5 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sample_data.csv +16 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sleep_deprivation.csv +4 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/3_Linear.csv +4802 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression LAB.ipynb +113 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression New- sklearn.ipynb +118 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression.ipynb +148 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/house_rate.csv +22 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression New- sklearn.ipynb +128 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression.ipynb +145 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/default.csv +1001 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/hours_scores_records.csv +101 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(A) Astar.ipynb +256 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(B) IDAstar.ipynb +157 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(C) SMAstar.ipynb +178 -0
- noshot/data/AIDS CN NLP/AIDS/3. Genetic Algorithm/Genetic.ipynb +95 -0
- noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Simulated Annealing.ipynb +74 -0
- noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Sudoku Simulated Annealing.ipynb +103 -0
- noshot/data/AIDS CN NLP/AIDS/5. Alpha Beta Pruning/AlphaBetaPruning.ipynb +182 -0
- noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(A) CSP House Allocation.ipynb +120 -0
- noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(B) CSP Map Coloring.ipynb +125 -0
- noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/Random Sampling.ipynb +73 -0
- noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test Hash Function.ipynb +141 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test.ipynb +151 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/1_heart.csv +304 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/Independent T Test.ipynb +119 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/Paired T Test.ipynb +118 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test Hash Function.ipynb +142 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test.ipynb +158 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/iq_test.csv +0 -0
- noshot/data/AIDS CN NLP/AIDS/Others (AllinOne)/All In One.ipynb +4581 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/chat.java +81 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/LAN.tcl +65 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/analysis.awk +44 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/complexdcf.tcl +229 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/file_to_send.txt +2 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/filetransfer.java +119 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/rmi.java +56 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.awk +25 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.tcl +81 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.awk +27 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.tcl +153 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/analysis.awk +27 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/sack.tcl +86 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/vegas.tcl +86 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/analysis.awk +28 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/reno.tcl +78 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/tahoe.tcl +79 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/analysis.awk +27 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/flow.tcl +163 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/DV.tcl +111 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/LS.tcl +106 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/analysis.awk +36 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/analysis.awk +20 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/broadcast.tcl +76 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/multicast.tcl +103 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/DHCP.java +125 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/procedure.png +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/1-Prereqs.py +18 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/2-Chi2test.py +83 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/2-T-test.py +79 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/3-WSD-nb.py +53 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/4-Hindle-Rooth.py +53 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/5-HMM-Trellis.py +82 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/6-HMM-Viterbi.py +16 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/7-PCFG-parsetree.py +15 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Chi2test.ipynb +285 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Hindle-Rooth.ipynb +179 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 10 - Text generator using LSTM.ipynb +1461 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 11 NMT.ipynb +2307 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/PCFG.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Prereqs.ipynb +131 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/T test.ipynb +252 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/TFIDF BOW.ipynb +171 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Trellis.ipynb +244 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/WSD.ipynb +645 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Word2Vec.ipynb +93 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/tokenizer.ipynb +370 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/training_tokenizer.txt +6 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/exp0.ipynb +274 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/lab2.ipynb +905 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/test.txt +1 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/tokenizing.ipynb +272 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/collocation.ipynb +332 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/lab3.ipynb +549 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/nlp.txt +1 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/Lab4-NLP-Exp-2.ipynb +817 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/collocation.ipynb +332 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/NLP-Lab-5-Exp3.ipynb +231 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/word-sense-disambiguation.ipynb +507 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab06(additional-exercise)/lab6.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP Exp 4.ipynb +255 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP_Exp_5.ipynb +159 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab08(PCFG)/PCFG.ipynb +282 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/Lab 9 - MLP classifier.ipynb +670 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/MLP-alternative-code.ipynb +613 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/hindle-rooth-algorithm.ipynb +74 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab10(LSTM)/Lab_10_Text_generator_using_LSTM.ipynb +480 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Machine-translation.ipynb +445 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Viterbi-PCFG.ipynb +105 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/corpora_tools.py +87 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/data_utils.py +11 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/train_translator.py +83 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab12(Information-Extraction)/Information_Extraction.ipynb +201 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Backtrack-without-Verbitri.ipynb +185 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Backward-Procedure.ipynb +597 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Bag_of.ipynb +1422 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/CYK-algorithm.ipynb +1067 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Forward-Procedure.ipynb +477 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/LSTM.ipynb +1290 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 10 - Text generator using LSTM.ipynb +1461 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 11 NMT.ipynb +2307 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-4.ipynb +216 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-5.ipynb +216 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/abc.txt +6 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/ex-1-nltk.ipynb +711 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/ex-2-nlp.ipynb +267 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/exp8&9.ipynb +305 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/hind.ipynb +287 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/lab66.ipynb +752 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/leb_3.ipynb +612 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/naive_bayes_classifier.pkl +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_1.ipynb +3008 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_2.ipynb +3095 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlplab-9.ipynb +295 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nltk-ex-4.ipynb +506 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text1.txt +48 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text2.txt +8 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text3.txt +48 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/translation-rnn.ipynb +812 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/word2vector.ipynb +173 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Backward Procedure Algorithm.ipynb +179 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Chi Square Collocation.ipynb +208 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Collocation (T test).ipynb +188 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Experiment 1.ipynb +437 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Forward Procedure Algorithm.ipynb +132 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Hindle Rooth.ipynb +414 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/MachineTranslation.ipynb +368 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using MLPClassifier.ipynb +86 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using Tensorflow.ipynb +112 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/PCFG Inside Probability.ipynb +451 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Text Generation using LSTM.ipynb +297 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Viterbi.ipynb +310 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Word Sense Disambiguation.ipynb +335 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/10.Text Generation using LSTM.ipynb +316 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/11.Machine Translation.ipynb +868 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/2.T and Chi2 Test.ipynb +204 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/3.Word Sense Diambiguation.ipynb +234 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/4.Hinddle and Rooth.ipynb +128 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/5.Forward and Backward.ipynb +149 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/6.Viterbi.ipynb +111 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG Parse Tree.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG using cyk.ipynb +101 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/8.Bag of words and TF-IDF.ipynb +310 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/9.Word2Vector.ipynb +78 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/NLP ALL In One.ipynb +2619 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/sample1.txt +15 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/sample2.txt +4 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/word2vec_model.bin +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/1. Tokenize, Tagging, NER, Parse Tree.ipynb +312 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/2. T Test and Chi2 Test.ipynb +185 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/3. Naive Bayes WSD.ipynb +199 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/4. Hinddle and Rooth.ipynb +151 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/5 and 6 FWD, BWD, Viterbi.ipynb +164 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/7. PCFG using CYK.ipynb +383 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/8. BOW and TF-IDF.ipynb +252 -0
- noshot/data/AIDS CN NLP/Ubuntu CN Lab.iso +0 -0
- noshot/main.py +47 -0
- noshot-0.1.0.dist-info/LICENSE.txt +21 -0
- noshot-0.1.0.dist-info/METADATA +65 -0
- noshot-0.1.0.dist-info/RECORD +210 -0
- noshot-0.1.0.dist-info/WHEEL +5 -0
- noshot-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,477 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": 1,
|
6
|
+
"id": "066dae08-5367-4db1-a54a-a52f4c9a1879",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [
|
9
|
+
{
|
10
|
+
"name": "stdin",
|
11
|
+
"output_type": "stream",
|
12
|
+
"text": [
|
13
|
+
"Enter the states (comma-separated): cp,ip\n",
|
14
|
+
"Enter the possible observations (comma-separated): lem,icet,cola\n",
|
15
|
+
"Enter the observation sequence as space-separated names (options: ['lem', 'icet', 'cola']): lem icet cola\n"
|
16
|
+
]
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "stdout",
|
20
|
+
"output_type": "stream",
|
21
|
+
"text": [
|
22
|
+
"\n",
|
23
|
+
"Enter the state transition probabilities:\n"
|
24
|
+
]
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "stdin",
|
28
|
+
"output_type": "stream",
|
29
|
+
"text": [
|
30
|
+
"P(cp | cp): 0.7\n",
|
31
|
+
"P(ip | cp): 0.5\n",
|
32
|
+
"P(cp | ip): 0.3\n",
|
33
|
+
"P(ip | ip): 0.5\n"
|
34
|
+
]
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "stdout",
|
38
|
+
"output_type": "stream",
|
39
|
+
"text": [
|
40
|
+
"\n",
|
41
|
+
"Enter the emission probabilities:\n"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "stdin",
|
46
|
+
"output_type": "stream",
|
47
|
+
"text": [
|
48
|
+
"P(lem | cp): 0.3\n",
|
49
|
+
"P(icet | cp): 0.1\n",
|
50
|
+
"P(cola | cp): 0.6\n",
|
51
|
+
"P(lem | ip): 0.2\n",
|
52
|
+
"P(icet | ip): 0.7\n",
|
53
|
+
"P(cola | ip): 0.1\n"
|
54
|
+
]
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "stdout",
|
58
|
+
"output_type": "stream",
|
59
|
+
"text": [
|
60
|
+
"\n",
|
61
|
+
"Enter the initial state probabilities (comma-separated):\n"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "stdin",
|
66
|
+
"output_type": "stream",
|
67
|
+
"text": [
|
68
|
+
"Enter initial probabilities for ['cp', 'ip']: 1.0,0.0\n"
|
69
|
+
]
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"name": "stdout",
|
73
|
+
"output_type": "stream",
|
74
|
+
"text": [
|
75
|
+
"\n",
|
76
|
+
"Forward Matrix:\n",
|
77
|
+
" [[0.3 0.021 0.02772]\n",
|
78
|
+
" [0. 0.105 0.0063 ]]\n",
|
79
|
+
"Probability of the observation sequence: 0.034019999999999995\n"
|
80
|
+
]
|
81
|
+
}
|
82
|
+
],
|
83
|
+
"source": [
|
84
|
+
"import numpy as np\n",
|
85
|
+
"\n",
|
86
|
+
"# Step 1: Define states and observations based on user input\n",
|
87
|
+
"states = list(map(str.strip, input(\"Enter the states (comma-separated): \").split(',')))\n",
|
88
|
+
"observations = list(map(str.strip, input(\"Enter the possible observations (comma-separated): \").split(',')))\n",
|
89
|
+
"\n",
|
90
|
+
"# Step 2: Get user input for the observation sequence\n",
|
91
|
+
"observation_seq = list(map(str.strip, input(f\"Enter the observation sequence as space-separated names (options: {observations}): \").split()))\n",
|
92
|
+
"\n",
|
93
|
+
"# Step 3: Convert observation sequence to indices\n",
|
94
|
+
"try:\n",
|
95
|
+
" observation_indices = [observations.index(obs) for obs in observation_seq]\n",
|
96
|
+
"except ValueError as e:\n",
|
97
|
+
" print(f\"Error: {e}. Please make sure your observation sequence contains only valid options: {observations}.\")\n",
|
98
|
+
" exit()\n",
|
99
|
+
"\n",
|
100
|
+
"# Step 4: Get user input for the transition matrix\n",
|
101
|
+
"print(\"\\nEnter the state transition probabilities:\")\n",
|
102
|
+
"transition_matrix = np.zeros((len(states), len(states)))\n",
|
103
|
+
"for i in range(len(states)):\n",
|
104
|
+
" for j in range(len(states)):\n",
|
105
|
+
" transition_matrix[i, j] = float(input(f\"P({states[j]} | {states[i]}): \"))\n",
|
106
|
+
"\n",
|
107
|
+
"# Step 5: Get user input for the emission matrix\n",
|
108
|
+
"print(\"\\nEnter the emission probabilities:\")\n",
|
109
|
+
"emission_matrix = np.zeros((len(states), len(observations)))\n",
|
110
|
+
"for i in range(len(states)):\n",
|
111
|
+
" for j in range(len(observations)):\n",
|
112
|
+
" emission_matrix[i, j] = float(input(f\"P({observations[j]} | {states[i]}): \"))\n",
|
113
|
+
"\n",
|
114
|
+
"# Step 6: Set initial state probabilities (ask the user to input them)\n",
|
115
|
+
"initial_probabilities = np.zeros(len(states))\n",
|
116
|
+
"print(\"\\nEnter the initial state probabilities (comma-separated):\")\n",
|
117
|
+
"initial_probabilities = list(map(float, input(f\"Enter initial probabilities for {states}: \").split(',')))\n",
|
118
|
+
"\n",
|
119
|
+
"# Step 7: Forward Procedure\n",
|
120
|
+
"def forward_procedure(observation_seq, transition_matrix, emission_matrix, initial_probabilities):\n",
|
121
|
+
" num_states = len(transition_matrix)\n",
|
122
|
+
" num_observations = len(observation_seq)\n",
|
123
|
+
" \n",
|
124
|
+
" # Initialize the forward matrix\n",
|
125
|
+
" forward_matrix = np.zeros((num_states, num_observations))\n",
|
126
|
+
" \n",
|
127
|
+
" # Initialization step\n",
|
128
|
+
" for i in range(num_states):\n",
|
129
|
+
" forward_matrix[i, 0] = initial_probabilities[i] * emission_matrix[i, observation_seq[0]]\n",
|
130
|
+
" \n",
|
131
|
+
" # Recursion step\n",
|
132
|
+
" for t in range(1, num_observations):\n",
|
133
|
+
" for j in range(num_states):\n",
|
134
|
+
" forward_matrix[j, t] = sum(forward_matrix[i, t - 1] * transition_matrix[i, j] for i in range(num_states)) * emission_matrix[j, observation_seq[t]]\n",
|
135
|
+
" \n",
|
136
|
+
" # Termination step\n",
|
137
|
+
" prob_observation = sum(forward_matrix[i, num_observations - 1] for i in range(num_states))\n",
|
138
|
+
" \n",
|
139
|
+
" return forward_matrix, prob_observation\n",
|
140
|
+
"\n",
|
141
|
+
"# Step 8: Compute the forward matrix and the probability of the observation sequence\n",
|
142
|
+
"forward_matrix, prob_observation = forward_procedure(observation_indices, transition_matrix, emission_matrix, initial_probabilities)\n",
|
143
|
+
"\n",
|
144
|
+
"# Display the results\n",
|
145
|
+
"print(\"\\nForward Matrix:\\n\", forward_matrix)\n",
|
146
|
+
"print(\"Probability of the observation sequence:\", prob_observation)"
|
147
|
+
]
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"cell_type": "code",
|
151
|
+
"execution_count": 2,
|
152
|
+
"id": "c414199a-30b3-40bf-9e1e-f64ce2c930ea",
|
153
|
+
"metadata": {},
|
154
|
+
"outputs": [
|
155
|
+
{
|
156
|
+
"name": "stdin",
|
157
|
+
"output_type": "stream",
|
158
|
+
"text": [
|
159
|
+
"Enter the states (comma-separated): 1,2,3\n",
|
160
|
+
"Enter the possible observations (comma-separated): up,down,unchanged\n",
|
161
|
+
"Enter the observation sequence as space-separated names (options: ['up', 'down', 'unchanged']): up up up up up\n"
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"name": "stdout",
|
166
|
+
"output_type": "stream",
|
167
|
+
"text": [
|
168
|
+
"\n",
|
169
|
+
"Enter the state transition probabilities:\n"
|
170
|
+
]
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"name": "stdin",
|
174
|
+
"output_type": "stream",
|
175
|
+
"text": [
|
176
|
+
"P(1 | 1): 0.6\n",
|
177
|
+
"P(2 | 1): 0.2\n",
|
178
|
+
"P(3 | 1): 0.2\n",
|
179
|
+
"P(1 | 2): 0.5\n",
|
180
|
+
"P(2 | 2): 0.3\n",
|
181
|
+
"P(3 | 2): 0.2\n",
|
182
|
+
"P(1 | 3): 0.4\n",
|
183
|
+
"P(2 | 3): 0.1\n",
|
184
|
+
"P(3 | 3): 0.5\n"
|
185
|
+
]
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"name": "stdout",
|
189
|
+
"output_type": "stream",
|
190
|
+
"text": [
|
191
|
+
"\n",
|
192
|
+
"Enter the emission probabilities:\n"
|
193
|
+
]
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"name": "stdin",
|
197
|
+
"output_type": "stream",
|
198
|
+
"text": [
|
199
|
+
"P(up | 1): 0.7\n",
|
200
|
+
"P(down | 1): 0.1\n",
|
201
|
+
"P(unchanged | 1): 0.2\n",
|
202
|
+
"P(up | 2): 0.1\n",
|
203
|
+
"P(down | 2): 0.6\n",
|
204
|
+
"P(unchanged | 2): 0.3\n",
|
205
|
+
"P(up | 3): 0.3\n",
|
206
|
+
"P(down | 3): 0.3\n",
|
207
|
+
"P(unchanged | 3): 0.4\n"
|
208
|
+
]
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"name": "stdout",
|
212
|
+
"output_type": "stream",
|
213
|
+
"text": [
|
214
|
+
"\n",
|
215
|
+
"Enter the initial state probabilities (comma-separated):\n"
|
216
|
+
]
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"name": "stdin",
|
220
|
+
"output_type": "stream",
|
221
|
+
"text": [
|
222
|
+
"Enter initial probabilities for ['1', '2', '3']: 0.5,0.2,0.3\n"
|
223
|
+
]
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"name": "stdout",
|
227
|
+
"output_type": "stream",
|
228
|
+
"text": [
|
229
|
+
"\n",
|
230
|
+
"Forward Matrix:\n",
|
231
|
+
" [[0.35 0.1792 0.088235 0.04318006 0.02110624]\n",
|
232
|
+
" [0.02 0.0085 0.004196 0.00205675 0.00100569]\n",
|
233
|
+
" [0.09 0.0357 0.016617 0.00803841 0.00391997]]\n",
|
234
|
+
"Probability of the observation sequence: 0.026031900399999995\n"
|
235
|
+
]
|
236
|
+
}
|
237
|
+
],
|
238
|
+
"source": [
|
239
|
+
"import numpy as np\n",
|
240
|
+
"\n",
|
241
|
+
"# Step 1: Define states and observations based on user input\n",
|
242
|
+
"states = list(map(str.strip, input(\"Enter the states (comma-separated): \").split(',')))\n",
|
243
|
+
"observations = list(map(str.strip, input(\"Enter the possible observations (comma-separated): \").split(',')))\n",
|
244
|
+
"\n",
|
245
|
+
"# Step 2: Get user input for the observation sequence\n",
|
246
|
+
"observation_seq = list(map(str.strip, input(f\"Enter the observation sequence as space-separated names (options: {observations}): \").split()))\n",
|
247
|
+
"\n",
|
248
|
+
"# Step 3: Convert observation sequence to indices\n",
|
249
|
+
"try:\n",
|
250
|
+
" observation_indices = [observations.index(obs) for obs in observation_seq]\n",
|
251
|
+
"except ValueError as e:\n",
|
252
|
+
" print(f\"Error: {e}. Please make sure your observation sequence contains only valid options: {observations}.\")\n",
|
253
|
+
" exit()\n",
|
254
|
+
"\n",
|
255
|
+
"# Step 4: Get user input for the transition matrix\n",
|
256
|
+
"print(\"\\nEnter the state transition probabilities:\")\n",
|
257
|
+
"transition_matrix = np.zeros((len(states), len(states)))\n",
|
258
|
+
"for i in range(len(states)):\n",
|
259
|
+
" for j in range(len(states)):\n",
|
260
|
+
" transition_matrix[i, j] = float(input(f\"P({states[j]} | {states[i]}): \"))\n",
|
261
|
+
"\n",
|
262
|
+
"# Step 5: Get user input for the emission matrix\n",
|
263
|
+
"print(\"\\nEnter the emission probabilities:\")\n",
|
264
|
+
"emission_matrix = np.zeros((len(states), len(observations)))\n",
|
265
|
+
"for i in range(len(states)):\n",
|
266
|
+
" for j in range(len(observations)):\n",
|
267
|
+
" emission_matrix[i, j] = float(input(f\"P({observations[j]} | {states[i]}): \"))\n",
|
268
|
+
"\n",
|
269
|
+
"# Step 6: Set initial state probabilities (ask the user to input them)\n",
|
270
|
+
"initial_probabilities = np.zeros(len(states))\n",
|
271
|
+
"print(\"\\nEnter the initial state probabilities (comma-separated):\")\n",
|
272
|
+
"initial_probabilities = list(map(float, input(f\"Enter initial probabilities for {states}: \").split(',')))\n",
|
273
|
+
"\n",
|
274
|
+
"# Step 7: Forward Procedure\n",
|
275
|
+
"def forward_procedure(observation_seq, transition_matrix, emission_matrix, initial_probabilities):\n",
|
276
|
+
" num_states = len(transition_matrix)\n",
|
277
|
+
" num_observations = len(observation_seq)\n",
|
278
|
+
" \n",
|
279
|
+
" # Initialize the forward matrix\n",
|
280
|
+
" forward_matrix = np.zeros((num_states, num_observations))\n",
|
281
|
+
" \n",
|
282
|
+
" # Initialization step\n",
|
283
|
+
" for i in range(num_states):\n",
|
284
|
+
" forward_matrix[i, 0] = initial_probabilities[i] * emission_matrix[i, observation_seq[0]]\n",
|
285
|
+
" \n",
|
286
|
+
" # Recursion step\n",
|
287
|
+
" for t in range(1, num_observations):\n",
|
288
|
+
" for j in range(num_states):\n",
|
289
|
+
" forward_matrix[j, t] = sum(forward_matrix[i, t - 1] * transition_matrix[i, j] for i in range(num_states)) * emission_matrix[j, observation_seq[t]]\n",
|
290
|
+
" \n",
|
291
|
+
" # Termination step\n",
|
292
|
+
" prob_observation = sum(forward_matrix[i, num_observations - 1] for i in range(num_states))\n",
|
293
|
+
" \n",
|
294
|
+
" return forward_matrix, prob_observation\n",
|
295
|
+
"\n",
|
296
|
+
"# Step 8: Compute the forward matrix and the probability of the observation sequence\n",
|
297
|
+
"forward_matrix, prob_observation = forward_procedure(observation_indices, transition_matrix, emission_matrix, initial_probabilities)\n",
|
298
|
+
"\n",
|
299
|
+
"# Display the results\n",
|
300
|
+
"print(\"\\nForward Matrix:\\n\", forward_matrix)\n",
|
301
|
+
"print(\"Probability of the observation sequence:\", prob_observation)"
|
302
|
+
]
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"cell_type": "code",
|
306
|
+
"execution_count": 4,
|
307
|
+
"id": "b20e9075-2efe-4f34-83ab-0d80e28f6066",
|
308
|
+
"metadata": {},
|
309
|
+
"outputs": [
|
310
|
+
{
|
311
|
+
"name": "stdin",
|
312
|
+
"output_type": "stream",
|
313
|
+
"text": [
|
314
|
+
"Enter the states(comma-separated): cp,ip\n",
|
315
|
+
"Enter the possible observations(comma-separated): lem,icet,cola\n",
|
316
|
+
"Enter the observation sequence as space_separated names(options:['lem', 'icet', 'cola']): lem icet cola\n"
|
317
|
+
]
|
318
|
+
},
|
319
|
+
{
|
320
|
+
"name": "stdout",
|
321
|
+
"output_type": "stream",
|
322
|
+
"text": [
|
323
|
+
"\n",
|
324
|
+
"Enter the state transition probabilities:\n"
|
325
|
+
]
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"name": "stdin",
|
329
|
+
"output_type": "stream",
|
330
|
+
"text": [
|
331
|
+
"P(cp|cp): 0.7\n",
|
332
|
+
"P(ip|cp): 0.5\n",
|
333
|
+
"P(cp|ip): 0.3\n",
|
334
|
+
"P(ip|ip): 0.5\n"
|
335
|
+
]
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"name": "stdout",
|
339
|
+
"output_type": "stream",
|
340
|
+
"text": [
|
341
|
+
"\n",
|
342
|
+
"Enter the emission probabilities:\n"
|
343
|
+
]
|
344
|
+
},
|
345
|
+
{
|
346
|
+
"name": "stdin",
|
347
|
+
"output_type": "stream",
|
348
|
+
"text": [
|
349
|
+
"P(lem|cp): 0.3\n",
|
350
|
+
"P(icet|cp): 0.1\n",
|
351
|
+
"P(cola|cp): 0.6\n",
|
352
|
+
"P(lem|ip): 0.2\n",
|
353
|
+
"P(icet|ip): 0.7\n",
|
354
|
+
"P(cola|ip): 0.1\n"
|
355
|
+
]
|
356
|
+
},
|
357
|
+
{
|
358
|
+
"name": "stdout",
|
359
|
+
"output_type": "stream",
|
360
|
+
"text": [
|
361
|
+
"\n",
|
362
|
+
"Enter the initial state probabilities(comma-separated):\n"
|
363
|
+
]
|
364
|
+
},
|
365
|
+
{
|
366
|
+
"name": "stdin",
|
367
|
+
"output_type": "stream",
|
368
|
+
"text": [
|
369
|
+
"Enter initial probabilities for['cp', 'ip']: 1.0,0.0\n"
|
370
|
+
]
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"name": "stdout",
|
374
|
+
"output_type": "stream",
|
375
|
+
"text": [
|
376
|
+
"\n",
|
377
|
+
"Forward Matrix:\n",
|
378
|
+
" [[0.3 0.021 0.02772]\n",
|
379
|
+
" [0. 0.105 0.0063 ]]\n",
|
380
|
+
"Probability of observation sequence: 0.034019999999999995\n",
|
381
|
+
"\n",
|
382
|
+
"Backward Matrix:\n",
|
383
|
+
" [[0.1134 0.47 1. ]\n",
|
384
|
+
" [0.0946 0.23 1. ]]\n",
|
385
|
+
"Probability of observation sequence: 0.03401999999999999\n"
|
386
|
+
]
|
387
|
+
}
|
388
|
+
],
|
389
|
+
"source": [
|
390
|
+
"import numpy as np\n",
|
391
|
+
"states=list(map(str.strip,input(\"Enter the states(comma-separated):\").split(',')))\n",
|
392
|
+
"observations=list(map(str.strip,input(\"Enter the possible observations(comma-separated):\").split(',')))\n",
|
393
|
+
"observation_seq=list(map(str.strip,input(f\"Enter the observation sequence as space_separated names(options:{observations}):\").split()))\n",
|
394
|
+
"try:\n",
|
395
|
+
" observation_indices=[]\n",
|
396
|
+
" for obs in observation_seq:\n",
|
397
|
+
" observation_indices.append(observations.index(obs))\n",
|
398
|
+
"except ValueError as e:\n",
|
399
|
+
" print(f\"Error:{e}.Please make sure your observation sequence contains only valid options:{observations}.\")\n",
|
400
|
+
" exit()\n",
|
401
|
+
"print(\"\\nEnter the state transition probabilities:\")\n",
|
402
|
+
"transition_matrix=np.zeros((len(states),len(states)))\n",
|
403
|
+
"for i in range(len(states)):\n",
|
404
|
+
" for j in range(len(states)):\n",
|
405
|
+
" transition_matrix[i,j]=float(input(f\"P({states[j]}|{states[i]}):\"))\n",
|
406
|
+
"print(\"\\nEnter the emission probabilities:\")\n",
|
407
|
+
"emission_matrix=np.zeros((len(states),len(observations)))\n",
|
408
|
+
"for i in range(len(states)):\n",
|
409
|
+
" for j in range(len(observations)):\n",
|
410
|
+
" emission_matrix[i,j]=float(input(f\"P({observations[j]}|{states[i]}):\"))\n",
|
411
|
+
"initial_probabilities=np.zeros(len(states))\n",
|
412
|
+
"print(\"\\nEnter the initial state probabilities(comma-separated):\")\n",
|
413
|
+
"initial_probabilities=list(map(float,input(f\"Enter initial probabilities for{states}:\").split(',')))\n",
|
414
|
+
"\n",
|
415
|
+
"def forward_procedure(observation_seq,transition_matrix,emission_matrix,initial_probabilities):\n",
|
416
|
+
" num_states=len(transition_matrix)\n",
|
417
|
+
" num_observations=len(observation_seq)\n",
|
418
|
+
" forward_matrix=np.zeros((num_states,num_observations))\n",
|
419
|
+
" for i in range(num_states):\n",
|
420
|
+
" forward_matrix[i, 0]=initial_probabilities[i] * emission_matrix[i, observation_seq[0]]\n",
|
421
|
+
" for t in range(1,num_observations):\n",
|
422
|
+
" for j in range(num_states):\n",
|
423
|
+
" forward_matrix[j,t]=sum(forward_matrix[i,t-1]*transition_matrix[i,j] for i in range(num_states))*emission_matrix[j,observation_seq[t]]\n",
|
424
|
+
" prob_observation=sum(forward_matrix[i,num_observations-1]for i in range(num_states))\n",
|
425
|
+
" return forward_matrix,prob_observation\n",
|
426
|
+
"\n",
|
427
|
+
"forward_matrix,prob_observation=forward_procedure(observation_indices,transition_matrix,emission_matrix,initial_probabilities)\n",
|
428
|
+
"print(\"\\nForward Matrix:\\n\",forward_matrix)\n",
|
429
|
+
"print(\"Probability of observation sequence:\",prob_observation)\n",
|
430
|
+
"\n",
|
431
|
+
"def backward_procedure(observation_seq,transition_matrix,emission_matrix,initial_probabilities):\n",
|
432
|
+
" num_states=len(transition_matrix)\n",
|
433
|
+
" num_observations=len(observation_seq)\n",
|
434
|
+
" backward_matrix=np.zeros((num_states,num_observations))\n",
|
435
|
+
" backward_matrix[:,num_observations-1]=1\n",
|
436
|
+
" for t in range(num_observations-2,-1,-1):\n",
|
437
|
+
" for i in range(num_states):\n",
|
438
|
+
" backward_matrix[i,t]=sum(transition_matrix[i,j]*emission_matrix[j, observation_seq[t+1]]*backward_matrix[j,t+1]for j in range(num_states))\n",
|
439
|
+
" prob_observation=sum(initial_probabilities[i]*emission_matrix[i, observation_seq[0]]*backward_matrix[i,0]for i in range(num_states))\n",
|
440
|
+
" return backward_matrix,prob_observation\n",
|
441
|
+
"\n",
|
442
|
+
"backward_matrix,prob_observation=backward_procedure(observation_indices,transition_matrix,emission_matrix,initial_probabilities)\n",
|
443
|
+
"print(\"\\nBackward Matrix:\\n\",backward_matrix)\n",
|
444
|
+
"print(\"Probability of observation sequence:\",prob_observation)"
|
445
|
+
]
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"cell_type": "code",
|
449
|
+
"execution_count": null,
|
450
|
+
"id": "cc4631ba-95a1-406f-93c1-898d224acceb",
|
451
|
+
"metadata": {},
|
452
|
+
"outputs": [],
|
453
|
+
"source": []
|
454
|
+
}
|
455
|
+
],
|
456
|
+
"metadata": {
|
457
|
+
"kernelspec": {
|
458
|
+
"display_name": "Python 3 (ipykernel)",
|
459
|
+
"language": "python",
|
460
|
+
"name": "python3"
|
461
|
+
},
|
462
|
+
"language_info": {
|
463
|
+
"codemirror_mode": {
|
464
|
+
"name": "ipython",
|
465
|
+
"version": 3
|
466
|
+
},
|
467
|
+
"file_extension": ".py",
|
468
|
+
"mimetype": "text/x-python",
|
469
|
+
"name": "python",
|
470
|
+
"nbconvert_exporter": "python",
|
471
|
+
"pygments_lexer": "ipython3",
|
472
|
+
"version": "3.11.7"
|
473
|
+
}
|
474
|
+
},
|
475
|
+
"nbformat": 4,
|
476
|
+
"nbformat_minor": 5
|
477
|
+
}
|