<jupyter_start><jupyter_text>Template for test<jupyter_code>from pred import Predictor
from pred import sequence_vector
from pred import chemical_vector<jupyter_output>/Users/mark/anaconda3/lib/python3.6/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)<jupyter_text>Controlling for Random Negatve vs Sans Random in Imbalanced Techniques using S, T, and Y Phosphorylation.Included is N Phosphorylation however no benchmarks are available, yet. Training data is from phospho.elm and benchmarks are from dbptm.<jupyter_code>par = ["pass", "ADASYN", "SMOTEENN", "random_under_sample", "ncl", "near_miss"]
for i in par:
    print("y", i)
    y = Predictor()
    y.load_data(file="Data/Training/clean_s_filtered.csv")
    y.process_data(vector_function="sequence", amino_acid="S", imbalance_function=i, random_data=0)
    y.supervised_training("mlp_adam")
    y.benchmark("Data/Benchmarks/phos.csv", "S")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_s_filtered.csv")
    x.process_data(vector_function="sequence", amino_acid="S", imbalance_function=i, random_data=1)
    x.supervised_training("mlp_adam")
    x.benchmark("Data/Benchmarks/phos.csv", "S")
    del x<jupyter_output>y pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Training Data Points: 200363
Test Data Points: 50091
Starting Training
Done training
Test Results
Sensitivity: 0.9317468902109248
Specificity : 0.9979434950790775
Accuracy: 0.9857259787187319
ROC 0.964845192645
TP 8614 FP 84 TN 40762 FN 631



None
Cross: Validation: [ 0.9849477   0.985167    0.98564612  0.98560591  0.98612498]
Number of data points in benchmark 65895
Benchmark Results 
Failed
TP 0 FP 0 TN 62517 FN 3378



None
x pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Random Sequences Generated 250454
Filtering Random Data
Random Data Added: 250454
Finished with Random Data
Training Data Points: 450817
Test Data Points: 50091
Starting Training
Done training
Test Results
Sensitivity: 0.9301850258175559
Specificity : 0.998038975364628
Accuracy: 0.9854464873929448
ROC 0.964112000591
TP 8647 FP 80 TN 40715 FN 649



None
Cross: Validation: [ 0.98470814  0.98550638  0.98590565  0.985[...]<jupyter_text>Y Phosphorylation<jupyter_code>par = ["pass", "ADASYN", "SMOTEENN", "random_under_sample", "ncl", "near_miss"]
for i in par:
    print("y", i)
    y = Predictor()
    y.load_data(file="Data/Training/clean_Y_filtered.csv")
    y.process_data(vector_function="sequence", amino_acid="Y", imbalance_function=i, random_data=0)
    y.supervised_training("mlp_adam")
    y.benchmark("Data/Benchmarks/phos.csv", "Y")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_Y_filtered.csv")
    x.process_data(vector_function="sequence", amino_acid="Y", imbalance_function=i, random_data=1)
    x.supervised_training("mlp_adam")
    x.benchmark("Data/Benchmarks/phos.csv", "Y")
    del x<jupyter_output>y pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Training Data Points: 10099
Test Data Points: 2525
Starting Training
Done training
Test Results
Sensitivity: 0.06542056074766354
Specificity : 0.9884201819685691
Accuracy: 0.9493069306930693
ROC 0.526920371358
TP 7 FP 28 TN 2390 FN 100



None
Cross: Validation: [ 0.95091053  0.95247525  0.95207921  0.95245642  0.95126783]
Number of data points in benchmark 23555
Benchmark Results 
Failed
TP 0 FP 242 TN 23272 FN 41



None
x pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Random Sequences Generated 12624
Filtering Random Data
Random Data Added: 12624
Finished with Random Data
Training Data Points: 22723
Test Data Points: 2525
Starting Training
Done training
Test Results
Sensitivity: 0.050505050505050504
Specificity : 0.9954657873042044
Accuracy: 0.9584158415841584
ROC 0.522985418905
TP 5 FP 11 TN 2415 FN 94



None
Cross: Validation: [ 0.95130641  0.95287129  0.95128713  0.95285261  0.95[...]<jupyter_text>T Phosphorylation<jupyter_code>par = ["pass", "ADASYN", "SMOTEENN", "random_under_sample", "ncl", "near_miss"]
for i in par:
    print("y", i)
    y = Predictor()
    y.load_data(file="Data/Training/clean_t_filtered.csv")
    y.process_data(vector_function="sequence", amino_acid="T", imbalance_function=i, random_data=0)
    y.supervised_training("mlp_adam")
    y.benchmark("Data/Benchmarks/phos.csv", "T")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_t_filtered.csv")
    x.process_data(vector_function="sequence", amino_acid="T", imbalance_function=i, random_data=1)
    x.supervised_training("mlp_adam")
    x.benchmark("Data/Benchmarks/phos.csv", "T")
    del x<jupyter_output>y pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Training Data Points: 66323
Test Data Points: 16581
Starting Training
Done training
Test Results
Sensitivity: 0.8927526811829705
Specificity : 0.9969638625592417
Accuracy: 0.9776249924612508
ROC 0.944858271871
TP 2747 FP 41 TN 13463 FN 330



None
Cross: Validation: [ 0.98015921  0.98015921  0.98100121  0.98148372  0.98082027]
Number of data points in benchmark 47730
Benchmark Results 
Sensitivity: 0.0008110300081103001
Specificity : 0.999010688861647
Accuracy: 0.9732243871778755
ROC 0.499910859435
TP 1 FP 46 TN 46451 FN 1232



None
x pass
Loading Data
Loaded Data
Working on Data
Finished working with Data
Random Sequences Generated 82904
Filtering Random Data
Random Data Added: 82904
Finished with Random Data
Training Data Points: 149227
Test Data Points: 16581
Starting Training
Done training
Test Results
Sensitivity: 0.8998022412656559
Specificity : 0.9990403779434561
Accuracy: 0.9808817321030094
ROC 0.949421[...]
{'fraction_non_alphanumeric': 0.08631197496293856, 'fraction_numerical': 0.14346895074946467, 'mean_word_length': 5.084168336673347, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '184990', 'license': 'MIT', 'n_tokens_mistral': 2773, 'n_tokens_neox': 2076, 'n_words': 615, 'path': '.ipynb_checkpoints/Phosphorylation Sequence Tests -MLP -dbptm+ELM-VectorAvr.-checkpoint.ipynb', 'repo_name': 'vzg100/ProtienFolding', 'size': '6071'}