Commit f661d7e2 authored by Hao Ting Wang's avatar Hao Ting Wang

quiet

parent d10e74da
This diff is collapsed.
......@@ -4,17 +4,9 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/h/hw1012/TaskSCCA_craddock\n"
]
}
],
"outputs": [],
"source": [
"cd ~/TaskSCCA_craddock/"
"cd -q ~/TaskSCCA_craddock/"
]
},
{
......
......@@ -4,17 +4,9 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/h/hw1012/TaskSCCA_craddock\n"
]
}
],
"outputs": [],
"source": [
"cd ~/TaskSCCA_craddock/"
"cd -q ~/TaskSCCA_craddock/"
]
},
{
......@@ -73,21 +65,11 @@
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/h/hw1012/TaskSCCA_craddock/env/lib/python3.6/site-packages/ipykernel_launcher.py:1: FutureWarning: convert_objects is deprecated. To re-infer data dtypes for object columns, use DataFrame.infer_objects()\n",
"For all other conversions use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.\n",
" \"\"\"Entry point for launching an IPython kernel.\n",
"/home/h/hw1012/TaskSCCA_craddock/env/lib/python3.6/site-packages/scipy/stats/stats.py:2253: RuntimeWarning: invalid value encountered in true_divide\n",
" return (a - mns) / sstd\n"
]
}
],
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"df_es = pd.read_pickle('./data/interim/CS_MWQ_prepro.pkl').convert_objects(convert_numeric=True)\n",
"df_es_mean = df_es.pivot_table(index=['RIDNO'],\n",
......
This diff is collapsed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/h/hw1012/TaskSCCA_craddock\n"
]
}
],
"source": [
"cd ~/TaskSCCA_craddock/"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/h/hw1012/TaskSCCA_craddock/env/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
" return f(*args, **kwds)\n",
"/home/h/hw1012/TaskSCCA_craddock/env/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
" return f(*args, **kwds)\n"
]
}
],
"source": [
"import pandas as pd\n",
"\n",
"from src.utils import save_pkl, load_pkl"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"def sort_by_yeo7(mat):\n",
" label_names = pd.read_csv('references/scorr05_2level_names_100.csv').set_index('ROI number')\n",
" label_names_yeo7 = label_names.sort_values('Yeo-Krienen 7 networks').iloc[:, 2]\n",
" tmp = pd.DataFrame(mat, index=range(1, 101), columns=range(1, 101))\n",
" reorder = tmp.loc[label_names_yeo7.index.tolist(), label_names_yeo7.index.tolist()]\n",
" return reorder.values"
]
}
],
"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.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment