File: parse_regressor.h

package info (click to toggle)
vowpal-wabbit 6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 20,200 kB
  • sloc: cpp: 6,724; perl: 449; makefile: 71; sh: 57
file content (31 lines) | stat: -rw-r--r-- 802 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
Copyright (c) 2009 Yahoo! Inc.  All rights reserved.  The copyrights
embodied in the content of this file are licensed under the BSD
(revised) open source license
 */

#ifndef PR_H
#define PR_H
#include "loss_functions.h"
#include "boost/program_options.hpp"

namespace po = boost::program_options;

typedef float weight;

struct regressor {
  weight* weight_vectors;
  weight* regularizers;

  loss_function *loss;
};

void parse_regressor_args(po::variables_map& vm, regressor& r, std::string& final_regressor_name, bool quiet);

void initialize_regressor(regressor &r);

void finalize_regressor(std::string reg_name, regressor &r);
void dump_regressor(std::string reg_name, regressor &r, bool as_text=0, bool reg_vector=0);
void save_predictor(std::string reg_name, size_t current_pass);

#endif