Amazon : Determine which books are going to sell or not using k-means clustering and Amazon AWS

Download Files

Changes

  1. Initial Version

Installation

  1. install Amazon's AWS, get a seller id, key id, and secret key id
  2. under cygwin set up ~/.amazonrc as directed by ruby-aws
  3. run gem install ruby-aaws
  4. modify the line for "seller_id = " in amazon_gen.rb with YOUR seller id

Notes

If you sell Amazon books, these scripts will help you predict which books will sell and which won't.

To use

  1. Do these steps ONCE:
  2. run ruby amazon_kmeans.rb > kmeans.out to generate a list of books and clusters
  3. as you sell books, edit mybooks.rb, changing "N" to "Y" for those books you sold
  4. re-run ruby amazon_kmeans.rb > kmeans.out

Notes

Interpreting the results

In file "kmeans.out", look for lines like:

    ---- Number of titles in cluster 9: 77  #sold=13
This shows that cluster 9 has a total of 77 books in it and you've sold 13 so far. This is a good indication that eventually all the books in cluster 9 will sell.

This line, on the other hand,

    ---- Number of titles in cluster 8: 32  #sold=0
shows that the books in cluster 8 are probably not going to sell.

The other lines will be a dump of your books:

  9 : [4.0, 46, 0.2, 715938, "N"] N - About Face: The Essentials of User Interface Design by Cooper, Ala
  9 : [4.0, 25, 3.4, 714208, "Y"] Y - Boris and Bella [Hardcover] by Crimi, Carolyn; Grimly, Gris

The book "About Face" has not sold. It has an Amazon rank of 715,938. I am selling it for $4.00 and the lowest price for other books is $0.20. There are 46 other sellers for this book.

The book "Boris and Bella" has sold. It has an Amazon rank of 714,208. I was selling it for $4.00 and the lowest price for other books (at the time!!) was $3.40. There were 25 other sellers for this book.




Contact me about content on this page using john_web-at-arrizza-dot-com
For Web Master or site problems contact: webadmin-at-arrizza-dot-com
Copyright John Arrizza (c) 2001-2010