Thrill  0.1
stochastic_gradient_descent_run.cpp File Reference
#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"
+ Include dependency graph for stochastic_gradient_descent_run.cpp:

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)
 

Function Documentation

◆ main()

◆ OutputSVG()

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().

◆ RunStochasticGradFile()

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 
)
static

◆ RunStochasticGradGenerated()

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 
)
static