Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'exercise': 0.04; 'duplicate': 0.07; 'definition,': 0.09; 'integers': 0.09; 'cc:addr :python-list': 0.11; 'random': 0.14; 'times,': 0.14; '4-digit': 0.16; 'formatted': 0.16; 'pairs': 0.16; 'pairs,': 0.16; 'received:mac.com': 0.16; 'subject:generation': 0.16; 'subject:random': 0.16; 'unlikely': 0.16; 'wrote:': 0.18; 'received:10.0.1': 0.19; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'creating': 0.23; 'finally,': 0.24; 'url:home': 0.24; 'connected': 0.24; 'cc:no real name:2**0': 0.24; 'sort': 0.25; 'am,': 0.29; 'have,': 0.30; 'matching': 0.30; 'lines': 0.31; 'node': 0.31; 'file': 0.32; 'lists': 0.32; 'figure': 0.32; 'supposed': 0.32; 'becomes': 0.33; 'cases': 0.33; "i'd": 0.34; 'test': 0.35; 'but': 0.35; 'really': 0.36; '+0200,': 0.36; 'data,': 0.36; 'subject:data': 0.36; 'charset:us-ascii': 0.36; 'received:10.0': 0.36; 'seconds': 0.37; 'received:10': 0.37; 'filled': 0.38; 'received:17': 0.38; 'that,': 0.38; 'enough': 0.39; 'how': 0.40; 'course': 0.61; 'simply': 0.61; 'times': 0.62; 'real': 0.63; 'refer': 0.63; 'different': 0.65; '26,': 0.68; 'real-world': 0.68; 'paper': 0.75; '2014,': 0.84; 'header:In- reply-to:1': 0.84; 'subject:Network': 0.84; 'subject:World': 0.91 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.27,0.0.0000 definitions=2014-08-26_05:2014-08-26,2014-08-26,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1408260160 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Small World Network model random data generation From: William Ray Wing In-reply-to: Date: Tue, 26 Aug 2014 09:57:40 -0400 Content-transfer-encoding: quoted-printable References: To: Dennis Lee Bieber X-Mailer: Apple Mail (2.1878.6) Cc: python-list@python.org, "William R. Wing" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409061477 news.xs4all.nl 2898 [2001:888:2000:d::a6]:51865 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77042 On Aug 26, 2014, at 9:23 AM, Dennis Lee Bieber = wrote: > On Tue, 26 Aug 2014 12:16:33 +0200, lavanya addepalli = > declaimed the following: >=20 >> How can i generate a random data that is identical to my realworld = data >>=20 >=20 > By definition, "random data" will be unlikely to ever be = "identical" to > your "realworld data". >=20 >=20 >> i am supposed to refer the attached paper >>=20 >> Real Data >>=20 >> node pairs and the time they spend together connected >>=20 >> node node time in seconds >> 4391 2814 16.0 [byte] >> 1885 1158 351.0 >> 1349 1174 6375.0 >>=20 >=20 > Since I see no cases of duplicate node /pairs/ it is difficult = to > figure out just what that data really represents... >=20 > With enough data, with duplicate pairs having different times, = I'd > likely group by pairs, generate mean and standard deviation for the = times > of the matching pairs, then generate some count of the pairs to = develop > weights... Finally, using the weights I'd attempt to generate random = node > pairs and then use the mean/SD of the result pair to generate a time = from > the gaussian distribution. >=20 > With only the data you have, I'd end up with a sparse 2D matrix > M[first_node, second_node] =3D time >=20 > And then selecting random samples from that... > --=20 > Wulfraed Dennis Lee Bieber AF6VN > wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/ I think the OP wanted to create some sort of test file that was = formatted like his real-world data, but was filled with artificial data. That, of course simply becomes an exercise in creating lists of random 4-digit = integers and floats, then arranging them as lines and writing out the data. -Bill=