Ejemplo n.º 1
0
import features.diff_type as dt

formatter = logging.Formatter('%(asctime)s %(message)s')

logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INFO)

fh = logging.FileHandler(config.DIR_PATH + 'kp1_jobs.log')
fh.setFormatter(formatter)
logger.addHandler(fh)

# exp num bins
logger.info('kp1 exp 1: different number of bins')
jobs.run_experiments(
    graphs=[gc.Graph.init_barabasi_m5_n1000()],
    embeddings=[gem.GEM_embedding.init_hope(),
                gem.GEM_embedding.init_sdne()],
    list_num_bins=[5, 10, 20, 50, 100, 200, 500],
    logger=logger)

# exp num used training graphs
logger.info('kp1 exp 2: different number of training graphs')
jobs.run_experiments(
    graphs=[gc.Graph.init_barabasi_m5_n1000()],
    embeddings=[gem.GEM_embedding.init_hope(),
                gem.GEM_embedding.init_sdne()],
    list_num_tr_graphs=[1, 2, 5, 10, 20],
    logger=logger)

# exp num iterations
logger.info('kp1 exp 3: number of embeddings on same graph')
jobs.run_experiments(graphs=[gc.Graph.init_barabasi_m5_n1000()],
Ejemplo n.º 2
0
formatter = logging.Formatter('%(asctime)s %(message)s')

logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INFO)

fh = logging.FileHandler(config.DIR_PATH + f'{__name__}.log')
fh.setFormatter(formatter)
logger.addHandler(fh)

logger.info('kp1 exp 1: all graphs')
jobs.run_experiments(graphs=gc.Graph.init_all_barabasi_graphs(),
                     embeddings=[
                         n2v.Node2VecPathSnapEmbGensim(),
                         line.Line(),
                         gem.GEM_embedding.init_hope()
                     ],
                     logger=logger,
                     num_eval_iter=5,
                     all_embs_trained=True,
                     assure_used_nodes=True)

# exp num iterations
logger.info('kp1 exp 4: exp on diff type difference')
jobs.run_experiments(graphs=[gc.Graph.init_barabasi_m5_n1000()],
                     embeddings=[
                         n2v.Node2VecPathSnapEmbGensim(),
                         line.Line(),
                         gem.GEM_embedding.init_hope()
                     ],
                     list_num_iter=[1, 2, 5, 10],
                     diff_types=[dt.DiffType.DIFFERENCE],
Ejemplo n.º 3
0
import sys
sys.path.insert(0, "..")

import jobs.all_exp as jobs

import graphs.graph_class as gc
import embeddings.line as line
import embeddings.node2vec_c_path_gensim_emb as n2v
import embeddings.GEM_embeddings as gem
import features.diff_type as dt

jobs.run_experiments(graphs=[gc.Graph.init_karate_club_graph()],
                     embeddings=[gem.GEM_embedding.init_hope(8), n2v.Node2VecPathSnapEmbGensim(), line.Line(),
                                 gem.GEM_embedding.init_sdne()], list_num_tr_graphs=[1], num_test_eval=1)
Ejemplo n.º 4
0
import features.diff_type as dt

formatter = logging.Formatter('%(asctime)s %(message)s')

logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INFO)

fh = logging.FileHandler(config.DIR_PATH + 'kp0_jobs.log')
fh.setFormatter(formatter)
logger.addHandler(fh)

# exp num bins
logger.info('kp0 exp 1: different number of bins')
jobs.run_experiments(
    graphs=[gc.Graph.init_facebook_wosn_2009_snowball_sampled_2000()],
    embeddings=[gem.GEM_embedding.init_hope(),
                gem.GEM_embedding.init_sdne()],
    list_num_bins=[5, 10, 20, 50, 100, 200, 500],
    logger=logger)

# exp num used training graphs
logger.info('kp0 exp 2: different number of training graphs')
jobs.run_experiments(
    graphs=[gc.Graph.init_facebook_wosn_2009_snowball_sampled_2000()],
    embeddings=[gem.GEM_embedding.init_hope(),
                gem.GEM_embedding.init_sdne()],
    list_num_tr_graphs=[1, 2, 5, 10],
    logger=logger)

# exp num iterations
logger.info('kp0 exp 3: different num iterations')
jobs.run_experiments(