diff options
author | Hal Daume III <me@hal3.name> | 2012-11-19 04:21:59 +0400 |
---|---|---|
committer | Hal Daume III <me@hal3.name> | 2012-11-19 04:21:59 +0400 |
commit | b8abe18c8544f443268382eabf789c5361d12dab (patch) | |
tree | 7db62a048254490db739e5014a80b975a68be37b /vowpalwabbit/sparse_dense.h | |
parent | 442a943a6018371ba667dbf3ec6ef8e360937213 (diff) | |
parent | 29b4523b4e931e4ce4d6bf3b50f8fa6a5771047f (diff) |
merged john's changes, everything works except cubic features
Diffstat (limited to 'vowpalwabbit/sparse_dense.h')
-rw-r--r-- | vowpalwabbit/sparse_dense.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/vowpalwabbit/sparse_dense.h b/vowpalwabbit/sparse_dense.h index d8d6ff57..6c182bf3 100644 --- a/vowpalwabbit/sparse_dense.h +++ b/vowpalwabbit/sparse_dense.h @@ -1,9 +1,8 @@ /* -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 +Copyright (c) by respective owners including Yahoo!, Microsoft, and +individual contributors. All rights reserved. Released under a BSD +license as described in the file LICENSE. */ - #ifndef SPARSE_DENSE_VECTOR_H #define SPARSE_DENSE_VECTOR_H @@ -18,6 +17,10 @@ inline float trunc_weight(float w, float gravity){ float sd_add(weight* weights, size_t mask, feature* begin, feature* end); float sd_add_trunc(weight* weights, size_t mask, feature* begin, feature* end, float gravity); +float sd_add_rescale(weight* weights, size_t mask, feature* begin, feature* end, bool is_adaptive, size_t idx_norm); +float sd_add_trunc_rescale(weight* weights, size_t mask, feature* begin, feature* end, float gravity, bool is_adaptive, size_t idx_norm); +float sd_add_rescale_general(weight* weights, size_t mask, feature* begin, feature* end, size_t idx_norm, float power_t_norm); +float sd_add_trunc_rescale_general(weight* weights, size_t mask, feature* begin, feature* end, float gravity, size_t idx_norm, float power_t_norm); float sd_offset_add(weight* weights, size_t mask, feature* begin, feature* end, size_t offset); void sd_offset_update(weight* weights, size_t mask, feature* begin, feature* end, size_t offset, float update, float regularization); @@ -31,6 +34,11 @@ float one_pf_quad_predict(weight* weights, feature& page_feature, v_array<featur float one_pf_quad_predict_trunc(weight* weights, feature& f, v_array<feature> &cross_features, size_t mask, float gravity); +float one_pf_quad_predict_rescale(weight* weights, feature& page_feature, v_array<feature> &offer_features, size_t mask, bool is_adaptive, size_t idx_norm); +float one_pf_quad_predict_trunc_rescale(weight* weights, feature& f, v_array<feature> &cross_features, size_t mask, float gravity, bool is_adaptive, size_t idx_norm); +float one_pf_quad_predict_rescale_general(weight* weights, feature& page_feature, v_array<feature> &offer_features, size_t mask, size_t idx_norm, float power_t_norm); +float one_pf_quad_predict_trunc_rescale_general(weight* weights, feature& f, v_array<feature> &cross_features, size_t mask, float gravity, size_t idx_norm, float power_t_norm); + float offset_quad_predict(weight* weights, feature& page_feature, v_array<feature> &offer_features, size_t mask, size_t offset); void print_audit_quad(weight* weights, audit_data& page_feature, v_array<audit_data> &offer_features, size_t mask); |