updateGuidData: Update 'GuidData' object from one GLoMo to the next

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/GLoMo.r

Description

During repeated fits of GLoMo, typically some 'glomorows' get lost in the process. This function updates a GuidData object from the 'old' GLoMo to the reduced newer one, so it doesn't have to be fully recalculated (since this implies a grep which could be expensive).

Usage

1
updateGuidData(oldglomo, newglomo, oldrowsused = seq(nrow(oldglomo$uid)), oldguiddata)

Arguments

oldglomo

old GLoMo object

newglomo

new GLoMo object

oldrowsused

Which of the rows in oldglomo were used for sampling from a certain dataset.

oldguiddata

GuidData object that needs updating to the new

Details

It is the possibleGlomoGuidPerObs of the GuidData that is updated

Value

GuidData object

Note

Will have to see whether this really provides a speedup. Maybe doing the grep again with the reduced uids will be faster than this

Author(s)

Nick Sabbe (nick.sabbe@ugent.be)

See Also

GLoMo-package, NumDfr, getGuidData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
iris.md<-randomNA(iris, 0.1)
iris.md.nd<-numdfr(iris.md)
iris.nd.rnd<-rCatsAndCntInDfr(iris.md.nd, orgriName=NULL, verbosity=1)
iris.weights<-iris.nd.rnd$weights
iris.nd.rnd<-iris.nd.rnd[,1:5]
iris.glomo<-GLoMo(iris.nd.rnd, weights=iris.weights, verbosity=1)
iris.guids<-getGuidData(iris.glomo, dfr=iris.md.nd)
emulatedusedrow<-sample(length(iris.glomo$uid), size=2)
iris.guids2<-updateGuidData(oldglomo=iris.glomo, newglomo=iris.glomo,
	oldrowsused = emulatedusedrow, iris.guids)

GLoMo documentation built on May 2, 2019, 5:26 p.m.