0
$\begingroup$

I am trying to create a machine learning model that takes in two different pandas data-frames from a basketball stats website and given multiple variables, will output a prediction of how many points a player will score in a future game. The issue I am having is that I have a data-frame of the player's historical stats for a season and a data-frame of their splits (stats for home vs. away, opponent, etc.) which has the different variables that I want the model to use in it's prediction. My goal is to use the player's past stats DF combined with their splits DF along with some given variables (ex. who their future opponent is), to predict how many points this player will score in a future game.

Should I try to combine these two different data-frames into one, and then train the model on this dataset, or is it possible to do it with two separate data-frames?

Here is what the stats (game by game) data-frame looks like:

Game    Date        Opp   3P%   PTS  
1   2023-10-24      PHO   .286  27
2   2023-10-27      SAC   .700  41
3   2023-10-29      HOU   .429  24
4   2023-10-30      NOP   .538  42

Here is what the splits data-frame looks like (have to look at by X and Y axis to find values):

Value   G   GS  MP   FG  FGA  3P   3PA  FT   PTS
Total   53  53  1769 480 1046 262  633  246  1468
Home    29  29  972  268 584  144  344  145  825
Away    24  24  797  212 462  118  289  101  643    
$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.