Python param_parser.parameter_parser() Examples
The following are 15
code examples of param_parser.parameter_parser().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
param_parser
, or try the search function
.
Example #1
Source File: main.py From GraphWaveletNeuralNetwork with GNU General Public License v3.0 | 7 votes |
def main(): """ Parsing command line parameters, reading data. Doing sparsification, fitting a GWNN and saving the logs. """ args = parameter_parser() tab_printer(args) graph = graph_reader(args.edge_path) features = feature_reader(args.features_path) target = target_reader(args.target_path) sparsifier = WaveletSparsifier(graph, args.scale, args.approximation_order, args.tolerance) sparsifier.calculate_all_wavelets() trainer = GWNNTrainer(args, sparsifier, features, target) trainer.fit() trainer.score() save_logs(args, trainer.logs)
Example #2
Source File: main.py From SGCN with GNU General Public License v3.0 | 6 votes |
def main(): """ Parsing command line parameters. Creating target matrix. Fitting an SGCN. Predicting edge signs and saving the embedding. """ args = parameter_parser() tab_printer(args) edges = read_graph(args) trainer = SignedGCNTrainer(args, edges) trainer.setup_dataset() trainer.create_and_train_model() if args.test_size > 0: trainer.save_model() score_printer(trainer.logs) save_logs(args, trainer.logs)
Example #3
Source File: main.py From MixHop-and-N-GCN with GNU General Public License v3.0 | 6 votes |
def main(): """ Parsing command line parameters, reading data. Fitting an NGCN and scoring the model. """ args = parameter_parser() torch.manual_seed(args.seed) tab_printer(args) graph = graph_reader(args.edge_path) features = feature_reader(args.features_path) target = target_reader(args.target_path) trainer = Trainer(args, graph, features, target, True) trainer.fit() if args.model == "mixhop": trainer.evaluate_architecture() args = trainer.reset_architecture() trainer = Trainer(args, graph, features, target, False) trainer.fit()
Example #4
Source File: main.py From BANE with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command lines, creating target matrix, fitting BANE and saving the embedding. """ args = parameter_parser() tab_printer(args) P = read_graph(args) X = read_features(args) model = BANE(args, P, X) model.fit() model.save_embedding()
Example #5
Source File: main.py From EgoSplitting with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, creating EgoNets. Creating a partition of the persona graph. Saving the memberships. """ args = parameter_parser() tab_printer(args) graph = graph_reader(args.edge_path) splitter = EgoNetSplitter(args.resolution) splitter.fit(graph) membership_saver(args.output_path, splitter.overlapping_partitions)
Example #6
Source File: main.py From AttentionWalk with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command lines, creating target matrix. Fitting an Attention Walker and saving the embedding. """ args = parameter_parser() tab_printer(args) model = AttentionWalkTrainer(args) model.fit() model.save_model()
Example #7
Source File: main.py From Splitter with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters. Reading data, embedding base graph, creating persona graph and learning a splitter. Saving the persona mapping and the embedding. """ args = parameter_parser() torch.manual_seed(args.seed) tab_printer(args) graph = graph_reader(args.edge_path) trainer = SplitterTrainer(graph, args) trainer.fit() trainer.save_embedding() trainer.save_persona_graph_mapping()
Example #8
Source File: main.py From SINE with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command lines, creating target matrix. Fitting SINE and saving the embedding. """ args = parameter_parser() tab_printer(args) model = SINETrainer(args) model.fit() model.save_embedding()
Example #9
Source File: main.py From GAM with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, processing graphs, fitting a GAM. """ args = parameter_parser() tab_printer(args) model = GAMTrainer(args) model.fit() model.score() model.save_predictions_and_logs()
Example #10
Source File: main.py From NMFADMM with GNU General Public License v3.0 | 5 votes |
def execute_factorization(): """ Reading the target matrix, running optimization and saving to hard drive. """ args = parameter_parser() tab_printer(args) X = read_features(args.input_path) print("\nTraining started.\n") model = ADMM_NMF(X, args) model.optimize() print("\nFactors saved.\n") model.save_user_factors() model.save_item_factors()
Example #11
Source File: main.py From APPNP with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, reading data, fitting an APPNP/PPNP and scoring the model. """ args = parameter_parser() torch.manual_seed(args.seed) tab_printer(args) graph = graph_reader(args.edge_path) features = feature_reader(args.features_path) target = target_reader(args.target_path) trainer = APPNPTrainer(args, graph, features, target) trainer.fit()
Example #12
Source File: main.py From SimGNN with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, reading data. Fitting and scoring a SimGNN model. """ args = parameter_parser() tab_printer(args) trainer = SimGNNTrainer(args) trainer.fit() trainer.score()
Example #13
Source File: main.py From SEAL-CI with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, reading data. Fitting and scoring a SEAL-CI model. """ args = parameter_parser() tab_printer(args) trainer = SEALCITrainer(args) trainer.fit() trainer.score()
Example #14
Source File: main.py From CapsGNN with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, processing graphs, fitting a CapsGNN. """ args = parameter_parser() tab_printer(args) model = CapsGNNTrainer(args) model.fit() model.score() model.save_predictions()
Example #15
Source File: main.py From EdMot with GNU General Public License v3.0 | 5 votes |
def main(): """ Parsing command line parameters, reading data, fitting EdMot and scoring the model. """ args = parameter_parser() tab_printer(args) graph = graph_reader(args.edge_path) model = EdMot(graph, args.components, args.cutoff) memberships = model.fit() membership_saver(args.membership_path, memberships)