Changeset 2138


Ignore:
Timestamp:
Dec 24, 2009, 9:23:49 PM (12 years ago)
Author:
Peter
Message:

merge patch release 0.5.6 into trunk. Delta 0.5.6 - 0.5.5

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r2129 r2138  
    2121  A complete list of closed tickets can be found here [[br]]
    2222  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.6
     23
     24Version 0.5.6 (released 24 December 2009)
     25
     26  - Fixed bugs in EnsembleBuilder::predict (bugs #567 and #579)
     27  - Corrected dependency libs in libyat.la (bug #573)
     28
     29  A complete list of closed tickets can be found here [[br]]
     30  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.5.6
    2331
    2432Version 0.5.5 (released 5 November 2009)
  • trunk/m4/gsl.m4

    r2129 r2138  
    4242    GSL_LIBS=`$GSL_CONFIG --libs`
    4343    ac_save_LIBS="$LIBS"
    44     CXXFLAGS="$CXXFLAGS $GSL_CFLAGS"
    4544    LIBS="$GSL_LIBS $LIBS"
    4645    AC_LINK_IFELSE([AC_LANG_PROGRAM(, [return 0])],,[no_gsl=yes]) 
  • trunk/m4/version.m4

    r2119 r2138  
    5959# yat-0.5.4  2:3:0
    6060# yat-0.5.5  2:4:0
     61# yat-0.5.6  2:5:0
    6162#
    6263# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/ensemble_test.cc

    r2119 r2138  
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    66  Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
     7  Copyright (C) 2009 Peter Johansson
    78
    89  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    114115  suite.err() << "build ensemble" << std::endl;
    115116  ensemble.build();
     117  utility::Vector out(target.size(),0);
     118  for (size_t i = 0; i<out.size(); ++i) {
     119    out(i)=ensemble.validate()[0][i].mean();
     120  }
     121  statistics::AUC roc;
     122  suite.err() << roc.score(target,out) << std::endl;
     123
    116124  std::vector<std::vector<statistics::Averager> > result;
    117125  ensemble.predict(kernel_lookup, result);
    118  
    119   utility::Vector out(target.size(),0);
    120   for (size_t i = 0; i<out.size(); ++i)
    121     out(i)=ensemble.validate()[0][i].mean();
    122   statistics::AUC roc;
    123   suite.err() << roc.score(target,out) << std::endl;
     126  for (size_t i = 0; i<result.size(); ++i) {
     127    for (size_t j=0; j<result[0].size(); ++j) {
     128      if (!suite.add(result[i][j].variance() > 0)) {
     129        suite.err() << "error: element " << i << " " << j << "\n";
     130        suite.err() << "expected finite prediction varince\n";
     131        suite.err() << "found: " << result[i][j].variance() << "\n";
     132      }
     133    }
     134  }
     135
     136  {
     137    suite.err() << "test ensemble of SVMs with weighted kernel" << std::endl;
     138    classifier::MatrixLookupWeighted wdata(data_core);
     139    classifier::Kernel_SEV kernel(wdata, *kf);
     140    classifier::KernelLookup wkl(kernel);
     141    classifier::EnsembleBuilder<classifier::SVM, classifier::KernelLookup>
     142      ensemble(svm, wkl, sampler);
     143    suite.err() << "build ensemble" << std::endl;
     144    ensemble.build();
     145    ensemble.validate();
     146    std::vector<std::vector<statistics::Averager> > result;
     147    ensemble.predict(wkl, result);
     148  }
    124149
    125150  {
  • trunk/yat/Makefile.am

    r2121 r2138  
    66# Copyright (C) 2004 Jari Häkkinen, Peter Johansson, Cecilia Ritz
    77# Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
     8# Copyright (C) 2009 Peter Johansson
    89# Copyright (C) 2009 Peter Johansson
    910#
     
    3233nodist_EXTRA_libyat_la_SOURCES = dummy.cc
    3334
    34 libyat_la_LDFLAGS = -version-info $(YAT_LT_VERSION)
     35libyat_la_LDFLAGS = -version-info $(YAT_LT_VERSION) $(AM_LDFLAGS)
    3536
    3637libyat_la_LIBADD = \
  • trunk/yat/classifier/EnsembleBuilder.h

    r2121 r2138  
    193193      Data sub_data = test_data(data, k);
    194194      classifier(k).predict(sub_data,prediction);
    195     }
    196 
    197     for(size_t i=0; i<prediction.rows();i++)
    198       for(size_t j=0; j<prediction.columns();j++)
    199         result[i][j].add(prediction(i,j));   
     195      for(size_t i=0; i<prediction.rows();i++)
     196        for(size_t j=0; j<prediction.columns();j++)
     197          result[i][j].add(prediction(i,j));   
     198    }
    200199  }
    201200
     
    233232    // weighted case
    234233    if (kernel.weighted()){
    235       YAT_ASSERT(false);
    236234      // no feature selection
    237235      if (kernel.data_weighted().rows()==subset_->training_features(k).size())
     
    248246   
    249247    // feature selection
    250     return subset_->training_data(k).test_kernel(test_data(kernel.data(),k));
     248    MatrixLookup ml = test_data(kernel.data(),k);
     249    return subset_->training_data(k).test_kernel(ml);
    251250  }
    252251 
Note: See TracChangeset for help on using the changeset viewer.