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

Revert "move notebooks outside of the package folder and fix notebooks" #34

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [jss_mgwr]",
"language": "python",
"name": "python3"
"name": "Python [jss_mgwr]"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -172,7 +172,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.5.4"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pysal as ps\n",
"import numpy as np\n",
"import scipy as sp\n",
"from mgwr.sel_bw import Sel_BW\n",
"from mgwr.gwr import GWR, MGWR\n",
"import pandas as pd\n",
"import pysal\n",
"import libpysal as ps\n",
"import pickle as pk\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"data = ps.io.open(ps.examples.get_path('GData_utm.csv'))\n",
"data = pysal.open('/Users/toshan/Dropbox/dev/GWR4/georgia/GData_utm.csv')\n",
"coords = list(zip(data.by_col('X'), data.by_col('Y')))\n",
"y = np.array(data.by_col('PctBach')).reshape((-1,1))\n",
"rural = np.array(data.by_col('PctRural')).reshape((-1,1))\n",
Expand All @@ -37,17 +39,17 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"bw: 117.0\n",
"aicc: 299.0508086830288\n",
"ENP: 11.804769716730096\n",
"sigma2: 0.34774354749782793\n"
"aicc: 299.050808683\n",
"ENP: 11.8047697167\n",
"sigma2: 0.347743547498\n"
]
}
],
Expand All @@ -71,14 +73,14 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
" 4%|▍ | 9/200 [00:01<00:37, 5.10it/s]\n"
" 4%|▍ | 9/200 [00:02<00:48, 3.95it/s]"
]
},
{
Expand All @@ -89,23 +91,30 @@
"bw(foreign): 101.0\n",
"bw(african_amer): 136.0\n",
"bw(rural): 158.0\n",
"aicc: 297.12013812258783\n",
"sigma2: 0.34477258292171475\n",
"ENP(model): 11.36825087269831\n",
"adj_alpha(model): 0.017592855949398047\n",
"critical_t(model): 2.399257840857394\n",
"ENP(intercept): 3.844671080264143\n",
"adj_alpha(intercept): 0.013005013681577365\n",
"critical_t(intercept): 2.512107491068591\n",
"ENP(foreign): 3.513770805151652\n",
"adj_alpha(foreign): 0.014229727199820033\n",
"critical_t(foreign): 2.4788879239423856\n",
"ENP(african_amer): 2.2580525278898254\n",
"adj_alpha(african_amer): 0.022142974701622884\n",
"critical_t(african_amer): 2.3106911297007184\n",
"ENP(rural): 1.7517564593926893\n",
"adj_alpha(rural): 0.028542780437261432\n",
"critical_t(rural): 2.210001836555586\n"
"aicc: 297.120138123\n",
"sigma2: 0.344772582922\n",
"ENP(model): 11.3682508727\n",
"adj_alpha(model): 0.0175928559494\n",
"critical_t(model): 2.39925784086\n",
"ENP(intercept): 3.84467108026\n",
"adj_alpha(intercept): 0.0130050136816\n",
"critical_t(intercept): 2.51210749107\n",
"ENP(foreign): 3.51377080515\n",
"adj_alpha(foreign): 0.0142297271998\n",
"critical_t(foreign): 2.47888792394\n",
"ENP(african_amer): 2.25805252789\n",
"adj_alpha(african_amer): 0.0221429747016\n",
"critical_t(african_amer): 2.3106911297\n",
"ENP(rural): 1.75175645939\n",
"adj_alpha(rural): 0.0285427804373\n",
"critical_t(rural): 2.21000183656\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
}
],
Expand Down Expand Up @@ -147,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -157,27 +166,20 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"#tracts = ps.io.open(os.path.join(os.getcwd(),'../tests/georgia/G_utm.shp'))"
"tracts = ps.open(os.path.join(os.getcwd(),'../tests/georgia/G_utm.shp'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [mgwr_dev3]",
"language": "python",
"name": "python3"
"name": "Python [mgwr_dev3]"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -189,7 +191,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.4.5"
}
},
"nbformat": 4,
Expand Down
215 changes: 215 additions & 0 deletions mgwr/notebooks/GWR_prediction_example.ipynb

Large diffs are not rendered by default.

172 changes: 0 additions & 172 deletions notebooks/.ipynb_checkpoints/GWR_MGWR_example-checkpoint.ipynb

This file was deleted.

Loading