-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModels.fs
36 lines (28 loc) · 956 Bytes
/
Models.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module Models
open Util
type League = PL | BL | FR | SP
with member this.name = GetUnionCaseName this
let mapLeague str =
match str with
| "PL" -> PL
| "BL" -> BL
| "FR"-> FR
| "SP" -> SP
type Parameters = {
OddsThreshold : float;
PreviousGameCount: int;
AwayToHomeRatio: float;
League: League;
Score: float
}
with
member this.print =
printf "--------------------------------------------------\n{ League: %s OddsThreshold: %f AwayToHomeRatio: %f Previous games: %i } \n"
this.League.name this.OddsThreshold this.AwayToHomeRatio this.PreviousGameCount
override this.ToString() =
sprintf "%f,%i,%f,%s" this.OddsThreshold this.PreviousGameCount this.AwayToHomeRatio this.League.name
type Season = {
Year : int
League : League
}
let getLeagues = [ PL; FR; BL; SP ]