from pred import Predictor
from pred import sequence_vector
from pred import chemical_vector

"""
Explanation: Template for test
End of explanation
"""


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.csv")
    y.process_data(vector_function="chemical", amino_acid="S", imbalance_function=i, random_data=0)
    y.supervised_training("svc")
    y.benchmark("Data/Benchmarks/phos.csv", "S")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_s.csv")
    x.process_data(vector_function="chemical", amino_acid="S", imbalance_function=i, random_data=1)
    x.supervised_training("svc")
    x.benchmark("Data/Benchmarks/phos.csv", "S")
    del x


"""
Explanation: 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.
End of explanation
"""


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.csv")
    y.process_data(vector_function="chemical", amino_acid="Y", imbalance_function=i, random_data=0)
    y.supervised_training("svc")
    y.benchmark("Data/Benchmarks/phos.csv", "Y")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_Y.csv")
    x.process_data(vector_function="chemical", amino_acid="Y", imbalance_function=i, random_data=1)
    x.supervised_training("svc")
    x.benchmark("Data/Benchmarks/phos.csv", "Y")
    del x


"""
Explanation: Y Phosphorylation
End of explanation
"""


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.csv")
    y.process_data(vector_function="chemical", amino_acid="T", imbalance_function=i, random_data=0)
    y.supervised_training("svc")
    y.benchmark("Data/Benchmarks/phos.csv", "T")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/clean_t.csv")
    x.process_data(vector_function="chemical", amino_acid="T", imbalance_function=i, random_data=1)
    x.supervised_training("svc")
    x.benchmark("Data/Benchmarks/phos.csv", "T")
    del x


"""
Explanation: T Phosphorylation
End of explanation
"""


