This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Adding Matrix Transforms
I’m still working on making it easier to add matrix transforms. At the moment they are too embedded in the code. Until then if your are keen to add new transforms you can do the following:
All matrix transforms live in:
rsemantic/lib/semantic/transform/*
Add a new class for your transform here. It requires a single class method which is passed a matrix and it should return a matrix.
The matrix is a Linalg::DMatrix object.
It offers some nice builtin matrix transforms.
So as an example adding a PLSA transform our class would look like this:
module Semantic
module Transform
class PLSA
self.transform(matrix)
matrix
end
end
end
end
And then to use the transform we pass the class name in as a symbol when creating the search object.
search = Semantic::Search.new(documents, :transforms => [:PLSA])







