Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created July 22, 2020 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdfarragher/e2f39403546071ea12e4a0bea16d2f10 to your computer and use it in GitHub Desktop.
Save mdfarragher/e2f39403546071ea12e4a0bea16d2f10 to your computer and use it in GitHub Desktop.
open System
open System.IO
open Microsoft.ML
open Microsoft.ML.Data
/// The HeartData record holds one single heart data record.
[<CLIMutable>]
type HeartData = {
[<LoadColumn(0)>] Age : float32
[<LoadColumn(1)>] Sex : float32
[<LoadColumn(2)>] Cp : float32
[<LoadColumn(3)>] TrestBps : float32
[<LoadColumn(4)>] Chol : float32
[<LoadColumn(5)>] Fbs : float32
[<LoadColumn(6)>] RestEcg : float32
[<LoadColumn(7)>] Thalac : float32
[<LoadColumn(8)>] Exang : float32
[<LoadColumn(9)>] OldPeak : float32
[<LoadColumn(10)>] Slope : float32
[<LoadColumn(11)>] Ca : float32
[<LoadColumn(12)>] Thal : float32
[<LoadColumn(13)>] Diagnosis : float32
}
/// The HeartPrediction class contains a single heart data prediction.
[<CLIMutable>]
type HeartPrediction = {
[<ColumnName("PredictedLabel")>] Prediction : bool
Probability : float32
Score : float32
}
// the rest of the code goes here....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment