Carlos A Becker
06e72b51db
fix: example use same go version as root
...
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-22 14:40:42 +02:00
Carlos A Becker
4cf3d49f08
feat: less dependencies
...
sqlmock is used only in the example package, yet it bleed to everyone
using kmeans.
we can remove that dep by making the examples folder another go module,
which is what this pr does.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-22 14:40:42 +02:00
Christian Muehlhaeuser
2e48c94b98
fix: linter errors
2022-07-22 14:35:48 +02:00
Christian Muehlhaeuser
791b594458
ci: update lint workflows
2022-07-22 14:35:48 +02:00
Christian Muehlhaeuser
6e0e3eef01
Fix README plotter example
2021-09-13 15:37:28 +02:00
Christian Muehlhaeuser
251e9d44b4
Move plotter into a separate package
2021-09-13 14:27:53 +02:00
Christian Muehlhaeuser
fee7d5844f
Fix goreportcard badge
2021-05-19 06:38:37 +02:00
Christian Muehlhaeuser
206fe597ff
Bump go-chart dependency to v2.1.0
2020-12-07 04:47:47 +01:00
Christian Muehlhaeuser
2890282a9e
Switch to GitHub workflows
2020-10-27 16:27:59 +01:00
Diego Medina
66f1657148
Handle errors calling Plot() ( #14 )
...
The error returned by calling Plot() was being ignored.
2020-07-18 07:16:29 +02:00
Christian Muehlhaeuser
6525bf7c7e
go mod tidy
2020-06-03 21:26:12 +02:00
Phantasylos
aa28222dea
Bump go-chart dependency ( #12 )
2020-06-03 19:03:06 +02:00
Christian Muehlhaeuser
bb4104b438
Test against Go 1.14
2020-04-16 14:26:07 +02:00
Christian Muehlhaeuser
8d10a27920
Add GitHub metadata
2020-04-16 14:25:40 +02:00
Christian Muehlhaeuser
80dfc71e6c
Enable Go modules for TravisCI
2019-09-18 01:52:10 +02:00
Christian Muehlhaeuser
18cae3b472
Use Go modules
2019-09-18 01:47:47 +02:00
Christian Muehlhaeuser
69c35c49cc
Allow Go tip to fail on TravisCI
2019-08-07 06:50:43 +02:00
Christian Muehlhaeuser
95cd4abc10
Bump Go dependency to 1.9 for TravisCI
2019-06-05 02:54:05 +02:00
Christian Muehlhaeuser
5f86d5987c
Bump Go versions for TravisCI
2019-05-01 15:15:57 +02:00
Harald Nordgren
e36119fa8e
Bump Go versions
2018-10-30 23:06:33 +01:00
Christian Muehlhaeuser
144a85a37f
Never panic in Plot, return an error instead
2018-06-06 00:49:26 +02:00
Christian Muehlhaeuser
8f4a4acbca
Made randomSeed a const for tests
2018-06-05 23:57:10 +02:00
Christian Muehlhaeuser
a2eeac4878
Simplify colorpalette's example code
2018-06-05 23:27:50 +02:00
Christian Muehlhaeuser
b7064e5971
Prefix plot filename with current k
2018-06-05 23:27:50 +02:00
Christian Muehlhaeuser
76471daa2d
Code formatting fix
2018-06-05 23:27:50 +02:00
Christian Muehlhaeuser
8801d19944
Ensure another iteration after randomly assigning a point to a cluster
2018-06-05 23:27:50 +02:00
Christian Muehlhaeuser
c58ae78401
Moved clustering and observation structs to github.com/muesli/clusters
2018-06-05 23:27:50 +02:00
Christian Muehlhaeuser
0ad7a62e65
Fixed comment for plotter
2018-05-30 13:45:53 +02:00
Phil Opaola
4ef3a65ce6
Add benchmarks for partitioning with different Cluster sizes ( #3 )
2018-05-30 07:16:41 +02:00
Christian Muehlhaeuser
eaeb5a110c
Remove flawed Point.Equal function
2018-05-29 04:19:04 +02:00
Christian Muehlhaeuser
731515890f
Removing points from another cluster will fail due to float comparison
...
We don't actually need to remove the data point from another cluster, though,
since this only makes a difference in the very last iteration of the algorithm.
If there are still empty clusters in the last iteration, the data set will most
probably never converge.
2018-05-29 04:15:43 +02:00
Christian Muehlhaeuser
86f284616f
Don't empty one cluster just to fill another
2018-05-29 03:57:24 +02:00
Christian Muehlhaeuser
fd3d39c8f6
Return an error if the size of the data set is smaller than k
2018-05-29 03:56:06 +02:00
Christian Muehlhaeuser
c49d1033bc
Added Cluster.removePoint(point) for convenience
2018-05-29 03:54:58 +02:00
Christian Muehlhaeuser
ff5e403929
Added Point.Equal(other) for convenience
2018-05-29 03:54:28 +02:00
Christian Muehlhaeuser
a032677f99
Abort processing when iterationThreshold has been reached
2018-05-29 03:54:00 +02:00
Christian Muehlhaeuser
f93f9c935e
Added clues when to use k-means to README
2018-05-28 03:11:35 +02:00
Christian Muehlhaeuser
a41f2c18df
Removed obsolete code
2018-05-28 01:06:42 +02:00
Christian Muehlhaeuser
0f747a74f8
Use the easier to distinguish colors first for plotting data
2018-05-28 01:06:20 +02:00
Christian Muehlhaeuser
ba34fac784
Use random data points in the simple example and README
2018-05-28 01:05:38 +02:00
Christian Muehlhaeuser
9ddd17af8f
Added comment for Plotter interface
2018-05-28 00:41:43 +02:00
Christian Muehlhaeuser
85fa95f2ce
Fixed tests for new API
2018-05-28 00:41:29 +02:00
Christian Muehlhaeuser
70160ed641
Keep receiver names consistent
2018-05-28 00:41:05 +02:00
Christian Muehlhaeuser
43d38b16f2
Don't confuse readers with different meanings of 'n'
2018-05-28 00:40:29 +02:00
Christian Muehlhaeuser
ad1605cf83
Added an iterationThreshold (currently internal only).
2018-05-28 00:40:29 +02:00
Christian Muehlhaeuser
3ac7672b93
Clamp CIELab colors before RGB conversion
2018-05-27 23:25:48 +02:00
Christian Muehlhaeuser
a2e4fa300c
The Plotter interface lets you attach custom plotters
2018-05-27 22:06:57 +02:00
Christian Muehlhaeuser
43c4b4685f
Don't abuse Point type for points-/centersInDimension
2018-05-27 18:38:13 +02:00
Christian Muehlhaeuser
fc27369cba
Keep receiver names consistent
2018-05-27 18:34:29 +02:00
Christian Muehlhaeuser
f6a37b65ea
Export Clusters.Nearest
2018-05-27 18:34:08 +02:00