Changeset 108


Ignore:
Timestamp:
Jun 16, 2004, 3:08:09 PM (16 years ago)
Author:
Peter
Message:

modified the interface to be able to use any Score object

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/InputRanker.cc

    r102 r108  
    1616InputRanker::InputRanker(const gslapi::matrix& data,
    1717                         const gslapi::vector& target,
     18                         Score& score_object,
    1819                         const std::vector<size_t>& train_set)
    1920  :train_set_(train_set),
     
    3738  //scoring each input
    3839  std::vector<pair<size_t, double> > score;
    39   ROC roc = ROC();
    4040  for (size_t i=0; i<nof_genes; i++){
    41     double area = roc.score(data_transposed[i], target); 
     41    double area = score_object.score(data_transposed[i], target);
    4242    std::pair<size_t, double> tmp(i,area);
    4343    score.push_back(tmp);
  • trunk/src/InputRanker.h

    r102 r108  
    88#include "vector.h"
    99#include "matrix.h"
     10#include "Score.h"
    1011
    1112// Standard C++ includes
     
    2425  public:
    2526    ///
    26     /// Constructor taking data, target, and vector defining what
    27     /// samples to use (default is to use all samples)
     27    /// Constructor taking data, target, pointer to a Score
     28    /// object and vector defining what samples to use (default is to
     29    /// use all samples)
    2830    ///
    29     InputRanker(const gslapi::matrix&, const gslapi::vector&,
     31    InputRanker(const gslapi::matrix&,
     32                const gslapi::vector&,
     33                Score&,
    3034                const std::vector<size_t>& = std::vector<size_t>());
    3135
Note: See TracChangeset for help on using the changeset viewer.