Skip to content

Instantly share code, notes, and snippets.

@bdimcheff
Created October 8, 2009 05:40
Show Gist options
  • Save bdimcheff/204782 to your computer and use it in GitHub Desktop.
Save bdimcheff/204782 to your computer and use it in GitHub Desktop.
--- lsi.rbBACK 2008-02-06 15:49:59.000000000 -0500
+++ lsi.rb 2008-02-06 15:58:26.000000000 -0500
@@ -287,7 +287,11 @@
s[ord] = 0.0 if s[ord] < s_cutoff
end
# Reconstruct the term document matrix, only with reduced rank
- u * Matrix.diag( s ) * v.trans
+ if $GSL
+ u * GSL::Matrix.diag( s ) * v.trans
+ else
+ u * GSL::Matrix.diag( s ) * v.trans
+ end
end
def node_for_content(item, &block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment