Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivanshamatov/slopy
Attempt to implement slope one collaborative filtering algorithm using Ruby C API, as a native extension
https://github.com/ivanshamatov/slopy
Last synced: about 1 month ago
JSON representation
Attempt to implement slope one collaborative filtering algorithm using Ruby C API, as a native extension
- Host: GitHub
- URL: https://github.com/ivanshamatov/slopy
- Owner: IvanShamatov
- Created: 2013-12-16T11:32:00.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-16T11:32:56.000Z (about 11 years ago)
- Last Synced: 2024-10-14T02:13:03.271Z (2 months ago)
- Language: C
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slopy
```Slopy::Calculator``` is attempt to implement slope one collaborative filtering algorithm using Ruby C API, as a native extension.
## Methods
```ruby
Slopy::Calculator.cos(vector1, vector2)
# will calculate cosine similarity for two vectorsSlopy::Calculator.matrix(array_of_vectors)
# will calculate cosine similarity for each pair of vectors.
# Attention: O(n*(n-1)/2)
```## Installation
```
$ ruby ext/slopy/extconf.rb
$ rake compile
$ irb -r ./lib/slopy