本文整理汇总了Python中history.History.build方法的典型用法代码示例。如果您正苦于以下问题:Python History.build方法的具体用法?Python History.build怎么用?Python History.build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类history.History
的用法示例。
在下文中一共展示了History.build方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Data
# 需要导入模块: from history import History [as 别名]
# 或者: from history.History import build [as 别名]
ref_path = os.getcwd()+r"\..\data\hist_"+str(in_period)+"_"+str(fi_period)+".txt"
images_path = os.getcwd()+r"\..\results\images\\"
pajek_path = os.getcwd()+r"\..\results\networks\\"
data = Data(separator=separator,ini=in_period,fin=fi_period,path=ref_path)
conf_name = "_conf_"
if deploy_know_how_relations:
conf_name += "KH_"
if deploy_rivality_relations:
conf_name += "RIV_"
#Loading Data
data_content = data.read_dataset(season_sep=season_sep)
data_model = History()
data_model.build(seasons_content=data_content,seasons_ids=seasons_evaluated)
#Building the model
temporal_network = {}
temporal_network_kh = {}
temporal_network_riv = {}
for i in range(0,len(seasons_evaluated),1):
season = seasons_evaluated[i]
network_name = r"Network_of_season_" + str(season)# + conf_name
current_data = data_model.getSeason(season)
G = nx.DiGraph(season=season)
G_kh = nx.DiGraph(season=season)
G_riv = nx.DiGraph(season=season)
current_crews = current_data.getCrews()
current_actuations = current_data.getActuations()
for crew in current_crews.items():