Giter Site home page Giter Site logo

Comments (2)

jjfiv avatar jjfiv commented on September 23, 2024

I added this cell to the bottom of the notebook, but the TrainRequest object has a measure field as a string.

train_request = TrainRequest.coordinate_ascent()
train_request.measure = 'map'
params = train_request.params
params.init_random = True
params.normalize = True
params.seed = 1234567
coordinate_ascent = dataset.train_model(train_request)

# simple python-accessible models (serialization is up to you)
coordinate_ascent.to_dict()

The supported measures are: AP, RR, and NDCG for now. I know ERR is pretty popular in LTR literature, but I've never really used it, myself, so that's why it's been on the backburner.

fastrank/src/evaluators.rs

Lines 148 to 153 in b05cf8a

evaluator: match name.as_str() {
"ap" | "map" => Arc::new(AveragePrecision::new(dataset, judgments.clone())),
"rr" | "mrr" => Arc::new(ReciprocalRank),
"ndcg" => Arc::new(NDCG::new(depth, dataset, judgments.clone())),
_ => Err(format!("Invalid training measure: \"{}\"", orig_name))?,
},

I don't have plans for user-defined functions as metrics, because most of the 'speed' of coordinate ascent comes from how fast you can predict new model scores, sort, and compute your metric, but it shouldn't be hard to add some additional measures.

from fastrank.

mfayoub avatar mfayoub commented on September 23, 2024

Ok, thanks for your answer.

from fastrank.

Related Issues (20)

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.