private methodlossfn — function methodlossfn(method) Default loss function to use when training models for method.