-
Notifications
You must be signed in to change notification settings - Fork 3
/
raw_test.py
58 lines (47 loc) · 1.89 KB
/
raw_test.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
import features.rawDataProcess as fm
import features.featureRegression as fr
import features.mdsVisualization as mv
import pandas as pd
import numpy as np
from features import rawDataProcess
dp = fm.rawDataProcess()
dp.loadFoldChangeTable("raw_data/master_short.fasta", "raw_data/carine_corrected_titers.csv")
dp.defineFeatures()
dp.exportFeatures("raw_data/carine_feature_set.csv")
dp.createUnknownComparison("raw_data/retest_final.fasta")
dp.exportTestSetFeatures("raw_data/retestset_final.csv")
regressor = fr.featureRegression("raw_data/carine_feature_set.csv")
regressor.trainRandomForestRegressor()
regressor.trainAdaBoostedRegressor()
regressor.trainMultilayerPerceptron()
#regressor.printEvaluationMetrics()
regressor.getCV()
regressor.getEnsembleCV()
#regressor.printSplitTest()
regressor.visualizePerformance()
regressor.predictUnknownSet("raw_data/retestset_final.csv")
regressor.exportUnknownSet("raw_data/pred_retest_final.csv")
#regressor.exportFeatureImportance("rawImportance.csv")
#regressor.getCV()
regressor.visualizePredictions()
"""
***
"""
dp = fm.rawDataProcess()
#dp.loadFoldChangeTable("raw_data/master.fasta", "raw_data/marcus_final.csv")
dp.loadFoldChangeTable("raw_data/master_short.fasta", "raw_data/carine_corrected_titers.csv")
dp.defineFeatures()
dp.exportFeatures("raw_data/carine_feature_set.csv")
dp.createUnknownComparison("raw_data/screen/h3clusterIVA.fasta")
dp.exportTestSetFeatures("raw_data/civascreen.csv")
regressor = fr.featureRegression("raw_data/carine_feature_set.csv")
regressor.trainRandomForestRegressor()
regressor.trainAdaBoostedRegressor()
regressor.trainMultilayerPerceptron()
regressor.printEvaluationMetrics()
regressor.visualizePerformance()
regressor.predictUnknownSet("raw_data/civascreen.csv")
regressor.exportUnknownSet("raw_data/pred_civascreen.csv")
#regressor.exportFeatureImportance("rawImportance.csv")
#regressor.getCV()
regressor.visualizePredictions()