<jupyter_start><jupyter_text>Betting Odds SelectorRun for Week 10<jupyter_code>import sys
path_to_working_script = r'..\bettors_probs'
sys.path.append(path_to_working_script)

import bettors_probs
import pandas as pd
import pickle
import warnings
import matplotlib.pyplot as plt
import numpy as np
# load the starting dataframe
path = r'..\source_data'

file = 'week_10.xlsx'
week10 = pd.read_excel(path+'\\'+file)
# load the regression model pickle file
file = 'log_reg_spread_model.pkl'
loaded_model = pickle.load(open(path+'\\'+file, 'rb'))
week10
# create a BettorsProbs object, which is just some functions, really
bp = bettors_probs.BettorsProbs()
# return probabilities from spreads
probs = bp.probs_spreads(spreads = week10.Spread, model = loaded_model)
# run bet_strength
bet_strength = bp.bet_strength(bettors  = week10.Bettors,
                       spreads = week10.Spread, model = loaded_model)
week10['Probs'] = probs
week10['Bet_strength'] = bet_strength
week10<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09930486593843098, 'fraction_numerical': 0.019860973187686197, 'mean_word_length': 5.503225806451613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '238983', 'license': 'MIT', 'n_tokens_mistral': 380, 'n_tokens_neox': 353, 'n_words': 85, 'path': 'bettors_probs/notebooks/week10.ipynb', 'repo_name': 'gbrunkhorst/nfl-survivor', 'size': '1007'}