Permalink
Browse files

cleanup

  • Loading branch information...
1 parent b444919 commit bf3baea2a6be5bde1b669f1c274796ef10014f7b @matpalm committed May 1, 2011
Showing with 15 additions and 7 deletions.
  1. +10 −2 README
  2. +1 −1 dense_matrix.rb
  3. +3 −3 project_triangle.rb
  4. +1 −1 project_two_circles.rb → project_two_squares.rb
View
@@ -6,8 +6,16 @@ by AB=A' when B (jxk) has random values with each column vector being unit lengt
requires ggplot2
R> install.packages("ggplot2")
-$ ./project_triangle.rb
+$ ./project_two_circles.rb
look at pngs
-$ ./project_two_circles.rb
+$ ./project_triangle.rb
look at pngs
+
+blognotes:
+- dimensionality reduction
+- random projection
+- why bother?
+ - reduced size; feature hashing => fixed size
+ - turns sparse into dense allowing item comparison that might have otherwise not been possible
+
View
@@ -56,7 +56,7 @@ def plot_to filename
lims = c(0,10)
library(ggplot2)
a = read.csv("#{data_file_path}",header=FALSE)
- png("#{filename}.png", width=200, height=200, bg="transparent")
+ png("#{filename}.png", width=600, height=600, bg="transparent")
plot(a$V1,a$V2,col=sapply(a$V3,toString),pch=19,lwd=10,xlim=lims,ylim=lims)
dev.off()
EOF
View
@@ -8,9 +8,9 @@ def specific_i
end
def add_random_rows_using_builder
- (@I/3).times { @builder.add_random_row 0,0, 1, :red }
- (@I/3).times { @builder.add_random_row 10,0, 1, :green }
- (@I/3).times { @builder.add_random_row 5,8.66, 1, :blue }
+ (@I/3).times { @builder.add_random_row 1,1, 1, :red }
+ (@I/3).times { @builder.add_random_row 9,1, 1, :green }
+ (@I/3).times { @builder.add_random_row 5,7.66, 1, :blue }
end
end
@@ -4,7 +4,7 @@
class ProjectTwoCircles < RandomProjection
def specific_i
- 10
+ 50
end
def add_random_rows_using_builder

0 comments on commit bf3baea

Please sign in to comment.