Skip to content

Instantly share code, notes, and snippets.

@Raahul-Singh
Created June 28, 2020 23:09
Show Gist options
  • Save Raahul-Singh/d36f16b2c9e3241dd9eee60a263253e6 to your computer and use it in GitHub Desktop.
Save Raahul-Singh/d36f16b2c9e3241dd9eee60a263253e6 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"does_flare = flares_complexities[flares_complexities.flares == 1]\n",
"does_not_flare = flares_complexities[flares_complexities.flares == 0]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>noaa</th>\n",
" <th>complexity</th>\n",
" <th>flares</th>\n",
" </tr>\n",
" <tr>\n",
" <th>#id</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>8813</td>\n",
" <td>1236.575624</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>8815</td>\n",
" <td>1299.871029</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>8810</td>\n",
" <td>1306.593595</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>8810</td>\n",
" <td>1300.302886</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>8816</td>\n",
" <td>1180.945863</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>8814</td>\n",
" <td>1369.772259</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>40</th>\n",
" <td>8829</td>\n",
" <td>1099.494215</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41</th>\n",
" <td>8824</td>\n",
" <td>1349.701272</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48</th>\n",
" <td>8829</td>\n",
" <td>1353.643280</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>51</th>\n",
" <td>8824</td>\n",
" <td>1414.873927</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" noaa complexity flares\n",
"#id \n",
"7 8813 1236.575624 1\n",
"9 8815 1299.871029 1\n",
"10 8810 1306.593595 1\n",
"14 8810 1300.302886 1\n",
"23 8816 1180.945863 1\n",
"32 8814 1369.772259 1\n",
"40 8829 1099.494215 1\n",
"41 8824 1349.701272 1\n",
"48 8829 1353.643280 1\n",
"51 8824 1414.873927 1"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Positive class\n",
"does_flare.head(10)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>noaa</th>\n",
" <th>complexity</th>\n",
" <th>flares</th>\n",
" </tr>\n",
" <tr>\n",
" <th>#id</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>8809</td>\n",
" <td>1126.778324</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>8810</td>\n",
" <td>1312.434736</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>8812</td>\n",
" <td>962.280235</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>8813</td>\n",
" <td>1199.623395</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>8814</td>\n",
" <td>1270.270911</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>8810</td>\n",
" <td>1293.377418</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>8814</td>\n",
" <td>1209.593634</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>8813</td>\n",
" <td>1243.681834</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>8814</td>\n",
" <td>1191.450319</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>8815</td>\n",
" <td>1218.807609</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" noaa complexity flares\n",
"#id \n",
"1 8809 1126.778324 0\n",
"2 8810 1312.434736 0\n",
"3 8812 962.280235 0\n",
"4 8813 1199.623395 0\n",
"5 8814 1270.270911 0\n",
"6 8810 1293.377418 0\n",
"8 8814 1209.593634 0\n",
"11 8813 1243.681834 0\n",
"12 8814 1191.450319 0\n",
"13 8815 1218.807609 0"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Negative class\n",
"does_not_flare.head(10)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment