Complete the code to add a clear description to the machine learning model function.
def train_model(data): """[1]""" # training steps here pass
The docstring should describe what the function does. Here, it trains a model using the given data.
Complete the code to add parameter documentation for the input data.
def train_model(data): """ Train a model. Parameters: data: [1] """ pass
The parameter description should explain what 'data' is used for, here it is the input dataset for training.
Fix the error in the docstring to correctly document the return value of the function.
def train_model(data): """ Train a model. Returns: [1]: trained model object """ pass
The return value should be named 'model' as it represents the trained model object returned by the function.
Fill both blanks to complete the example section in the docstring.
def train_model(data): """ Train a model. Example: model = train_model([1]) print(model.[2]()) """ pass
The example shows calling the function with 'training_data' and then using the 'predict' method on the model.
Fill all three blanks to complete the docstring with description, parameters, and returns.
def evaluate_model(model, test_data): """ [1]. Parameters: model: [2] test_data: [3] Returns: float: accuracy score """ pass
The docstring describes the function purpose, parameters, and return value clearly for evaluation.