|
10 | 10 | "import yaml\n", |
11 | 11 | "import os\n", |
12 | 12 | "import pandas as pd\n", |
13 | | - "from zurcher_data.data.data_reading import data_reading\n", |
14 | | - "from zurcher_data.data.data_processing import data_processing\n", |
15 | 13 | "\n", |
16 | 14 | "from ruspy.estimation.estimation import estimate\n", |
17 | 15 | "\n" |
|
23 | 21 | "metadata": {}, |
24 | 22 | "outputs": [], |
25 | 23 | "source": [ |
26 | | - "with open(\"init_replication.yml\") as y:\n", |
27 | | - " init_dict = yaml.safe_load(y)\n", |
28 | | - "\n", |
| 24 | + "import sys # TODO: Extract data functions, such that they can be imported as functions.\n", |
| 25 | + "sys.path.append('zurcher-data/data/')\n", |
| 26 | + "from data_processing import data_processing\n", |
| 27 | + "from data_reading import data_reading" |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "cell_type": "code", |
| 32 | + "execution_count": 4, |
| 33 | + "metadata": {}, |
| 34 | + "outputs": [], |
| 35 | + "source": [ |
| 36 | + "init_dict = {\n", |
| 37 | + " 'groups': 'group_4',\n", |
| 38 | + " 'binsize': 5000,\n", |
| 39 | + " 'beta': 0.9999,\n", |
| 40 | + " 'states': 90,\n", |
| 41 | + " 'maint_func': 'linear',\n", |
| 42 | + "}" |
| 43 | + ] |
| 44 | + }, |
| 45 | + { |
| 46 | + "cell_type": "code", |
| 47 | + "execution_count": 6, |
| 48 | + "metadata": {}, |
| 49 | + "outputs": [], |
| 50 | + "source": [ |
29 | 51 | "data_reading()\n", |
30 | | - "data = data_processing(init_dict[\"replication\"])" |
| 52 | + "data = data_processing(init_dict)" |
31 | 53 | ] |
32 | 54 | }, |
33 | 55 | { |
34 | 56 | "cell_type": "code", |
35 | | - "execution_count": 3, |
| 57 | + "execution_count": 7, |
36 | 58 | "metadata": {}, |
37 | 59 | "outputs": [ |
38 | 60 | { |
|
58 | 80 | } |
59 | 81 | ], |
60 | 82 | "source": [ |
61 | | - "result_transitions, result_fixp = estimate(init_dict[\"replication\"], data, repl_4=True)\n", |
| 83 | + "result_transitions, result_fixp = estimate(init_dict, data, repl_4=True)\n", |
62 | 84 | "print(result_transitions, result_fixp)" |
63 | 85 | ] |
64 | | - }, |
65 | | - { |
66 | | - "cell_type": "code", |
67 | | - "execution_count": null, |
68 | | - "metadata": {}, |
69 | | - "outputs": [], |
70 | | - "source": [] |
71 | 86 | } |
72 | 87 | ], |
73 | 88 | "metadata": { |
|
86 | 101 | "name": "python", |
87 | 102 | "nbconvert_exporter": "python", |
88 | 103 | "pygments_lexer": "ipython3", |
89 | | - "version": "3.7.0" |
| 104 | + "version": "3.7.4" |
90 | 105 | } |
91 | 106 | }, |
92 | 107 | "nbformat": 4, |
|
0 commit comments