Giter Site home page Giter Site logo

librecapp's Introduction

README

Introduction - lib-rec-app.jar

This program is customized by Command Line (cli) and Configuration files.

Command Line

The following command line parameters are available:

[-cv <arg>] [-d <arg>] [-r <arg>] [-s]

More precisely,

  1. -h : print help information.
  2. -cv : The number of folds for cross validation, default: 5.
  3. -d or --dataset: The dataset(s) to be processed, valid options are based on configuration file "default.properties".
  4. -r or --recommender : The recommender(s) to be applied, valid options are based on configuration file "default.properties".
  5. -s or --split : Whether to re-split the dataset, default: false.

For example, if you'd like to test user-based kNN and item-based kNN algorithms on datasets ml-100k and ml-1m, the folds of Cross Validation is 6, the command would be:

java -jar lib-rec-app.jar -d ml-100k ml-1m -r userknn itemknn -cv 6

* NB: The abbreviations of algorithms are based on Librec project, available at: AlgorithmList.

Configuration Files

The detailed configurations of this program and specific parameters of each algorithms are determined by various configuration files:

  1. The default configuration
    1. Specify the default settings such as the data directories, dataset path.
    2. For more details, please refer to default.properties.
  2. The dataset information
    1. Specify the input path, data format, etc.
    2. For more details, please refer to Dataset folder.
    3. NB: Will override same settings of default.properties.
  3. The Recommender algorithms parameters
    1. Specify parameters of each algorithms.
    2. For more details, please refer to Algorithms folder.
    3. NB: Will override same settings of files in Dataset folder.
    4. Some parameter templates are available at: Algorithms Configuration.

Introduction - main.py

  1. Open Anaconda3 -->Anaconda Prompt

    1544845945899

  2. Execute the command:

    conda activate py36

    The cli (Command Line Interface) would show:

    ![conda activate py36](README/conda activate.png)

  3. Use cd command to change the current working directory to the folder of main.py

    cd C:\Users\hongl\OneDrive\Documents\LibRecApp

    The cli would show:

  4. Execute the Python script to generate the merged files:

    python main.py -d [your dataset(s)] -r [your recommender(s)] -cv [the number of cross validation]

    Example:

    Experiment Condition:

    1. Dataset: ml-1m
    2. Recommender: userknnใ€itemknn
    3. CV: 5
    python main.py -d ml-1m -r userknn itemknn -cv 5

    The cli would show:

    1544849359472

    Note:

    To get simple prompt usage:

    python main.py -h

    The cli would show:

    1544849416380

  5. Output file name:

    .../result/<dataset>/merge_[<recommender name>]/cv_<cv>_<timestamp>.csv

Some Tips of UNIX commands

A very useful simple-doc for UNIX introduction is available at: UNIX Survival Guide. (The cheat sheet at Page 30)

Please read carefully from Page 10 to Page 16. (Very easy to understand, I promise :)

"Screen" Command

Some times you may want to do something else and leave the server running at background. The screen command would be very useful.

Here is a simple introduction of screen.

You may use:

screen -ls

To list all sessions (attached and detached).

Example:

1552758111990

screen -r <Session name> (for example: screen -r 47647)

To resume (move to) certain screen. For convenience, you can type screen -r 4 as only one session name starts with "4". If you want to resume session "31185", you can type screen -r 311 at least, as there is another session named "31069".

Ctrl-A + Ctrl-D

To detach the current and return to parent session.

Example:

1552758720346

exit

Close current session, can be used on main session and any sub sessions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.