Example #1
0
def test_all_player_features(self):

    season = Season(2013)

    all_players = players.find({}).sort('id', pymongo.ASCENDING)
    offensive_features = []

    for player_data in all_players:
        player = Player(player_data['id'])
        print 'Extracting offensive features for {} from the {}'.format(player, season)
        features = player_ocluster_features(player, season)
        offensive_features.append(features)

    offensive_features = np.array(offensive_features)
Example #2
0
def test_features():

    season = Season(2013)
    player = Player(399725)

    features = player_ocluster_features(player, season)