Example #1
0
def regression(data, bet_choices=3, fair=True, margin='basic'):
    linear = Regression(data=data, bet_choices=bet_choices)
    odds = find_correct_odds(fair=fair, margin=margin, generating=linear)
    lin = linear.run(model="Linear", odds=odds)
    log = linear.run(model="Logistic", odds=odds)
    return lin, log
Example #2
0
if __name__ == '__main__':
    arguments = parser.parse_args()

    comparison = RasterCompare(**vars(arguments))
    comparison.prepare()

    if arguments.area_plots:
        area_plot = AreaPlot(**comparison.file_args())
        [area_plot.plot(attr) for attr in AreaPlot.TYPES]
        del area_plot

    if arguments.differences:
        area_difference = AreaDifferences(**comparison.file_args())
        [area_difference.plot(attr) for attr in AreaDifferences.TYPES]
        del area_difference

        ortho_difference = OrthoDifference(ortho_image=comparison.check_path(
            arguments.ortho_image),
                                           **comparison.file_args())
        ortho_difference.plot()
        del ortho_difference

    if arguments.histograms:
        histogram = Histogram(**comparison.file_args())
        [histogram.plot(attr) for attr in Histogram.TYPES]
        del histogram

    if arguments.regression:
        regression = Regression(**comparison.file_args())
        regression.run()