Skip to content

Commit

Permalink
Merge pull request #153 from sdv-dev/issue_151_improve_metadata_visua…
Browse files Browse the repository at this point in the history
…lization

Improve metadata visualization
  • Loading branch information
csala authored Feb 2, 2020
2 parents 1ab1ead + 88294aa commit 80c948b
Show file tree
Hide file tree
Showing 11 changed files with 1,078 additions and 926 deletions.
313 changes: 135 additions & 178 deletions examples/0. Quickstart - README.ipynb

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions examples/1. Quickstart - Single Table - In Memory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2020-01-21 17:57:38,505 - INFO - modeler - Modeling data\n",
"2020-01-21 17:57:38,506 - INFO - metadata - Loading transformer NumericalTransformer for field integer\n",
"2020-01-21 17:57:38,507 - INFO - metadata - Loading transformer NumericalTransformer for field float\n",
"2020-01-21 17:57:38,507 - INFO - metadata - Loading transformer CategoricalTransformer for field categorical\n",
"2020-01-21 17:57:38,508 - INFO - metadata - Loading transformer BooleanTransformer for field bool\n",
"2020-01-21 17:57:38,508 - INFO - metadata - Loading transformer NumericalTransformer for field nullable\n",
"2020-01-21 17:57:38,509 - INFO - metadata - Loading transformer DatetimeTransformer for field datetime\n",
"2020-01-21 17:57:38,563 - INFO - modeler - Modeling Complete\n"
"2020-02-01 19:45:45,775 - INFO - modeler - Modeling data\n",
"2020-02-01 19:45:45,776 - INFO - metadata - Loading transformer NumericalTransformer for field integer\n",
"2020-02-01 19:45:45,777 - INFO - metadata - Loading transformer NumericalTransformer for field float\n",
"2020-02-01 19:45:45,777 - INFO - metadata - Loading transformer CategoricalTransformer for field categorical\n",
"2020-02-01 19:45:45,778 - INFO - metadata - Loading transformer BooleanTransformer for field bool\n",
"2020-02-01 19:45:45,779 - INFO - metadata - Loading transformer NumericalTransformer for field nullable\n",
"2020-02-01 19:45:45,779 - INFO - metadata - Loading transformer DatetimeTransformer for field datetime\n",
"2020-02-01 19:45:45,824 - INFO - modeler - Modeling Complete\n"
]
}
],
Expand Down Expand Up @@ -291,71 +291,71 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.316881</td>\n",
" <td>c</td>\n",
" <td>False</td>\n",
" <td>6.156489</td>\n",
" <td>2010-02-25 02:53:12.798384384</td>\n",
" <td>1</td>\n",
" <td>0.080051</td>\n",
" <td>a</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaT</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>0.211456</td>\n",
" <td>NaN</td>\n",
" <td>True</td>\n",
" <td>0</td>\n",
" <td>-0.015712</td>\n",
" <td>a</td>\n",
" <td>False</td>\n",
" <td>NaN</td>\n",
" <td>2010-02-09 06:50:01.731790848</td>\n",
" <td>2009-12-08 11:20:58.439345408</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0.211245</td>\n",
" <td>b</td>\n",
" <td>1</td>\n",
" <td>0.142979</td>\n",
" <td>a</td>\n",
" <td>True</td>\n",
" <td>6.375878</td>\n",
" <td>2010-02-02 21:58:13.148113408</td>\n",
" <td>4.971408</td>\n",
" <td>2010-01-08 00:32:21.629585920</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>0.146421</td>\n",
" <td>b</td>\n",
" <td>False</td>\n",
" <td>1</td>\n",
" <td>0.133913</td>\n",
" <td>a</td>\n",
" <td>True</td>\n",
" <td>NaN</td>\n",
" <td>2010-01-25 01:22:58.590664192</td>\n",
" <td>2010-01-14 21:37:22.051623936</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>0.160858</td>\n",
" <td>b</td>\n",
" <td>True</td>\n",
" <td>NaN</td>\n",
" <td>2010-01-28 14:38:22.045021952</td>\n",
" <td>1</td>\n",
" <td>0.159480</td>\n",
" <td>a</td>\n",
" <td>False</td>\n",
" <td>4.294080</td>\n",
" <td>2010-01-09 21:09:11.245925888</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" index integer float categorical bool nullable \\\n",
"0 0 3 0.316881 c False 6.156489 \n",
"1 1 2 0.211456 NaN True NaN \n",
"2 2 2 0.211245 b True 6.375878 \n",
"3 3 2 0.146421 b False NaN \n",
"4 4 2 0.160858 b True NaN \n",
"0 0 1 0.080051 a NaN NaN \n",
"1 1 0 -0.015712 a False NaN \n",
"2 2 1 0.142979 a True 4.971408 \n",
"3 3 1 0.133913 a True NaN \n",
"4 4 1 0.159480 a False 4.294080 \n",
"\n",
" datetime \n",
"0 2010-02-25 02:53:12.798384384 \n",
"1 2010-02-09 06:50:01.731790848 \n",
"2 2010-02-02 21:58:13.148113408 \n",
"3 2010-01-25 01:22:58.590664192 \n",
"4 2010-01-28 14:38:22.045021952 "
"0 NaT \n",
"1 2009-12-08 11:20:58.439345408 \n",
"2 2010-01-08 00:32:21.629585920 \n",
"3 2010-01-14 21:37:22.051623936 \n",
"4 2010-01-09 21:09:11.245925888 "
]
},
"execution_count": 5,
Expand Down
176 changes: 88 additions & 88 deletions examples/2. Quickstart - Single Table - Census.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -309,23 +309,23 @@
"name": "stderr",
"output_type": "stream",
"text": [
"INFO - Modeling census\n",
"INFO - Loading transformer NumericalTransformer for field age\n",
"INFO - Loading transformer CategoricalTransformer for field workclass\n",
"INFO - Loading transformer NumericalTransformer for field fnlwgt\n",
"INFO - Loading transformer CategoricalTransformer for field education\n",
"INFO - Loading transformer NumericalTransformer for field education-num\n",
"INFO - Loading transformer CategoricalTransformer for field marital-status\n",
"INFO - Loading transformer CategoricalTransformer for field occupation\n",
"INFO - Loading transformer CategoricalTransformer for field relationship\n",
"INFO - Loading transformer CategoricalTransformer for field race\n",
"INFO - Loading transformer CategoricalTransformer for field sex\n",
"INFO - Loading transformer NumericalTransformer for field capital-gain\n",
"INFO - Loading transformer NumericalTransformer for field capital-loss\n",
"INFO - Loading transformer NumericalTransformer for field hours-per-week\n",
"INFO - Loading transformer CategoricalTransformer for field native-country\n",
"INFO - Loading transformer CategoricalTransformer for field income\n",
"INFO - Modeling Complete\n"
"2020-02-01 19:45:55,968 - INFO - modeler - Modeling census\n",
"2020-02-01 19:45:55,969 - INFO - metadata - Loading transformer NumericalTransformer for field age\n",
"2020-02-01 19:45:55,969 - INFO - metadata - Loading transformer CategoricalTransformer for field workclass\n",
"2020-02-01 19:45:55,970 - INFO - metadata - Loading transformer NumericalTransformer for field fnlwgt\n",
"2020-02-01 19:45:55,970 - INFO - metadata - Loading transformer CategoricalTransformer for field education\n",
"2020-02-01 19:45:55,971 - INFO - metadata - Loading transformer NumericalTransformer for field education-num\n",
"2020-02-01 19:45:55,971 - INFO - metadata - Loading transformer CategoricalTransformer for field marital-status\n",
"2020-02-01 19:45:55,971 - INFO - metadata - Loading transformer CategoricalTransformer for field occupation\n",
"2020-02-01 19:45:55,972 - INFO - metadata - Loading transformer CategoricalTransformer for field relationship\n",
"2020-02-01 19:45:55,972 - INFO - metadata - Loading transformer CategoricalTransformer for field race\n",
"2020-02-01 19:45:55,974 - INFO - metadata - Loading transformer CategoricalTransformer for field sex\n",
"2020-02-01 19:45:55,974 - INFO - metadata - Loading transformer NumericalTransformer for field capital-gain\n",
"2020-02-01 19:45:55,975 - INFO - metadata - Loading transformer NumericalTransformer for field capital-loss\n",
"2020-02-01 19:45:55,976 - INFO - metadata - Loading transformer NumericalTransformer for field hours-per-week\n",
"2020-02-01 19:45:55,977 - INFO - metadata - Loading transformer CategoricalTransformer for field native-country\n",
"2020-02-01 19:45:55,978 - INFO - metadata - Loading transformer CategoricalTransformer for field income\n",
"2020-02-01 19:45:56,240 - INFO - modeler - Modeling Complete\n"
]
}
],
Expand Down Expand Up @@ -382,90 +382,90 @@
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>35</td>\n",
" <td>51</td>\n",
" <td>Private</td>\n",
" <td>207371</td>\n",
" <td>7th-8th</td>\n",
" <td>10</td>\n",
" <td>355950</td>\n",
" <td>Assoc-acdm</td>\n",
" <td>8</td>\n",
" <td>Divorced</td>\n",
" <td>Adm-clerical</td>\n",
" <td>Wife</td>\n",
" <td>Other-service</td>\n",
" <td>Not-in-family</td>\n",
" <td>White</td>\n",
" <td>Female</td>\n",
" <td>931</td>\n",
" <td>-620</td>\n",
" <td>30</td>\n",
" <td>-2822</td>\n",
" <td>-189</td>\n",
" <td>16</td>\n",
" <td>United-States</td>\n",
" <td>&lt;=50K</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>26</td>\n",
" <td>4</td>\n",
" <td>Private</td>\n",
" <td>87833</td>\n",
" <td>Some-college</td>\n",
" <td>9</td>\n",
" <td>Widowed</td>\n",
" <td>Exec-managerial</td>\n",
" <td>Own-child</td>\n",
" <td>137889</td>\n",
" <td>HS-grad</td>\n",
" <td>10</td>\n",
" <td>Never-married</td>\n",
" <td>Craft-repair</td>\n",
" <td>Unmarried</td>\n",
" <td>White</td>\n",
" <td>Female</td>\n",
" <td>-736</td>\n",
" <td>109</td>\n",
" <td>36</td>\n",
" <td>Male</td>\n",
" <td>1370</td>\n",
" <td>-62</td>\n",
" <td>35</td>\n",
" <td>United-States</td>\n",
" <td>&lt;=50K</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>39</td>\n",
" <td>17</td>\n",
" <td>Private</td>\n",
" <td>127833</td>\n",
" <td>HS-grad</td>\n",
" <td>12</td>\n",
" <td>Married-civ-spouse</td>\n",
" <td>Adm-clerical</td>\n",
" <td>Not-in-family</td>\n",
" <td>312489</td>\n",
" <td>Some-college</td>\n",
" <td>10</td>\n",
" <td>Divorced</td>\n",
" <td>Sales</td>\n",
" <td>Unmarried</td>\n",
" <td>White</td>\n",
" <td>Male</td>\n",
" <td>-2763</td>\n",
" <td>-213</td>\n",
" <td>34</td>\n",
" <td>Female</td>\n",
" <td>5435</td>\n",
" <td>28</td>\n",
" <td>38</td>\n",
" <td>United-States</td>\n",
" <td>&lt;=50K</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>73</td>\n",
" <td>Self-emp-not-inc</td>\n",
" <td>159836</td>\n",
" <td>HS-grad</td>\n",
" <td>15</td>\n",
" <td>32</td>\n",
" <td>Private</td>\n",
" <td>199311</td>\n",
" <td>Bachelors</td>\n",
" <td>11</td>\n",
" <td>Married-civ-spouse</td>\n",
" <td>Craft-repair</td>\n",
" <td>Husband</td>\n",
" <td>Exec-managerial</td>\n",
" <td>Own-child</td>\n",
" <td>White</td>\n",
" <td>Male</td>\n",
" <td>-183</td>\n",
" <td>115</td>\n",
" <td>56</td>\n",
" <td>Female</td>\n",
" <td>3489</td>\n",
" <td>269</td>\n",
" <td>48</td>\n",
" <td>United-States</td>\n",
" <td>&lt;=50K</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>50</td>\n",
" <td>?</td>\n",
" <td>318263</td>\n",
" <td>Bachelors</td>\n",
" <td>36</td>\n",
" <td>Local-gov</td>\n",
" <td>16147</td>\n",
" <td>HS-grad</td>\n",
" <td>8</td>\n",
" <td>Never-married</td>\n",
" <td>Other-service</td>\n",
" <td>Husband</td>\n",
" <td>White</td>\n",
" <td>Male</td>\n",
" <td>2797</td>\n",
" <td>-334</td>\n",
" <td>2568</td>\n",
" <td>308</td>\n",
" <td>42</td>\n",
" <td>United-States</td>\n",
" <td>&lt;=50K</td>\n",
Expand All @@ -475,26 +475,26 @@
"</div>"
],
"text/plain": [
" age workclass fnlwgt education education-num \\\n",
"0 35 Private 207371 7th-8th 10 \n",
"1 26 Private 87833 Some-college 9 \n",
"2 39 Private 127833 HS-grad 12 \n",
"3 73 Self-emp-not-inc 159836 HS-grad 15 \n",
"4 50 ? 318263 Bachelors 8 \n",
" age workclass fnlwgt education education-num marital-status \\\n",
"0 51 Private 355950 Assoc-acdm 8 Divorced \n",
"1 4 Private 137889 HS-grad 10 Never-married \n",
"2 17 Private 312489 Some-college 10 Divorced \n",
"3 32 Private 199311 Bachelors 11 Married-civ-spouse \n",
"4 36 Local-gov 16147 HS-grad 8 Never-married \n",
"\n",
" marital-status occupation relationship race sex \\\n",
"0 Divorced Adm-clerical Wife White Female \n",
"1 Widowed Exec-managerial Own-child White Female \n",
"2 Married-civ-spouse Adm-clerical Not-in-family White Male \n",
"3 Married-civ-spouse Craft-repair Husband White Male \n",
"4 Never-married Other-service Husband White Male \n",
" occupation relationship race sex capital-gain \\\n",
"0 Other-service Not-in-family White Female -2822 \n",
"1 Craft-repair Unmarried White Male 1370 \n",
"2 Sales Unmarried White Female 5435 \n",
"3 Exec-managerial Own-child White Female 3489 \n",
"4 Other-service Husband White Male 2568 \n",
"\n",
" capital-gain capital-loss hours-per-week native-country income \n",
"0 931 -620 30 United-States <=50K \n",
"1 -736 109 36 United-States <=50K \n",
"2 -2763 -213 34 United-States <=50K \n",
"3 -183 115 56 United-States <=50K \n",
"4 2797 -334 42 United-States <=50K "
" capital-loss hours-per-week native-country income \n",
"0 -189 16 United-States <=50K \n",
"1 -62 35 United-States <=50K \n",
"2 28 38 United-States <=50K \n",
"3 269 48 United-States <=50K \n",
"4 308 42 United-States <=50K "
]
},
"execution_count": 7,
Expand Down Expand Up @@ -541,17 +541,17 @@
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>212670.957588</td>\n",
" <td>0.999414</td>\n",
" <td>461.162615</td>\n",
" <td>212310.836015</td>\n",
" <td>0.999415</td>\n",
" <td>460.772</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" mse r2_score rmse\n",
"0 212670.957588 0.999414 461.162615"
" mse r2_score rmse\n",
"0 212310.836015 0.999415 460.772"
]
},
"execution_count": 8,
Expand Down
Loading

0 comments on commit 80c948b

Please sign in to comment.