How to use the formulas.init_slip function in formulas

To help you get started, we’ve selected a few formulas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sagefy / sagefy / simulation / sequencer.py View on Github external
slip_error += (my_card['slip'] - card['slip']) ** 2
        transit_error += (my_card['transit'] - card['transit']) ** 2

        print('%.2f %.2f   %.2f %.2f   %.2f %.2f' % (
            my_card['guess'], card['guess'], my_card['slip'], card['slip'],
            my_card['transit'], card['transit']))

    print('guess_error', sqrt(guess_error / len(my_cards)))
    print('slip_error', sqrt(slip_error / len(my_cards)))
    print('transit_error', sqrt(transit_error / len(my_cards)))

    guess_error, slip_error, transit_error = 0, 0, 0

    for card in cards:
        guess_error += (init_guess - card['guess']) ** 2
        slip_error += (init_slip - card['slip']) ** 2

    print('CONTROL guess_error', sqrt(guess_error / len(my_cards)))
    print('CONTROL slip_error', sqrt(slip_error / len(my_cards)))