Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created July 23, 2020 17:47
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/79123edcbbeba935170b8bed0094f0e6 to your computer and use it in GitHub Desktop.
Save mdfarragher/79123edcbbeba935170b8bed0094f0e6 to your computer and use it in GitHub Desktop.
/// file paths to train and test data files (assumes os = windows!)
let trainDataPath = sprintf "%s\\mnist_train.csv" Environment.CurrentDirectory
let testDataPath = sprintf "%s\\mnist_test.csv" Environment.CurrentDirectory
[<EntryPoint>]
let main argv =
// create a machine learning context
let context = new MLContext()
// load the datafiles
let trainData = context.Data.LoadFromTextFile<Digit>(trainDataPath, hasHeader = true, separatorChar = ',')
let testData = context.Data.LoadFromTextFile<Digit>(testDataPath, hasHeader = true, separatorChar = ',')
// 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