{"id":19448569,"url":"https://github.com/neurodata/knorr","last_synced_at":"2025-04-25T02:31:27.114Z","repository":{"id":140562602,"uuid":"91023156","full_name":"neurodata/knorR","owner":"neurodata","description":"R bindings for knor","archived":false,"fork":false,"pushed_at":"2020-03-30T00:35:40.000Z","size":481,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T15:04:58.751Z","etag":null,"topics":["clustering-algorithm","machine-learning","parallel-computing"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neurodata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-11T21:01:37.000Z","updated_at":"2025-03-22T11:09:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e691c363-9eb4-40d4-9dff-8d35f8d9f447","html_url":"https://github.com/neurodata/knorR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FknorR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FknorR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FknorR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FknorR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurodata","download_url":"https://codeload.github.com/neurodata/knorR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250741942,"owners_count":21479703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering-algorithm","machine-learning","parallel-computing"],"created_at":"2024-11-10T16:27:40.490Z","updated_at":"2025-04-25T02:31:27.108Z","avatar_url":"https://github.com/neurodata.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/neurodata/knorR.svg?branch=master)](https://travis-ci.org/neurodata/knorR) [![CRAN\\_Status\\_Badge](http://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=knor) [![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/knor?color=blue)](http://www.r-pkg.org/pkg/knor)\n\n[//]: # \"![Downloads](http://cranlogs.r-pkg.org/badges/knor?color=brightgreen)](http://www.r-pkg.org/pkg/knor)\"\n\n# clusternor (clustering NUMA optimized routines library for clustering)\n\n- [Repo contents](#repo-contents)\n- [Best Performance configuration](#best-performance-configuration)\n- [Dependencies](#r-dependencies)\n- [Installation](#stable-builds)\n- [Docker](#docker)\n- [Examples](#examples)\n- [Test data](#test-data)\n- [Reproduction and Verification](#reproduction-and-verification)\n\n## Repo contents\n\n- [**R**](https://github.com/flashxio/knorR/tree/master/R): `R` building blocks for user interface code. Internally called by user interface.\n- [**data**](https://github.com/flashxio/knorR/tree/master/data): Data files for testing.\n- [**inst**](https://github.com/flashxio/knorR/tree/master/inst): Citation files\n- [**man**](https://github.com/flashxio/knorR/tree/master/man): Package documentation\n- [**src**](https://github.com/flashxio/knorR/tree/master/src): `R` bindings interface and C++ submodule to base repo.\n- [**tests**](https://github.com/flashxio/knorR/tree/master/tests): `R` unit tests written using the `testthat` package.\n\nR bindings for Clustering NUMA optimized routines. This package is supported for **Linux**, **Mac OSX** and **Windows**.\n\n**NOTE**: This is a package from C++ source that will compile using your\n`gcc` compiler.\n\n## Tested on\n- Mac OSX: 10.11 (El Capitan), 10.12 (Sierra), 10.13 (High Sierra), 10.14 (Mojave)\n- Linux: Ubuntu 14.04, 16.04, 18.04, CentOS 6, Fedora 25, Fedora 26\n- Windows: 8.1, 10\n\n## Hardware requirements\n- Any machine with \u003e= 2 GB RAM\n\n## License\n\nThis software is licensed under the [Apache version 2.0 license](https://github.com/flashxio/knor/blob/master/LICENSE).\n\n## Best Performance configuration\n\nFor the best performance on **Linux** make sure the `numa` system package is installed via\n\n```\napt-get install -y build-essential libnuma-dbg libnuma-dev libnuma1\n```\n\n#### `R` Dependencies\n\n- We require a recent version of `Rcpp` (`install.packages(\"Rcpp\")`)\n- We recommend the `testthat` package if you want to run unit-tests (`install.packages(\"testthat\")`)\n\n### Stable builds\n\nInstall from CRAN directly. Installation time is normally **~2min**.\n\n```\ninstall.packages(\"clusternor\")\n```\n\n### Bleeding edge install\n\nInstall directly from Github. This has dependency on the following system packages:\n\n- `git`\n- `autoconf`\n\n```\ngit clone --recursive https://github.com/flashxio/knorR.git\ncd knorR\n./install.sh\n```\n\n**Mac:** Install via `brew install autoconf`\n\n**Ubuntu:** Install via `apt-get install autoconf`\n\n**NOTE:** The command may require administrator privileges (i.e., `sudo`)\n\n# Docker\n\nA Docker images with all dependencies installed can be obtained by:\n\n```\ndocker pull flashxio/knorr-base\n```\n\n**NOTE**: The clusternor `R` package must still be installed on this image via:\n`install.packages(\"clusternor\")`\n\nIf you prefer to build the image yourself, you can use this\n[Dockerfile](https://github.com/flashxio/knor/tree/dev/R/Dockerfile)\n\n# Examples:\n\n## Work with data already in-memory\n```\niris.mat \u003c- as.matrix(iris[,1:4])\nk \u003c- length(unique(iris[, dim(iris)[2]])) # Number of unique classes\nkms \u003c- Kmeans(iris.mat, k)\n```\n## Work with data from disk\n\nTo work with data from disk simply use binary row-major data. Please see [this link](https://github.com/flashxio/knor#data-format) for a detailed description.\n\n```\nfn \u003c- \"/path/to/file.bin\" # Use real file\nk \u003c- 2 # The number of clusters\nnrow \u003c- 50 # The number of rows\nncol \u003c- 5 # The number of columns\nkms \u003c-Kmeans(fn, nrow, ncol, k, init=\"kmeanspp\", nthread=2)\n```\n\n# Test data\n\nWe provide [test data](https://github.com/flashxio/knorR/tree/master/data) that is included as part of the package and can be accessed directly via [this link](https://github.com/flashxio/knorR/tree/master/data) or through the `R` interpreter after the package is `require`d in `R` as `clusternor::test_data`.\n\n\n# Reproduction and Verification\n\n```\nrequire(clusternor)\nkms \u003c- Kmeans(test_data, test_centroids)\n```\n\n**Expected output**:\n\nRuntime for this action should be nearly **instantaneous** on any machine:\n\n```\n\u003e kms\n$nrow\n[1] 50\n\n$ncol\n[1] 5\n\n$iters\n[1] 5\n\n$k\n[1] 8\n\n$centers\n         [,1]     [,2]     [,3]     [,4]     [,5]\n[1,] 2.881889 4.079735 4.243061 1.953790 2.690649\n[2,] 2.494522 2.334093 2.204031 4.161763 2.444349\n[3,] 3.630086 2.398294 3.793616 2.404824 4.490043\n[4,] 3.909759 3.991190 2.947161 3.762090 1.950588\n[5,] 4.574327 3.645658 3.975175 4.505870 3.595890\n[6,] 3.190091 4.267428 1.643788 3.229366 3.700539\n[7,] 2.110254 3.147714 2.153235 1.581510 3.102312\n[8,] 2.186852 2.027695 3.938736 1.410910 2.383727\n\n$cluster\n [1] 3 2 3 3 6 8 8 3 3 2 3 4 7 7 5 4 2 1 2 1 2 7 7 5 1 1 8 7 5 2 6 2 4 6 6 8 2 5\n[39] 7 4 6 5 6 4 7 4 5 4 2 5\n\n$size\n[1] 4 9 6 7 7 6 7 4\n```\n\n## Help\nPlease refere to the docs provided:\n\n```\n?clusternor::Kmeans\n?clusternor::Skmeans\n?clusternor::KmeansPP\n?clusternor::Hmeans\n?clusternor::Xmeans\n?clusternor::Gmeans\n?clusternor::MiniBatchKmeans\n?clusternor::FuzzyCMeans\n?clusternor::Kmedoids\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodata%2Fknorr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurodata%2Fknorr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodata%2Fknorr/lists"}