Merge pull request #587 from KristofferC/patch-2

use uncorrected standard deviation in normalise
This commit is contained in:
Mike J Innes 2019-02-04 14:35:25 +00:00 committed by GitHub
commit 940b1e6dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,6 @@ Normalise each column of `x` to mean 0 and standard deviation 1.
"""
function normalise(x::AbstractVecOrMat)
μ′ = mean(x, dims = 1)
σ = std(x, dims = 1, mean = μ′)
σ = std(x, dims = 1, mean = μ′, corrected=false)
return (x .- μ′) ./ σ
end