Ejemplo n.º 1
0
import itertools
import numpy as np
import exp_util

import sys
sys.path.append('../')
import util

ratio_step = 5
rounds = 5
# for the main program
iterations = list(itertools.product(*[[0], [1], range(rounds)]))
model_name = sys.argv[2]
features = exp_util.get_features_ctgs(sys.argv[3:])

dataframe = util.load_wild_df()

if features == 'all' or ['all'] == features:
    res_dir = '{}/exp-noPackedBenign-noDll/{}/all'.format(
        exp_util.RES_ROOT, model_name)
else:
    res_dir = '{}/exp-noPackedBenign-noDll/{}/{}'.format(
        exp_util.RES_ROOT, model_name, '-'.join(sorted(features)))
util.make_dir(res_dir)
database = '{}/exp.db'.format(res_dir)

n_workers = 5
cores_per_worker = -1


def process_dataset(df, seed):
Ejemplo n.º 2
0
import itertools
import exp_util

import sys
sys.path.append('../')
import util

rounds = 5
# for the main program
iterations = list(itertools.product(*[[1.0], [1.0], range(rounds)]))
model_name = sys.argv[2]
features = sys.argv[5:]
features = exp_util.get_features_ctgs(features)

train_packer = sys.argv[3].split("-")
test_packer = sys.argv[4].split("-")
packers = []
packers.extend(train_packer)
packers.extend(test_packer)

dataframe = util.load_wildlab_df()

if features == 'all' or ['all'] == features:
    res_dir = '{}/exp-packervspacker/{}/{}-vs-{}/all'.format(
        exp_util.RES_ROOT, model_name, sys.argv[2], sys.argv[3])
else:
    res_dir = '{}/exp-packervspacker/{}/{}-vs-{}/{}'.format(
        exp_util.RES_ROOT, model_name, sys.argv[2], sys.argv[3],
        '-'.join(sorted(features)))
util.make_dir(res_dir)
database = '{}/exp.db'.format(res_dir)