Created
June 28, 2020 22:08
-
-
Save Raahul-Singh/c7d15d15ea3974843f3db4a1379921e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"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", | |
" <th>normalized_complexity</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>#id</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>5488</th>\n", | |
" <td>9663</td>\n", | |
" <td>1161.568949</td>\n", | |
" <td>0</td>\n", | |
" <td>-0.335284</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5492</th>\n", | |
" <td>9659</td>\n", | |
" <td>996.183465</td>\n", | |
" <td>0</td>\n", | |
" <td>-1.974639</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1918</th>\n", | |
" <td>9100</td>\n", | |
" <td>1173.150426</td>\n", | |
" <td>0</td>\n", | |
" <td>-0.220485</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7233</th>\n", | |
" <td>9933</td>\n", | |
" <td>1168.289779</td>\n", | |
" <td>0</td>\n", | |
" <td>-0.268665</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4767</th>\n", | |
" <td>9549</td>\n", | |
" <td>1092.538728</td>\n", | |
" <td>0</td>\n", | |
" <td>-1.019534</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8483</th>\n", | |
" <td>10159</td>\n", | |
" <td>1399.834905</td>\n", | |
" <td>1</td>\n", | |
" <td>0.806073</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3904</th>\n", | |
" <td>9401</td>\n", | |
" <td>1198.386026</td>\n", | |
" <td>0</td>\n", | |
" <td>0.029659</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1501</th>\n", | |
" <td>9057</td>\n", | |
" <td>1320.157341</td>\n", | |
" <td>0</td>\n", | |
" <td>1.236696</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2841</th>\n", | |
" <td>9242</td>\n", | |
" <td>1188.438518</td>\n", | |
" <td>0</td>\n", | |
" <td>-0.068944</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5162</th>\n", | |
" <td>9608</td>\n", | |
" <td>1463.414261</td>\n", | |
" <td>1</td>\n", | |
" <td>1.481081</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" noaa complexity flares normalized_complexity\n", | |
"#id \n", | |
"5488 9663 1161.568949 0 -0.335284\n", | |
"5492 9659 996.183465 0 -1.974639\n", | |
"1918 9100 1173.150426 0 -0.220485\n", | |
"7233 9933 1168.289779 0 -0.268665\n", | |
"4767 9549 1092.538728 0 -1.019534\n", | |
"8483 10159 1399.834905 1 0.806073\n", | |
"3904 9401 1198.386026 0 0.029659\n", | |
"1501 9057 1320.157341 0 1.236696\n", | |
"2841 9242 1188.438518 0 -0.068944\n", | |
"5162 9608 1463.414261 1 1.481081" | |
] | |
}, | |
"execution_count": 26, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"all_flares.sample(frac=1).head(10)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"PointbiserialrResult(correlation=0.4596014988642637, pvalue=0.0)" | |
] | |
}, | |
"execution_count": 27, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"pointbiserialr(all_flares.flares, all_flares.complexity)" | |
] | |
} | |
], | |
"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