當前位置: 首頁>>代碼示例>>Python>>正文


Python utils.feature_reader方法代碼示例

本文整理匯總了Python中utils.feature_reader方法的典型用法代碼示例。如果您正苦於以下問題:Python utils.feature_reader方法的具體用法?Python utils.feature_reader怎麽用?Python utils.feature_reader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在utils的用法示例。


在下文中一共展示了utils.feature_reader方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import feature_reader [as 別名]
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) 
開發者ID:benedekrozemberczki,項目名稱:GraphWaveletNeuralNetwork,代碼行數:18,代碼來源:main.py

示例2: main

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import feature_reader [as 別名]
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() 
開發者ID:benedekrozemberczki,項目名稱:MixHop-and-N-GCN,代碼行數:20,代碼來源:main.py

示例3: main

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import feature_reader [as 別名]
def main():
    """
    Parsing command line parameters, reading data, graph decomposition, fitting a ClusterGCN 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)
    clustering_machine = ClusteringMachine(args, graph, features, target)
    clustering_machine.decompose()
    gcn_trainer = ClusterGCNTrainer(args, clustering_machine)
    gcn_trainer.train()
    gcn_trainer.test() 
開發者ID:benedekrozemberczki,項目名稱:ClusterGCN,代碼行數:17,代碼來源:main.py

示例4: main

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import feature_reader [as 別名]
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() 
開發者ID:benedekrozemberczki,項目名稱:APPNP,代碼行數:14,代碼來源:main.py


注:本文中的utils.feature_reader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。