Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected output of kmeans with Array of zeros #169

Open
adrien-le-franc opened this issue May 22, 2019 · 0 comments
Open

Unexpected output of kmeans with Array of zeros #169

adrien-le-franc opened this issue May 22, 2019 · 0 comments

Comments

@adrien-le-franc
Copy link

adrien-le-franc commented May 22, 2019

I noticed the following:

x = zeros(1, 100)
r = kmeans(x, 5)

output:

julia> r.centers
1×5 Array{Float64,2}:
 0.0  0.0  0.0  0.0  0.0
julia> r.cweights
5-element Array{Int64,1}:
             100
 140247151137392
 140247151137440
 140247151137488
 140247151137536

The cweights value is problematic. I am using Julia 1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant