Pipeline Example

A pipeline assembles preprocessing and a final estimator while preserving state for inference.

Structure

Example

use Pml\Dataset;
use Pml\Pipeline;
use Pml\Transformers\StandardScaler;
use Pml\Estimators\Regression\GBDTRegressor;

$dataset = Dataset::fromCSV('datasets/housing/train.csv', labelColumn: 0);
$pipeline = new Pipeline([
    new StandardScaler(),
], new GBDTRegressor());

$pipeline->train($dataset, epochs: 5, batchSize: 64);
$pipeline->save('saved_pipeline');

Internals

Persistence

Performance notes