Turi Create
4.0
|
#include <toolkits/factorization/sgd_ranking_interface.hpp>
Public Member Functions | |
virtual double | apply_pairwise_sgd_step (size_t thread_idx, const std::vector< ml_data_entry > &x_positive, const std::vector< ml_data_entry > &x_negative, double step_size)=0 |
Private Member Functions | |
virtual void | setup (const v2::ml_data &train_data, const std::map< std::string, flexible_type > &options) |
virtual void | setup_iteration (size_t iteration, double step_size) |
virtual void | finalize_iteration () |
virtual double | l2_regularization_factor () const |
virtual double | max_step_size () const |
virtual bool | state_is_numerically_stable () const |
virtual void | setup_optimization (size_t random_seed=size_t(-1), bool _in_trial_mode=false)=0 |
virtual double | calculate_loss (const v2::ml_data &data) const =0 |
virtual double | reported_loss_value (double accumulative_loss) const =0 |
virtual std::string | reported_loss_name () const =0 |
virtual double | current_regularization_penalty () const =0 |
virtual double | apply_sgd_step (size_t thread_idx, const std::vector< v2::ml_data_entry > &x, double y, double step_size)=0 |
The base class for the ranking SGD interfaces. This interface governs all the interactions between the sgd solvers and the model.
To use the ranking sgd solver, implement the following options.
Definition at line 20 of file sgd_ranking_interface.hpp.
|
pure virtual |
Apply two sgd steps to the code to increase the predicted value of x_positive and decrease the predicted value of x_negative.