CLOPE: A Fast and Effective Clustering Algorithm for Transactional Data
The algorithm's description http://www.inf.ufrgs.br/~alvares/CMP259DCBD/clope.pdf
If available in Hex, the package can be installed as:
- Add
clope
to your list of dependencies inmix.exs
:
def deps do
[{:clope, "~> 0.1.4"}]
end
- Ensure
clope
is started before your application:
def application do
[applications: [:clope]]
end
iex> input = [
{"transaction1", ["object1", "object2", "object3"]},
{"transaction2", ["object1", "object5"]},
{"transaction3", ["object2", "object3"]},
{"transaction4", ["object1", "object5"]}
]
iex> result = input |> Clope.clusterize(2)
[
[
{"transaction1", ["object1", "object2", "object3"]},
{"transaction3", ["object2", "object3"]}
],
[
{"transaction2", ["object1", "object5"]},
{"transaction4", ["object1", "object5"]}
]
]