def newModelFromExisting(model, withLdaModel=None): ''' Creates a _deep_ copy of the given model ''' print ("Model variant is " + model.name) return ModelState(\ withLdaModel \ if withLdaModel is not None \ else lda.newModelFromExisting(model.ldaModel), \ model.K, \ model.method, \ model.dtype, \ model.name)
def newModelFromExisting(model, withLdaModel=None): ''' Creates a _deep_ copy of the given model ''' print ("Model variant is " + model.name) return ModelState(\ withLdaModel \ if withLdaModel is not None \ else lda.newModelFromExisting(model.ldaModel), \ model.K, \ model.noiseVar, \ np.array(model.predVar), \ model.scale, \ model.dtype, \ model.name)