Skip to content

Release 0.3.0 β€” Exponential Regression & Static Forecasting

Latest

Choose a tag to compare

@MykolaVuy MykolaVuy released this 05 Jun 19:37
· 1 commit to master since this release

πŸ“¦ Release 0.3.0 β€” Exponential Regression & Static Forecasting

✨ What's New

βž• Exponential Regression Support

  • Added new regression model: Exponential Regression
  • Formula used: y = a * e^(b * x)
  • Suitable for modeling exponential growth or decay patterns.

⚑️ Static Forecasting

  • You can now use the forecasting service statically:
    use MykolaVuy\Forecast\ForecastService;
    
    $data = [
        1 => 10,
        2 => null,
        3 => 30,
        4 => 40,
    ];
    
    $result = ForecastService::predict($data, 'exponential');
  • No need to instantiate ForecastService when you just want a quick forecast.

πŸ›  Improvements

  • Cleaner internal structure and improved extensibility.
  • Enhanced edge case handling for interpolation mode.
  • Expanded unit test coverage across all regression types.
  • Improved developer experience in usage examples.

πŸ“ Examples

Multiple usage examples now available in /examples/ directory:

  • calculate.php β€” Run all regressions on predefined datasets
  • exponential_example.php, logarithmic_example.php, etc. β€” Per-regression demo files
  • datasets.php β€” Organized data arrays for forecasting examples

πŸ“š Documentation Updated

  • README now reflects:
    • βœ… Exponential regression support
    • βœ… Static usage via ForecastService::predict()
    • βœ… Expanded table of regression types
    • βœ… Richer code examples for onboarding

βœ… Requirements

  • PHP 8.1 or higher
  • Composer

πŸ§ͺ Run Tests

./vendor/bin/phpunit

Test files are located in the tests/ directory.


πŸ”— Useful Links


Thank you for using ForecastRegressions!
⭐ If you find this project helpful, consider starring the repository or contributing.