3 ms·
Would Haskell's type system really prevent statistical biases like data snooping, etc?
by droidist2 8y ago
Would Haskell's type system really prevent statistical biases like data snooping, etc?
- claytonjy 8y agomy suspicion is "no", but I'd love to be proven wrong; backtest validity ensured by dependent time-aware types would be a heck of a tool!
- ggm 8y agoIt would prevent mashing distinct data types without conscious effort. So, if you type the financial data to plus and minus sides, as distinct types, you cannot cross combine them without an explicit moment to do it in the way you understand (that is, if they are what in C you'd call both integers plus and minus, but logistically could not be simply combined without some context, they typing moment here would make it far less likely you did that except in known ways) and, the flow of change over compositions of functions in types, you really have to have done the hard yards, dealt with 'maybe this doesn't exist' situations. continuations. I don't think it would stop you mis-applying a construct as a method on something, so misuse a statistical model, no. But nothing can prevent acts of ignorance (as I know to my own shame, I tried to apply the K-S test to disparate samples, and the moment of 'you cannot compare area under a curve for a nail and a gaussian distribution' completely passed me by. Five minutes with a competent statistician cleared it out)