diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/linear_regression/benchmark | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/linear_regression/benchmark')
-rw-r--r-- | library/cpp/linear_regression/benchmark/pool.cpp | 10 | ||||
-rw-r--r-- | library/cpp/linear_regression/benchmark/pool.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/linear_regression/benchmark/pool.cpp b/library/cpp/linear_regression/benchmark/pool.cpp index 7f2c6a7004..5e014e575c 100644 --- a/library/cpp/linear_regression/benchmark/pool.cpp +++ b/library/cpp/linear_regression/benchmark/pool.cpp @@ -3,7 +3,7 @@ #include <util/string/cast.h> #include <util/stream/file.h> -TInstance TInstance::FromFeaturesString(const TString& featuresString) { +TInstance TInstance::FromFeaturesString(const TString& featuresString) { TInstance instance; TStringBuf featuresStringBuf(featuresString); @@ -29,7 +29,7 @@ TPool::TCVIterator::TCVIterator(const TPool& parentPool, const size_t foldsCount } void TPool::TCVIterator::ResetShuffle() { - TVector<size_t> instanceNumbers(ParentPool.size()); + TVector<size_t> instanceNumbers(ParentPool.size()); for (size_t instanceNumber = 0; instanceNumber < ParentPool.size(); ++instanceNumber) { instanceNumbers[instanceNumber] = instanceNumber; } @@ -83,9 +83,9 @@ bool TPool::TCVIterator::TakeCurrent() const { return false; } -void TPool::ReadFromFeatures(const TString& featuresPath) { - TFileInput featuresIn(featuresPath); - TString featuresString; +void TPool::ReadFromFeatures(const TString& featuresPath) { + TFileInput featuresIn(featuresPath); + TString featuresString; while (featuresIn.ReadLine(featuresString)) { this->push_back(TInstance::FromFeaturesString(featuresString)); } diff --git a/library/cpp/linear_regression/benchmark/pool.h b/library/cpp/linear_regression/benchmark/pool.h index 43288319c8..88140b7dd1 100644 --- a/library/cpp/linear_regression/benchmark/pool.h +++ b/library/cpp/linear_regression/benchmark/pool.h @@ -1,17 +1,17 @@ #pragma once #include <util/generic/vector.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/random/mersenne.h> #include <util/random/shuffle.h> struct TInstance { - TVector<double> Features; + TVector<double> Features; double Goal; double Weight; - static TInstance FromFeaturesString(const TString& featuresString); + static TInstance FromFeaturesString(const TString& featuresString); }; struct TPool: public TVector<TInstance> { @@ -29,7 +29,7 @@ struct TPool: public TVector<TInstance> { EIteratorType IteratorType; size_t TestFoldNumber; - TVector<size_t> InstanceFoldNumbers; + TVector<size_t> InstanceFoldNumbers; const size_t* Current; TMersenne<ui64> RandomGenerator; @@ -54,7 +54,7 @@ struct TPool: public TVector<TInstance> { bool TakeCurrent() const; }; - void ReadFromFeatures(const TString& featuresPath); + void ReadFromFeatures(const TString& featuresPath); TCVIterator CrossValidationIterator(const size_t foldsCount, const EIteratorType iteratorType) const; TPool InjurePool(const double injureFactir, const double injureOffset) const; |