QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
ot.h
Go to the documentation of this file.
1 /*
2  * QuickRank - A C++ suite of Learning to Rank algorithms
3  * Webpage: http://quickrank.isti.cnr.it/
4  * Contact: quickrank@isti.cnr.it
5  *
6  * Unless explicitly acquired and licensed from Licensor under another
7  * license, the contents of this file are subject to the Reciprocal Public
8  * License ("RPL") Version 1.5, or subsequent versions as allowed by the RPL,
9  * and You may not copy or use this file in either source code or executable
10  * form, except in compliance with the terms and conditions of the RPL.
11  *
12  * All software distributed under the RPL is provided strictly on an "AS
13  * IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND
14  * LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
15  * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16  * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RPL for specific
17  * language governing rights and limitations under the RPL.
18  *
19  * Contributor:
20  * HPC. Laboratory - ISTI - CNR - http://hpc.isti.cnr.it/
21  */
22 #pragma once
23 
24 #include <cfloat>
25 #include <cmath>
26 
27 #include "learning/tree/rt.h"
28 
29 class ObliviousRT: public RegressionTree {
30  public:
31 
32  ObliviousRT(size_t nodes,
34  double *labels,
35  size_t minls,
36  size_t treedepth)
37  : RegressionTree(nodes, dps, labels, minls),
38  treedepth(treedepth) {
39  }
40  void fit(RTNodeHistogram *hist);
41 
42  protected:
43  const size_t treedepth = 0;
44 
45  private:
46  void fill(double **sumvar, const size_t nfeaturesamples,
47  RTNodeHistogram const *hist);
48  const double invalid = -DBL_MAX;
49 };
void fit(RTNodeHistogram *hist)
Definition: ot.cc:32
const size_t treedepth
Definition: ot.h:43
void fill(double **sumvar, const size_t nfeaturesamples, RTNodeHistogram const *hist)
Definition: ot.cc:183
Definition: ot.h:29
This class implements a Dataset to be used for a L-t-R task.
Definition: vertical_dataset.h:46
const size_t minls
Definition: rt.h:48
const double invalid
Definition: ot.h:48
ObliviousRT(size_t nodes, quickrank::data::VerticalDataset *dps, double *labels, size_t minls, size_t treedepth)
Definition: ot.h:32
Definition: rt.h:44
Definition: rtnode_histogram.h:26