def create_ffm(): """ Create a field-aware factorization machine. """ model_type = 'ffm' handle = XLearnHandle() _check_call(_LIB.XLearnCreate(c_str(model_type), ctypes.byref(handle))) return XLearn(handle)
def create_linear(): """ Create a linear model. """ model_type = 'linear' handle = XLearnHandle() _check_call(_LIB.XLearnCreate(c_str(model_type), ctypes.byref(handle))) return XLearn(handle)