diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 449ceed9b..c3cfa350d 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -894,7 +894,7 @@ class Builder extends BuilderAbstract public function execute() { - $sth = $this->connection->con->prepare($this->toSQL()); + $sth = $this->connection->con->prepare($this->toSql()); $sth->execute(); return $sth; diff --git a/Math/Finance/Forecasting/ClassicalDecomposition.php b/Math/Finance/Forecasting/ClassicalDecomposition.php index 478cbacd4..538f9d8e3 100644 --- a/Math/Finance/Forecasting/ClassicalDecomposition.php +++ b/Math/Finance/Forecasting/ClassicalDecomposition.php @@ -69,8 +69,9 @@ class ClassicalDecomposition private function computeSeasonalComponent() : array { $seasonalComponent = []; + $count = count($this->data); - for ($i = 0; $i < $this->orderSize; $i++) { + for ($i = 0; $i < $this->dataSize; $i++) { $temp = []; for ($j = $i * $this->order; $j < $count; $j += $this->order) {