From: "Mauricio Fernández" Date: 2003-04-21T01:10:33+09:00 Subject: Re: Biased weighted random? On Mon, Apr 21, 2003 at 12:42:31AM +0900, Chris Pine wrote: > batsman@kodos:~/germany2/src$ ruby markov2.rb > Trying to approximate NVector.float(6): [ 0.4, 0.2, 0.2, 0.1, 0.001, > 0.099 ] > Needed 112 iterations. > Got transition matrix: NMatrix.float(6,6): [...] > Your program would give > NMatrix.float(6,6): [...] > somewhat different. as you can see. > ---------------------------- > > (Just to clarify, those number from my program are the weights to go into > the bonehead algorithm, *NOT* their probabilities, which are: The transition matrix above corresponds to these weights, got it right. > > I still think I would prefer the matrix given by my own algorithm, because > it is more "evenly uneven": each row is sort of weird *in the same way*. Yours is indeed better, as its entropy rate is gonna be higher because of the way my algorithm works. I can however easily modify mine to increase entropy (but I think convergence would be slower). -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Win95 is not a virus; a virus does something. -- unknown source