Giter Site home page Giter Site logo

quickrank's People

Contributors

ax487 avatar claudio-lucchese avatar francomarianardini avatar lgrz avatar strani avatar tonellotto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickrank's Issues

Compile error

I cannot clone the gitmodules auto, so I did it manully, but when I compile with make, I get the following error:

s4438236@moss:~/quickrank$ make
Scanning dependencies of target pugixml
[  1%] Building CXX object CMakeFiles/pugixml.dir/lib/pugixml/src/pugixml.cpp.o
Linking CXX static library libpugixml.a
[  1%] Built target pugixml
Scanning dependencies of target quickrank_common
[  3%] Building CXX object CMakeFiles/quickrank_common.dir/src/driver/driver.cc.o
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h: In member function ‘std::string ParamsMap::cleanUp(std::string)’:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: error: no matching function for call to ‘regex_replace(std::string&, std::regex&, const char [1])’
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from /home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:35,
                 from /home/students/s4438236/quickrank/include/driver/driver.h:34,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’)
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from /home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:35,
                 from /home/students/s4438236/quickrank/include/driver/driver.h:34,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [1]’
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
make[2]: *** [CMakeFiles/quickrank_common.dir/src/driver/driver.cc.o] Error 1
make[1]: *** [CMakeFiles/quickrank_common.dir/all] Error 2
make: *** [all] Error 2

Number of iterations for RankBoost

Hi, thanks for the great work in putting together QuickRank.

A question regarding the parameters that control your implementation of RankBoost. This algorithm relies on a parameter that is the number of iterations. From QuickRank documentation, the parameter max_iterations seems related only to Coordinate Ascent and Line Search. Is it possible to set the number of iterations for RankBoost? And which flag should be used for this?

Thanks
Guido

'make quickscore' fails with vpred ranker

When I attempt to compile the VPRED ranker, I get the following error:

[ 3%] Built target pugixml
[ 94%] Built target quickrank_common
[ 96%] Building CXX object CMakeFiles/quickscore.dir/src/scoring/ranker.cc.o
.../quickrank/src/scoring/ranker.cc:1:1: error: expected unqualified-id before numeric constant
703
^
make[3]: *** [CMakeFiles/quickscore.dir/src/scoring/ranker.cc.o] Error 1
make[2]: *** [CMakeFiles/quickscore.dir/all] Error 2
make[1]: *** [CMakeFiles/quickscore.dir/rule] Error 2
make: *** [quickscore] Error 2

My VPRED ranker starts like this:
703
7
root 0 133 0
node 1 0 107 1 11.8834181

Unstable sort in LAMBDAMART

I ran LAMBDAMART using quickrank and ranklib respectively and found the latter one a little better.
I read the code and find in /src/data/queryresults.cc Line 52:

std::sort(dest, dest + num_results_, comp);

use unstable sort which cause the little difference.
Change std::sort to std::stable_sort and the two results become the same.

python wrapper

Hi,

Thanks for sharing the great package! I am curious what would it take to write a simple python wrapper to train and evaluate the models.

Thanks

When generating condop-optimized code, the resulting ranker.cc won't compile

I trained a quickrank model using MSLR Fold1 data and then generated a CONDOP-optimized ranker.cc file.

It fails to compile, with the following error:
.../src/quickrank/src/scoring/ranker.cc:705:201: error: unable to find numeric literal operator ‘operator""f’
( v[71] <= 63.6842117f ? ( v[71] <= 63.4252243f ? ( v[91] <= 265.827332f ? ( v[21] <= 10f ? ( v[4

The issue is that some of the threshold values do not contain any decimal places, and the compiler isn't happy with a decimal-less float.

'make quickscore' fails with oblivious ranker

When I attempt to compile the OBLIVIOUS ranker, I get the following error:

[ 3%] Built target pugixml
[ 94%] Built target quickrank_common
[ 96%] Building CXX object CMakeFiles/quickscore.dir/src/scoring/ranker.cc.o
...
.../src/quickrank/src/scoring/ranker.cc:2123:1: error: too many initializers for ‘const float [0]’
.../tjt7a/src/quickrank/src/scoring/ranker.cc:2123:1: error: too many initializers for ‘const float [0]’
make[3]: *** [CMakeFiles/quickscore.dir/src/scoring/ranker.cc.o] Error 1
make[2]: *** [CMakeFiles/quickscore.dir/all] Error 2
make[1]: *** [CMakeFiles/quickscore.dir/rule] Error 2
make: *** [quickscore] Error 2

For those who wish to build with LLVM (clang++)

I already have LLVM 5 installed on my MacOS system with Homebrew, so I didn't really need GCC, but OpenMP doesn't get recognized when you try to build issuing Cmake with
-DCMAKE_CXX_COMPILER=$(which clang++), (please note that I've never used Cmake before) so I managed to get it work by editing the following lines in CMakeLists.txt:

Lines 17–19 (OpenMP flags hard-coded):

# require support of OpenMP
#find_package(OpenMP REQUIRED)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/lib/clang/5.0.0/include -fopenmp")

Line 28 (I have removed the unneeded -Wa,-q at the end):

# Compiler flags
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -Wall -march=native -mtune=native")

I hope that this may be of help for someone else… (until someone else more skilled in Cmake provides a patch).

(Both the training and testing phases of the README worked on a fold of Microsoft's LETOR 3 dataset "Ohsumed"; I haven't tested it any further for the moment)

Question regarding the license

First, quickrank looks great, nicely executed project from what I can see.
But I have a question about the license.

I'd never encountered the RPL-1.5 before and so was unfamiliar with its purpose.
Am I reading correctly that anything using quickrank must be open sourced?

What if a user is just running quickrank from the command line ala the example in the README https://github.com/hpclab/quickrank/blob/master/README.md#training ?
Would they need to open source the command they ran within bash?

Is the goal to wholly prohibit use within any business?

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.