Thrill
0.1
|
#include <thrill/api/cache.hpp>
#include <thrill/api/context.hpp>
#include <thrill/api/gather.hpp>
#include <thrill/api/generate.hpp>
#include <thrill/api/read_lines.hpp>
#include <thrill/common/logger.hpp>
#include <tlx/cmdline_parser.hpp>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <string>
#include <vector>
#include "stochastic_gradient_descent.hpp"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
template<typename Vector > | |
void | OutputSVG (const std::string &svg_path, double svg_scale, const DIA< DataPoint< Vector > > &point_dia, const Vector &model) |
Output the points and the fitted linear function as a 2-D SVG drawing. More... | |
template<typename Vector > | |
static void | RunStochasticGradFile (thrill::Context &ctx, size_t dimensions, size_t iterations, double mini_batch_fraction, double step_size, double tolerance, const std::string &svg_path, double svg_scale, const std::string &input_path, size_t repetitions) |
template<typename Vector > | |
static void | RunStochasticGradGenerated (thrill::Context &ctx, size_t dimensions, size_t iterations, size_t num_points, double mini_batch_fraction, double step_size, double tolerance, const std::string &svg_path, double svg_scale, size_t repetitions) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 208 of file stochastic_gradient_descent_run.cpp.
References CmdlineParser::add_double(), CmdlineParser::add_flag(), CmdlineParser::add_size_t(), CmdlineParser::add_string(), die, CmdlineParser::print_result(), CmdlineParser::process(), and thrill::api::Run().
void OutputSVG | ( | const std::string & | svg_path, |
double | svg_scale, | ||
const DIA< DataPoint< Vector > > & | point_dia, | ||
const Vector & | model | ||
) |
Output the points and the fitted linear function as a 2-D SVG drawing.
Definition at line 33 of file stochastic_gradient_descent_run.cpp.
References max(), min(), and Vector< D, Type >::x.
Referenced by RunStochasticGradFile(), and RunStochasticGradGenerated().
|
static |
Definition at line 145 of file stochastic_gradient_descent_run.cpp.
References die, Vector< D, Type >::fill(), LOG1, Vector< D, double >::Make(), Context::my_rank(), OutputSVG(), thrill::api::ReadLines(), and Vector< D, Type >::x.
|
static |
Definition at line 96 of file stochastic_gradient_descent_run.cpp.
References Vector< D, Type >::dot(), Vector< D, Type >::fill(), thrill::api::Generate(), LOG1, Vector< D, double >::Make(), Context::my_rank(), OutputSVG(), Vector< D, double >::Random(), and gen_data::x.