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/b8de6eae29d9a530ac8bb3c390a5569f to your computer and use it in GitHub Desktop.
Save mdfarragher/b8de6eae29d9a530ac8bb3c390a5569f to your computer and use it in GitHub Desktop.
/// file paths to data files (assumes os = windows!)
let dataPath = sprintf "%s\\processed.cleveland.data.csv" Environment.CurrentDirectory
/// The main application entry point.
[<EntryPoint>]
let main argv =
// set up a machine learning context
let context = new MLContext()
// load training and test data
let data = context.Data.LoadFromTextFile<HeartData>(dataPath, hasHeader = false, separatorChar = ',')
// split the data into a training and test partition
let partitions = context.Data.TrainTestSplit(data, testFraction = 0.2)
// the rest of the code goes here....
0 // return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment