Skip to content

Commit

Permalink
Set an appropriate rho value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Nicodemus committed Jan 3, 2025
1 parent faa8215 commit 19ca89c
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions docs/notebooks/Example_5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "b6b7e64d",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -52,16 +52,39 @@
"execution_count": 2,
"id": "36765c5a",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(645, 100, 100)\n",
"10865.144685592724\n",
"Done first pass.\n",
"CPU times: user 2d 1h 5min 41s, sys: 50.3 s, total: 2d 1h 6min 32s\n",
"Wall time: 2h 28min 12s\n"
]
}
],
"source": [
"eps = 100.0\n",
"UGW_dmat = UGW_multicore.ugw_armijo_pairwise(\n",
" mass_kept = 0.90,\n",
" mass_kept = 0.80,\n",
" eps=eps,\n",
" dmats=join(bd,\"geodesic_100_icdm_50cells.csv\")\n",
" dmats=join(bd,\"geodesic_100_icdm.csv\")\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "0a14b977-2b08-44f5-8bed-6ab2822a899a",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"np.save(\"UGW_dmat_mass_80_eps_100.npy\", UGW_dmat)"
]
},
{
"cell_type": "markdown",
"id": "f09b79aa",
Expand All @@ -73,16 +96,16 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "78e048c4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.7021276595744681\n",
"MCC: 0.4171682921141799\n"
"Accuracy: 0.5510204081632653\n",
"MCC: 0.4520340022810735\n"
]
}
],
Expand All @@ -92,7 +115,7 @@
"from sklearn.model_selection import LeaveOneOut, cross_val_score\n",
"from cajal.utilities import cell_iterator_csv\n",
"\n",
"cells, idcms = zip(*cell_iterator_csv(intracell_csv_loc=join(bd,\"geodesic_100_icdm_50cells.csv\")))\n",
"cells, idcms = zip(*cell_iterator_csv(intracell_csv_loc=join(bd,\"geodesic_100_icdm.csv\")))\n",
"metadata = pd.read_csv(join(bd,'m1_patchseq_meta_data.csv'),sep='\\t',index_col='Cell').loc[pd.Series(cells)]\n",
"RNA_family = metadata['RNA family']\n",
"hq = RNA_family != 'low quality' # Filter down to the cells that have a well-defined RNA family.\n",
Expand Down Expand Up @@ -126,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 6,
"id": "46a4c5d8",
"metadata": {},
"outputs": [
Expand Down

0 comments on commit 19ca89c

Please sign in to comment.