Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 vectors

Slopy::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