Пример #1
0
                    length = length, base_folder = base_folder, 
                    training_file = os.path.join(model, 
                        data['ric_template']), output = 
                    "test_rric_results_" + args.output, folder = "")
        if algorithm == "REC":
            crossed_output =  functions.run_crossed(
                    filename = crossed_test, 
                    model = os.path.join(model, 
                        data['rec_crossed_model']), 
                    output = "test_crossed_results_" + args.output, 
                    base_folder = base_folder, folder="")

    #Read scores
    if algorithm == "CROSSED" or algorithm == "REC":
        crossed_scores = functions.read_crossed( 
                filename = crossed_output, original = args.test, 
                length = length)
        ric_scores = None
        rric_scores = None
    else:
        crossed_scores = None
    if algorithm != "CROSSED":
        if algorithm != "rRIC":
            ric_scores = functions.read_ric(ric_output)
        else:
            ric_scores = None
        if algorithm != "RIC":
            rric_scores = functions.read_ric(rric_output)
        else:
            rric_scores = None
Пример #2
0
    #Train CRoSSeD model
    model = functions.train_crossed(positive=crossed_positives,
            negative=crossed_negatives, model="CRoSSeD_model",
            unique=unique, base_folder=base_folder)
    #Aply CRoSSeD to input data
    crossed_positives_output = functions.run_crossed(
            filename=crossed_positives, model=model,
            output="test_crossed_positives", base_folder=base_folder,
            folder=unique)
    crossed_negatives_output = functions.run_crossed(
            filename=crossed_negatives, model=model,
            output="test_crossed_negatives", base_folder=base_folder,
            folder=unique)
    #Read scores
    crossed_positive_scores = functions.read_crossed(
            filename=crossed_positives_output, original=args.positive,
            length=length)
    crossed_negative_scores = functions.read_crossed(
            filename=crossed_negatives_output, original=args.negative,
            length=length)
    crossed_value_fdr = functions.get_threshold_unique(
            positive = crossed_positive_scores, 
            negative = crossed_negative_scores, 
            optim = "FDR")
    crossed_value_sen = functions.get_threshold_unique(
            positive = crossed_positive_scores, 
            negative = crossed_negative_scores, 
            optim = "SEN")

    """
    #Do REC CRoSSeD