-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprep_mydata.py
More file actions
25 lines (19 loc) · 906 Bytes
/
prep_mydata.py
File metadata and controls
25 lines (19 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
from funcs import *
from sklearn.linear_model import SGDClassifier
from sklearn.metrics import confusion_matrix
from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
from sklearn.neural_network import MLPClassifier
from sklearn.metrics import plot_confusion_matrix, ConfusionMatrixDisplay
import pickle
import scipy.stats as st
def get_data():
#create a empty pandas dataframe
analysis_data = pd.DataFrame(columns=[])
#Get the data from database and populate the dataframe
analysis_data=query_db("credentials to retrieve data from GW-BSE database") #Database is not released yet for public
#save the data in a file
analysis_data.to_pickle("./files/db_testing.pkl")
#read the file+add features to the dataframe+write to another file
Add_features(["./files/db_testing_vis.pkl"],"./files/data_w_feature_vis.pkl")
get_data()