00001 /* 00002 * Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights 00003 * embodied in the content of this file are licensed under the BSD 00004 * (revised) open source license. 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * Written (W) 2011 Shashwat Lal Das 00012 * Adaptation of Vowpal Wabbit v5.1. 00013 * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society. 00014 */ 00015 00016 #ifndef _VW_NONADAPTIVE_H__ 00017 #define _VW_NONADAPTIVE_H__ 00018 00019 #include <shogun/classifier/vw/VwLearner.h> 00020 #include <shogun/classifier/vw/vw_common.h> 00021 00022 namespace shogun 00023 { 00030 class CVwNonAdaptiveLearner: public CVwLearner 00031 { 00032 public: 00036 CVwNonAdaptiveLearner(); 00037 00044 CVwNonAdaptiveLearner(CVwRegressor* regressor, CVwEnvironment* vw_env); 00045 00049 virtual ~CVwNonAdaptiveLearner(); 00050 00057 virtual void train(VwExample* &ex, float32_t update); 00058 00064 virtual const char* get_name() const { return "VwNonAdaptiveLearner"; } 00065 00066 private: 00076 void quad_update(float32_t* weights, VwFeature& page_feature, 00077 v_array<VwFeature> &offer_features, vw_size_t mask, 00078 float32_t update); 00079 }; 00080 } 00081 #endif // _VW_NONADAPTIVE_H__