melo icon indicating copy to clipboard operation
melo copied to clipboard

How to handle only positive spreads

Open Anjum48 opened this issue 4 years ago • 1 comments

I have some basketball data in this format:

image

Where WTeamID is always the winning team, meaning that the spread is always > 0. What's the best way of using Melo for this type of data?

I'm calling Melo like this and no mean regression:

commutes = False
lines = np.arange(-59.5, 60.5)

ncaa_spreads = Melo(k, lines=lines, commutes=commutes)
ncaa_spreads.fit(dates, teams_w, teams_l, spreads, biases)

for index, row in test_results.iterrows():
    winning_probs[index] = ncaa_spreads.probability(row['SelectionSunday'], row['WTeamID'], row['LTeamID'])

But on a rolling year validation, I am getting 100% accuracy (log loss goes to zero) which means that the model must just learn that the first team always wins?

Is there a way I could re-format the data or change an option to prevent this?

Anjum48 avatar Mar 07 '20 07:03 Anjum48