本文整理汇总了Python中scraper.Scraper.retrieve_games方法的典型用法代码示例。如果您正苦于以下问题:Python Scraper.retrieve_games方法的具体用法?Python Scraper.retrieve_games怎么用?Python Scraper.retrieve_games使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scraper.Scraper
的用法示例。
在下文中一共展示了Scraper.retrieve_games方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Scraper
# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import retrieve_games [as 别名]
import sys
import copy
from scraper import Scraper
from neat import config, population, chromosome, genome
from neat.nn import nn_pure as nn
config.load('nba_predict_config')
# set node gene type
chromosome.node_gene_type = genome.NodeGene
# scrape web for training set statistics
stats_scraper = Scraper()
games = stats_scraper.retrieve_games()
teams = stats_scraper.retrieve_teams()
MAX_FITNESS = 1000
def eval_fitness(population):
for chromo in population:
net = nn.create_ffphenotype(chromo)
fitness = MAX_FITNESS
possible_fitness = 0
num_correct = 0
for game in games:
#print
#print game.home() + " vs " + game.away()
inputs = []