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/k_acetylation.csv")
    y.process_data(vector_function="sequence", amino_acid="K", imbalance_function=i, random_data=-1)
    y.supervised_training("xgb")
    y.benchmark("Data/Benchmarks/acet.csv", "K")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/k_acetylation.csv")
    x.process_data(vector_function="sequence", amino_acid="K", imbalance_function=i, random_data=1)
    x.supervised_training("xgb")
    x.benchmark("Data/Benchmarks/acet.csv", "K")
    del x


"""
Explanation: Controlling for Random Negatve vs Sans Random in Imbalanced Techniques using K acytelation.
Training data is from CUCKOO group 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/k_acetylation.csv")
    y.process_data(vector_function="chemical", amino_acid="K", imbalance_function=i, random_data=-1)
    y.supervised_training("xgb")
    y.benchmark("Data/Benchmarks/acet.csv", "K")
    del y
    print("x", i)
    x = Predictor()
    x.load_data(file="Data/Training/k_acetylation.csv")
    x.process_data(vector_function="chemical", amino_acid="K", imbalance_function=i, random_data=1)
    x.supervised_training("xgb")
    x.benchmark("Data/Benchmarks/acet.csv", "K")
    del x


"""
Explanation: Chemical Vector
End of explanation
"""


