Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
szcf-weiya committed Aug 18, 2019
1 parent bd012f5 commit ddebe6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/LDA/diagonalLDA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function DiagLDA(X::Array{Float64, 2}, y::Array{Int})
# for each class
for k = 1:K
# obs in class k
idx = convert(Array{Bool, 2}, ytrain'.==k)[:] # first convert from BitArray to Bool Array, then reduce to a vector
idx = convert(Array{Bool, 2}, y'.==k)[:] # first convert from BitArray to Bool Array, then reduce to a vector
Xk = X[:, idx]
# mean
xk_bar = mean(Xk, dims = 2)
Expand Down

0 comments on commit ddebe6a

Please sign in to comment.