def createLearnAlg(Data, model, ReqArgs, KwArgs, 
                    algseed=0, savepath=None):
  algName = ReqArgs['algName']
  algP = KwArgs[algName]
  if 'birth' in KwArgs:
    algP['birth'] = KwArgs['birth']
  if 'merge' in KwArgs:
    algP['merge'] = KwArgs['merge']
  outputP = KwArgs['OutputPrefs']
  if algName == 'EM' or algName == 'VB':
    learnAlg = bnpy.learnalg.VBLearnAlg(savedir=savepath, seed=algseed, \
                                      algParams=algP, outputParams=outputP)
  elif algName == 'soVB':
    learnAlg = bnpy.learnalg.StochasticOnlineVBLearnAlg(savedir=savepath, seed=algseed, algParams=algP, outputParams=outputP)
  elif algName == 'moVB':
    learnAlg = bnpy.learnalg.MemoizedOnlineVBLearnAlg(savedir=savepath, seed=algseed, algParams=algP, outputParams=outputP)
  else:
    raise NotImplementedError("Unknown learning algorithm " + algName)
  return learnAlg


########################################################### Write Args to File
###########################################################
Creates a bnpy LearnAlg object for the given Data and model
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/ContinueRun.py/createLearnAlg