Skip to content

Improving docs' coherence #296

@akashagarwal7

Description

@akashagarwal7

class Estimator(Stage):
"""
Base class for an estimator in a Surround pipeline. Responsible for performing estimation
or training using the input data.
This stage is executed by :meth:`surround.assembler.Assembler.run`.
Example::
class Predict(Estimator):
def initialise(self, config):
self.model = load_model(os.path.join(config["models_path"], "model.pb"))
def estimate(self, state, config):
state.output_data = run_model(self.model)
def fit(self, state, config):
state.output_data = train_model(self.model)
"""
@abstractmethod
def estimate(self, state, config):
"""
Process input data and store estimated values.
.. note:: This method is ONLY called by :meth:`surround.assembler.Assembler.run` when
running in predict/batch-predict mode.

This is a very small suggestion—it'd be less confusing for someone like me who is new to ML and the Surround project, if in the above snippet used a single term everywhere, i.e. Predict instead of Estimate and Predict, assuming they don't hold different meanings in the ML land/this context. 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions