Skip to content

Basic functions for clustering data: k-means, dp-means, etc.

License

Notifications You must be signed in to change notification settings

ianfiske/Clustering.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Pkg.add("Clustering")

Functionality

  • k_means
  • dp_means

Examples

using DataFrames, RDatasets, Clustering

iris = data("datasets", "iris")

k = length(unique(iris[:, "Species"]))

clusters = k_means(iris[:, 2:5], k)

df = DataFrame()
df["Cluster"] = clusters.assignments
df["Label"] = iris[:, "Species"]
head(df)

by(df, ["Cluster", "Label"], nrow)

clusters = dp_means(iris[:, 2:5], 6.0)

df = DataFrame()
df["Cluster"] = clusters.assignments
df["Label"] = iris[:, "Species"]
head(df)

by(df, ["Cluster", "Label"], nrow)

About

Basic functions for clustering data: k-means, dp-means, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%