-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpycluster.cpp
More file actions
27 lines (24 loc) · 1.26 KB
/
pycluster.cpp
File metadata and controls
27 lines (24 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "pycluster.h"
void init_clustering(py::module &m) {
m.def("hcluster", [](SparseMatrixWrapper &smw, py::object centers, double beta,
py::object msr, py::object weights, double eps,
uint64_t kmeansmaxiter, uint64_t seed, py::ssize_t mbsize, py::ssize_t ncheckins,
py::ssize_t reseed_count, bool with_rep, bool use_cs) {
return __py_cluster_from_centers(smw, centers, beta, msr, weights, eps, kmeansmaxiter,
seed,
mbsize, ncheckins, reseed_count, with_rep, use_cs);
},
py::arg("smw"),
py::arg("centers"),
py::arg("prior") = 0.,
py::arg("msr") = 2,
py::arg("weights") = py::none(),
py::arg("eps") = 1e-10,
py::arg("maxiter") = 100,
py::arg("seed") = 0,
py::arg("mbsize") = py::ssize_t(-1),
py::arg("ncheckins") = py::ssize_t(-1),
py::arg("reseed_count") = py::ssize_t(5),
py::arg("with_rep") = false, py::arg("cs") = false,
"Clusters a SparseMatrixWrapper object using settings and the centers provided above; set prior to < 0 for it to be 1 / ncolumns(). Performs seeding, followed by EM or minibatch k-means");
} // init_clustering