<?php

namespace Rubix\ML;

use Rubix\ML\Datasets\Dataset;
use Stringable;

/**
 * Estimator
 *
 * @category    Machine Learning
 * @package     Rubix/ML
 * @author      Andrew DalPino
 */
interface Estimator extends Stringable
{
    /**
     * Return the estimator type.
     *
     * @internal
     *
     * @return EstimatorType
     */
    public function type() : EstimatorType;

    /**
     * Return the data types that the estimator is compatible with.
     *
     * @internal
     *
     * @return list<DataType>
     */
    public function compatibility() : array;

    /**
     * Return the settings of the hyper-parameters in an associative array.
     *
     * @internal
     *
     * @return mixed[]
     */
    public function params() : array;

    /**
     * Make predictions from a dataset.
     *
     * @param Dataset $dataset
     * @return list<string|int|float>
     */
    public function predict(Dataset $dataset) : array;
}
