coraallensavietta / RankingMethods

A Weighted Loss-Based Bayesian Ranking Method
0 stars 0 forks source link

Ranking Methods

Bayesian ranking methods implementation

Functions

WeightedLossRanking (ranking_function.r) RankingWeights (ranking_function.r) SelectNP (sim_ranking_experiment.r) SimData (sim_ranking_experiment.r) PostSamples (sim_ranking_experiment.r) RunSimulation (sim_ranking_experiment.r)

Parameters for Simulation

see lossDF data frame

Comparing Ranking Methods

use variables For data set, vary on:

Do this for:

Functions for Simulation:

  1. create n, p
  2. create data from n, p
  3. create rankings from n, p
    • posterior from stan
    • use posterior to get rankings
  4. save rankings matrix in a list by ranking method. each matrix has a cols items, rank. N, n_sim, n_rankingMethod

Testing with ranking_sim_debug.r

varying gap width expected order stats from various beta distributions

standard unif will evenly space from i/N+1 qbeta(i/N+1, 1, 1) gives 1/N+1 a_p b_p

Testing

ranking_testing.r

Tests Four Sets:

ranking_metric.r

ranking_function.r

Positional Loss

1. Loss on Ranks

pros:

2. Loss on Probability Scale

pros:

3. Loss on Data Scale (same as prob scale for binomial, right?)

(TODO can we be this flexible?)
pros:

4. Weighted Loss on Rank Scale

pros:

Comparison Loss

5. Loss on Ranks

pros:

Loss Function-less Ranking Methods

6. Rank by Posterior Means (estimates)

file: posteriormeans.r
pros:

7. Henderson & Newton Threshold Functions (R Value)

see their package (maybe include here)

Possible Additions:

Packages to Reference:

Paper Timeline

Feb 2018: abstract to JSM (accepted April 2018) DONE April 2018: draft program DONE May 2018: finish program June 2018: simulations + outline + draft paper
July 2018: write paper, write talk, practice talk
July 28-30: JSM talk
August 2018: send paper to Ron for final edits, submit

Function specific TODOs (older)

Future Work Notes

TODO 3 outer product of the matrix to vectorize to replace double for loops. vectorizing apply outer product

TODO Q: for rank, must use r function sort. How can we fix this? OR is this fine?

TODO should there be autoscaling of original matrix to prevent numbers that are too small?

TODO add checks for invalid inputs

TODO Add heuristic methods for LSAP + compare. Look for papers by Louis' group

TODO Compare weighting strategies.

Q: what should epsilon be? When do we have numerical stability problems?

LSAP might act weirdly with actual 0 weights (this is a problem with Louis)

what we really want is orders of magnitude between weights. (weights dont need to sum to one. To normalize, divide each by sum)

e.g. c(1, e, e^2, e^3) then normalize if you want. TODO question: what should epsilon be? When do we have numerical stability problem

Q: does our 1, e, e^2 etc work better than 1, 1, 1, 0, 0, 0, (these zeros will all be tied).

Epsilon losses automatically breaks ties. Mostly want to show that it doesnt change answer about top 10 + ranking of bottom set will be better.

Q: do I really want to have cliffs? Should it be smooth, gradual? How would we make this smooth? Are there various ways to try to get the good points of cliff functions.

Can you make a smooth function that performs as well as cliffs? Is there a natural cliff? (page views on google?)

Then is this related to threshold functions? e.g. i just care about my item, everyone else is less important

Smoothness might be desireable in situations where you see the whole list. (college rankings)

TODO create visualizations: D3.js? this could be a good situation to use weights based on people's interests. Show different weight vectors.