Skip to content

Instantly share code, notes, and snippets.

@baio
Created August 26, 2016 21:56
Show Gist options
  • Save baio/a24ca342e85ef9a2146dcf1db89b0fcf to your computer and use it in GitHub Desktop.
Save baio/a24ca342e85ef9a2146dcf1db89b0fcf to your computer and use it in GitHub Desktop.
deedle
let iris = Frame.ReadCsv("c:/dev/.data/mnist/mnist_train.csv")
//let iris = Frame.ReadCsv("c:/dev/.data/iris.csv")
let keys = iris.ColumnKeys |> Seq.toArray
let x = iris.Columns.[keys.[1..784]]
let mu = x |> Stats.mean
let std = x |> Stats.stdDev
let norm =
x
|> Frame.mapRowValues (fun r -> (r.As<float>() - mu) / std)
|> Frame.ofRows
printfn "%A" norm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment