Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketk33 committed Jul 5, 2023
1 parent b16ecc7 commit bfa0d41
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions notebook/klcpd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,13 @@
"metadata": {},
"outputs": [],
"source": [
"import math\n",
"import numpy as np\n",
"import scipy\n",
"from sklearn.utils.extmath import svd_flip, randomized_svd\n",
"from scipy.sparse.linalg import svds\n",
"import torch\n",
"import torch.nn as nn\n",
"import torch.nn.functional as F\n",
"from torch.autograd import Variable\n",
"from sklearn.metrics.pairwise import euclidean_distances\n",
"from tqdm import trange\n",
"from torch.utils.data import DataLoader\n",
"import matplotlib.pyplot as plt\n",
"import sys\n",
"import scipy.io as sio\n",
"import os"
"import scipy.io as sio"
]
},
{
Expand Down Expand Up @@ -119,24 +110,6 @@
" return codar_data['trace'].reshape(x1, y1*z1, order='C')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "d12c074c",
"metadata": {},
"outputs": [],
"source": [
"def get_data(): \n",
" if selected_dataset == 'pdb':\n",
" return get_pdb_coordinates()\n",
" elif selected_dataset == 'crd':\n",
" return get_crd_coordinates()\n",
" elif selected_dataset == 'xyz':\n",
" return get_xyz_coordinates()\n",
" elif selected_dataset == 'codar':\n",
" return get_codar_coordinates()"
]
},
{
"cell_type": "code",
"execution_count": 14,
Expand All @@ -145,7 +118,7 @@
"outputs": [],
"source": [
"def get_reduced_data():\n",
" p_data = get_data()\n",
" p_data = get_codar_coordinates()\n",
" X, _, _ = svd_wrapper(p_data, components, method=svd_method)\n",
" return X"
]
Expand Down

0 comments on commit bfa0d41

Please sign in to comment.