diff options
author | alex-sh <alex-sh@yandex-team.ru> | 2022-02-10 16:50:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:03 +0300 |
commit | 3196904c9f5bf7aff7374eeadcb0671589581f61 (patch) | |
tree | d13114a178799aeb203a4b3b43dd7fb0c4f6975f /library/cpp/linear_regression/linear_model.h | |
parent | d154d11651ea533127249184148c3f023e2c6d0a (diff) | |
download | ydb-3196904c9f5bf7aff7374eeadcb0671589581f61.tar.gz |
Restoring authorship annotation for <alex-sh@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/linear_regression/linear_model.h')
-rw-r--r-- | library/cpp/linear_regression/linear_model.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/linear_regression/linear_model.h b/library/cpp/linear_regression/linear_model.h index 8bb050cff7..c04f61c4a0 100644 --- a/library/cpp/linear_regression/linear_model.h +++ b/library/cpp/linear_regression/linear_model.h @@ -1,32 +1,32 @@ -#pragma once - -#include <util/generic/algorithm.h> -#include <util/generic/vector.h> - -#include <util/ysaveload.h> - +#pragma once + +#include <util/generic/algorithm.h> +#include <util/generic/vector.h> + +#include <util/ysaveload.h> + #include <utility> class TLinearModel { private: TVector<double> Coefficients; double Intercept; - + public: Y_SAVELOAD_DEFINE(Coefficients, Intercept); - + TLinearModel(TVector<double>&& coefficients, const double intercept) : Coefficients(std::move(coefficients)) , Intercept(intercept) { } - + explicit TLinearModel(size_t featuresCount = 0) : Coefficients(featuresCount) , Intercept(0.) { } - + const TVector<double>& GetCoefficients() const { return Coefficients; } @@ -39,4 +39,4 @@ public: double Prediction(const TVector<T>& features) const { return InnerProduct(Coefficients, features, Intercept); } -}; +}; |