from sklearn.svm import SVC from mlxtend.classifier import EnsembleClassifier from asap import train_window_classifier, PeptidePredictor, FeatureSelectionPipeline from cleavepred import util from cleavepred import project_paths from cleavepred.common import window_extraction_params ### Parse arguments ### advanced = util.parse_bool(sys.argv[1]) if len(sys.argv) > 2: if sys.argv[2].lower() == 'auto': predictor_dump_path = project_paths.get_peptide_predictor_dump_file_path( advanced) else: predictor_dump_path = sys.argv[2] else: predictor_dump_path = None ### Configuration ### # We use NeuroPred's dataset for training/validation of our predictors. project_paths.dataset_name = 'neuropred' ensemble_classifiers = [ LogisticRegressionCV(Cs=16, n_jobs=-2, class_weight='auto'), RandomForestClassifier(n_estimators=250, bootstrap=True, criterion='gini',
def open_files(): global predictor_dump_file, windows_file predictor_dump_file = open( project_paths.get_peptide_predictor_dump_file_path(advanced), 'rb') windows_file = open(project_paths.get_window_features_file_path(advanced), 'rb')
def open_files(): global predictor_dump_file, windows_file predictor_dump_file = open(project_paths.get_peptide_predictor_dump_file_path(advanced), 'rb') windows_file = open(project_paths.get_window_features_file_path(advanced), 'rb')
from sklearn.svm import SVC from mlxtend.classifier import EnsembleClassifier from asap import train_window_classifier, PeptidePredictor, FeatureSelectionPipeline from cleavepred import util from cleavepred import project_paths from cleavepred.common import window_extraction_params ### Parse arguments ### advanced = util.parse_bool(sys.argv[1]) if len(sys.argv) > 2: if sys.argv[2].lower() == 'auto': predictor_dump_path = project_paths.get_peptide_predictor_dump_file_path(advanced) else: predictor_dump_path = sys.argv[2] else: predictor_dump_path = None ### Configuration ### # We use NeuroPred's dataset for training/validation of our predictors. project_paths.dataset_name = 'neuropred' ensemble_classifiers = [ LogisticRegressionCV(Cs = 16, n_jobs = -2, class_weight = 'auto'), RandomForestClassifier(n_estimators = 250, bootstrap = True, criterion = 'gini', n_jobs = -2, class_weight = 'auto'), SVC(kernel = 'rbf', C = 3.798, probability = True, cache_size = 2400, class_weight = 'auto'), ]