Changeset 1708


Ignore:
Timestamp:
Jan 13, 2009, 11:09:53 AM (12 years ago)
Author:
Jari Häkkinen
Message:

Addresses #425

Location:
trunk
Files:
2 added
1 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/test/data/Makefile.am

    r1572 r1708  
    33## $Id$
    44
    5 # Copyright (C) 2007, 2008 Jari Häkkinen
     5# Copyright (C) 2007, 2008, 2009 Jari Häkkinen
    66#
    77# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2424knni_weight.data nm_alpha_linear_matlab.txt nm_data_centralized.txt \
    2525nm_kernel.txt nm_kernel2.txt nm_kernel_gaussian.txt nm_target_bin.txt \
    26 rank_data.txt rank_target.txt regression_gauss.data     \
     26normalization_test.data rank_data.txt rank_target.txt \
     27regression_gauss.data \
    2728sorlie_centroid_classes.txt sorlie_centroid_data.txt      \
    2829sorlie_centroid_predictions.txt sorlie_centroids.txt vector1.data \
  • trunk/test/normalization_test.cc

    r1573 r1708  
    33/*
    44  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2009 Jari Häkkinen
    56
    67  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2425#include "yat/normalizer/Centralizer.h"
    2526#include "yat/normalizer/ColumnNormalizer.h"
    26 #include "yat/normalizer/CubicSplineNormalizer.h"
    2727#include "yat/normalizer/Gauss.h"
     28#include "yat/normalizer/qQuantileNormalizer.h"
    2829#include "yat/normalizer/QuantileNormalizer.h"
    2930#include "yat/normalizer/RowNormalizer.h"
     
    4445void test_centralizer(test::Suite&);
    4546void test_column_normalize(test::Suite&);
    46 void test_cubicspline_normalize(test::Suite&);
    4747void test_gauss_normalize(test::Suite&);
     48void test_qquantile_normalize(test::Suite&);
    4849void test_quantile_normalize(test::Suite&);
    4950void test_row_normalize(test::Suite&);
     
    5960  test_centralizer(suite);
    6061  test_column_normalize(suite);
    61   test_cubicspline_normalize(suite);
     62  test_qquantile_normalize(suite);
    6263  test_quantile_normalize(suite);
    6364  test_gauss_normalize(suite);
     
    120121
    121122
    122 void test_cubicspline_normalize(test::Suite& suite)
    123 {
    124   suite.err() << "Testing CubicSplineNormalizer\n";
    125   std::string data(test::filename("data/cubicspline.data"));
     123void test_qquantile_normalize(test::Suite& suite)
     124{
     125  using namespace normalizer;
     126
     127  suite.err() << "Testing qQuantileNormalizer\n";
     128  std::string data(test::filename("data/normalization_test.data"));
    126129  if (utility::FileUtil(data.c_str()).permissions("r")) {
    127130    suite.add(false);
     
    132135
    133136  utility::Matrix m(data_stream);
     137  utility::Matrix result(m.rows(),m.columns());
     138
     139  // testing number of parts boundary conditions
     140  qQuantileNormalizer(m.column_const_view(0),m.rows());
     141  qQuantileNormalizer(m.column_const_view(0),2);
     142
     143  qQuantileNormalizer qqn(m.column_const_view(0),9);  // first column as target
     144  qqn(m,result);
    134145}
    135146
  • trunk/yat/normalizer/Makefile.am

    r1568 r1708  
    33## $Id$
    44
    5 # Copyright (C) 2008 Peter Johansson
     5# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
     6# Copyright (C) 2009 Jari Häkkinen
    67#
    78# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2122
    2223noinst_LTLIBRARIES = libnormalizer.la
    23 libnormalizer_la_SOURCES = QuantileNormalizer.cc
     24libnormalizer_la_SOURCES = qQuantileNormalizer.cc QuantileNormalizer.cc
    2425
    2526include_normalizerdir = $(includedir)/yat/normalizer
    2627
    2728include_normalizer_HEADERS = Centralizer.h ColumnNormalizer.h \
    28   CubicSplineNormalizer.h Gauss.h QuantileNormalizer.h RowNormalizer.h  \
     29  Gauss.h qQuantileNormalizer.h QuantileNormalizer.h RowNormalizer.h  \
    2930  Spearman.h Zscore.h
Note: See TracChangeset for help on using the changeset viewer.