RankSys / RankSys

Java 8 Recommender Systems framework for novelty, diversity and much more
http://ranksys.github.io
Mozilla Public License 2.0
272 stars 57 forks source link

How to run examples in the code? #3

Closed yashoteja closed 9 years ago

yashoteja commented 9 years ago

Hi,

I have a very basic question. I am not an avid user of java. There is not enough information in the Readme of the code regarding how to run examples. Can you give some pointers about how to proceed after downloading your code?

Thanks!

jacekwasilewski commented 9 years ago

Hi @yashoteja,

If you just would like to run the examples are they are and you already have the code on your machine, you can try that:

  1. Go to the RankSys-examples directory.
  2. Run (I assume you have Maven installed):

    mvn package dependency:copy-dependencies
  3. If you would like to run e.g. MetricExample then just run:

    java -cp "target/RankSys-examples-0.3.jar:target/dependency/*" es.uam.eps.ir.ranksys.examples.MetricExample

    On Windows you might need to have the classpath set to:

    "target/RankSys-examples-0.3.jar;target/dependency/*"
  4. If you get something like:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at es.uam.eps.ir.ranksys.examples.MetricExample.main(MetricExample.java:69)

    it means it works, you just need to provide arguments you need (check in the code) just after the command.

Let me know if that works for you.

yashoteja commented 9 years ago

That worked perfectly fine, thanks!! Now I am getting the error you mentioned. Please also clarify what is the format of input data (to be read from files) like (could not find it in the documentation).

jacekwasilewski commented 9 years ago

Files should be just a normal tab-separated files with triples/tuples:

<user>\t<item>\t<rating>\n

For features it's:

<item>\t<feature>\n
saulvargas commented 9 years ago

Hi @yashoteja

Thanks for you interest in RankSys. May I know what kind of use do you have in mind for it? It is meant to be a framework for creating your custom applications in Java, and therefore it does not provide some kind of main programs to operate with it. The examples, well, are just examples, and it is fine that you try to execute them (of course, do whatever you want!) but they are not designed to be run as standalone programs.

Do you think it could be interesting/convenient to include some kind of generic programs for creating or evaluating recommendations? I have no current plans for this, but if there are any expressions of interest I could consider it.

Cheers

saulvargas commented 9 years ago

No reply since days. Issue closed.

yashoteja commented 9 years ago

Hi @jacekwasilewski , Thanks a lot !!

Hi @saulvargas , I am a PhD student interested in the area of Recommender Systems.

I want to try out the recommendation algorithms available in RankSys on several datasets that I have, and for this purpose a generic program which can evaluate different algorithms out of box (without needing any wrapper programs) would indeed be very helpful.

Also, I want to try out the novelty and diversity metrics proposed in your papers and see how different algorithms behave.

Ultimately, I need to implement some new recommendation algorithms, and for this purpose it might be a good idea to build upon the existing RankSys engine.

Btw, sorry for the delay in response... I have been without internet for most of the last month!

saulvargas commented 9 years ago

Hi @yashoteja

Thanks for the reply. I will create another issue for the need of standalone programs to create and evaluate recommendations. Feel free to join the discussion.

I have to say, though, that this will take some time.

Cheers Saúl

yashoteja commented 9 years ago

Ok! Thanks!