コード例 #1
0
def algorithm1_print_running():
    rfa = al1.create()

    rfa.train('TestData(2018).csv')

    def print_results(host, guest):
        print('Statistic for ' + host + ' against ' + guest + ':')
        results = rfa.request(dict(host=host, guest=guest))
        for (x, y) in results.items():
            print(x + ": " + str(y))
        print()

    print_results('Borussia Dortmund', 'SC Freiburg')
    print_results('SC Freiburg', 'FC Bayern')
コード例 #2
0
ファイル: test_GUI.py プロジェクト: Darris01/Team3
def test_algorithm_selection(new_gui):
    new_gui.update_smd(None)
    new_gui.select_crawl_from_season.set('2008')
    new_gui.select_crawl_to_season.set('2008')
    new_gui.start_crawler()
    new_gui.select_algorithm.set('RelativeFrequencyAlgorithm')
    new_gui.start_training()
    new_gui.select_home.set('Arminia Bielefeld')
    new_gui.select_away.set('Bayer Leverkusen')
    new_gui.start_prediction()
    result_gui = new_gui.is_trained[0]

    rfa = algorithm1.create()
    rfa.train('matches.csv')
    result_algorithm = rfa.request(
        dict(
            host='Arminia Bielefeld',
            guest='Bayer Leverkusen'))
    assert result_algorithm == result_gui
コード例 #3
0
def rfa():
    rfa = al1.create()
    return rfa