Git Product home page Git Product logo

spear's Introduction

SPEAR

Algorithm

Rating each user and item by iterating a behavior matrix.

  • user score: $\mathbf e = (e_1, \cdots, e_u, \cdots, e_M)^\top \in \mathbb R^M $
  • item score: $\mathbf q = (q_1, \cdots, q_u, \cdots, q_N)^\top \in \mathbb R^N $
  • behavior matrix: $A = {A_{ui}} \in \mathbb R^{M\times N}$
  • in iteration $t$: $$ \mathbf e^{(t)} = \frac 1 Z A \ \mathbf q^{(t-1)} \ \mathbf q^{(t)} = \frac 1 Z A^\top \ \mathbf e^{(t)} $$ where $Z$ is for normalization. In this implementation, $Z$ takes the max value (inducing max score tobe 1).

usage

1. configure

configure in file ./src/config.ini

  • iteration: max num of iteration for train
  • stop_err: threthold value of RSE difference of two adjacent iterations to stop train
  • top_num: number of top users(Experts) and top items(high quality items) to output

2. input

  • training data file is setted in config file: file: train_data
  • format (each line): uid pid score

3. output

  • user score: file: user_score
  • item score: file: item_score
  • top users(Expert): file: top_user
  • top items: file: top_item

4. run

4.0. demo

you can use ./src/demo.sh to for a complete demonstration

4.1. build
cd ./lib; make clean; make
cd ./src; make clean; make
4.2. generate sample training set for test
cd ./src
./generate_data.py
4.3. run the training process:
cd src
./spear config.ini

reference

SPEAR: SPAMMING-RESISTANT EXPERTISE ANALYSIS AND RANKING IN COLLABORATIVE TAGGING SYSTEMS

spear's People

Contributors

schwt avatar

Watchers

James Cloos avatar  avatar

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.