gbuesing / kmeans-clusterer Goto Github PK
View Code? Open in Web Editor NEWk-means clustering in Ruby
License: MIT License
k-means clustering in Ruby
License: MIT License
What would be the route whereby I can adjust the algorithm in this library? specifically, i'd like to fix the cluster radius to a given value, set the the number of points that would fit within a cluster to a constant value, and then allow the number of clusters that would be needed to cover all the points to vary.
Can you explain how the data relate to the labels? I'm referring to this:
data = [[40.71,-74.01],[34.05,-118.24],[39.29,-76.61],
[45.52,-122.68],[38.9,-77.04],[36.11,-115.17]]
labels = ['New York', 'Los Angeles', 'Baltimore',
'Portland', 'Washington DC', 'Las Vegas']
Hello, I am a Sketchup developer. When I run the code in ruby console in Sketchup "Gem::install("kmeans-clusterer") ", then
"Error: #<Gem::Ext::BuildError: ERROR: Failed to build gem native extension." "C:/Users/honor/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Gems64/gems/narray-0.6.1.2/src
"C:/Program Files/SketchUp/SketchUp 2020/Tools/bin/ruby.exe" -r ./siteconf20210326-8616-1oyyja0.rb extconf.rb
extconf failed, exit code 1". I've run it successfully in cmd (Windows OS) Can you reply me? Thx
~/Desktop/kmeans-clusterer-master/examples$ ruby headlines.rb -k 16
Classifying 0 docs with 0 unique terms into 16 clusters:
/home/arjun/Desktop/kmeans-clusterer-master/examples/utils/bag.rb:67:in `new': array.dim(=0) < CLASS_DIMENSION(=2) (TypeError)
from /home/arjun/Desktop/kmeans-clusterer-master/examples/utils/bag.rb:67:in `to_matrix'
from headlines.rb:42:in `<main>'
How to store kmeans model for further usage in another part of code?
The title says all about the issue, I am using the gem in a Rails app and want to store the model into a database for later user, how can I do this? kmeans.to_json
is not working!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.