<jupyter_start><jupyter_text>Training Data<jupyter_code>career_h = pp.gen_career_stats(master_h1, position_group = 'hitters', pt_metric = pt_metric_h)
career_p = pp.gen_career_stats(master_p1, position_group = 'pitchers', pt_metric = pt_metric_p)
master_h2 = pp.feature_engineering(master_h1, career_h, position_group = 'hitters', pt_metric = pt_metric_h)
master_p2 = pp.feature_engineering(master_p1, career_p, position_group = 'pitchers', pt_metric = pt_metric_p)
master_h3 = pp.drop_out_of_position(master_h2,position_group = 'hitters')
master_p3 = pp.drop_out_of_position(master_p2,position_group = 'pitchers')
master_h4 = pp.limit_years(master_h3,start_year=2015)
master_p4 = pp.limit_years(master_p3,start_year=2015)
master_sp4,master_rp4 = pp.split_pitchers(master_p4)
master_h5 = pp.make_targets(master_h4, counting_stats_h, per_metric_h)
master_sp5 = pp.make_targets(master_sp4, counting_stats_sp, per_metric_sp)
master_rp5 = pp.make_targets(master_rp4, counting_stats_rp, per_metric_rp)
master_h6 = pp.organize_training_columns(master_h5,position_group='hitters')
master_sp6 = pp.organize_training_columns(master_sp5,position_group='SP')
master_rp6 = pp.organize_training_columns(master_rp5,position_group='RP')
master_h7 = pp.remove_missing(master_h6,position_group='hitters')
master_sp7 = pp.remove_missing(master_sp6,position_group='SP')
master_rp7 = pp.remove_missing(master_rp6,position_group='RP')
master_h7.to_csv('data/processed/hitters/'+str(season)+'/modeling.csv')
master_sp7.to_csv('data/processed/SP/'+str(season)+'/modeling.csv')
master_rp7.to_csv('data/processed/RP/'+str(season)+'/modeling.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12053301029678982, 'fraction_numerical': 0.02786190187764991, 'mean_word_length': 11.707692307692307, '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': '656547', 'license': 'FTL', 'n_tokens_mistral': 660, 'n_tokens_neox': 635, 'n_words': 66, 'path': 'notebooks/02_PreProcessing.ipynb', 'repo_name': 'cvoglewede/boba', 'size': '1651'}