-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.py
54 lines (48 loc) · 1.05 KB
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Imports
import argparse
import scipy.io
import sys
import os
import copy
import warnings
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import networkx as nx
import pprint
import collections
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib
import sortedcontainers
import pandas as pd
import seaborn as sns
import random
import itertools
import stan
import pickle
import multiprocessing
import torch
import torch.nn as nn
from sklearn import linear_model, metrics
from scipy.optimize import minimize, curve_fit
from scipy import stats
from scipy import special
from scipy import sparse as scipy_sparse
from tqdm import tqdm
from numba import jit
import sparse
if not sys.warnoptions:
warnings.simplefilter("ignore")
# Headless environment for plotting
matplotlib.use('Agg')
# Seeds
np.random.seed(0)
torch.manual_seed(0)
# Aesthetics
LARGE_SIZE = 20
plt.rc('axes', labelsize=LARGE_SIZE)
plt.rc('axes', titlesize=LARGE_SIZE)
sns.set_theme(palette='colorblind')
DATA_ROOT = '/data/mp2242'