Yong Cui
Aug 18, 2021

--

For instance, if you're building a class called MLModel, using which you configure a machine learning model. When you run the model, you may want to make it callable, something like

model = MLModel()

# set up the model parameters

model()

Certainly, you can define a run method if you prefer, as an alternative.

--

--

Yong Cui
Yong Cui

Written by Yong Cui

Work at the nexus of biomedicine, data science & mobile dev. Author of Python How-to by Manning (https://www.manning.com/books/python-how-to).

No responses yet