def format_model_basefilename(segment_subject: str, traindata_id: int,
    architecture_id: int=0, trainparams_id: int=0) ->str:
    """
    Format the parameters into a model_filename.
    
    Args
        segment_subject: the segment subject
        traindata_id: the id of the data used to train the model
        architecture_id: the id of the model architecture used
        trainparams_id: the id of the hyper parameters used to train the model
    """
    filename = f'{segment_subject}_{traindata_id:02d}'
    if architecture_id > 0 or trainparams_id > 0:
        filename = f'{filename}.{architecture_id}.{trainparams_id}'
    return filename
