Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Of all the tyrannies that affect mankind, tyranny in religion is the worst." -- Thomas Paine


devel / comp.lang.python / matrix row comparison and fetch data with numpy

SubjectAuthor
o matrix row comparison and fetch data with numpyvariety jones

1
matrix row comparison and fetch data with numpy

<1ce53936-fb8f-487e-bf59-df0926f130e4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15737&group=comp.lang.python#15737

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:ad4:5423:: with SMTP id g3mr18505374qvt.45.1635247259515;
Tue, 26 Oct 2021 04:20:59 -0700 (PDT)
X-Received: by 2002:a0c:e909:: with SMTP id a9mr17108644qvo.2.1635247259359;
Tue, 26 Oct 2021 04:20:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Tue, 26 Oct 2021 04:20:59 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=197.1.175.105; posting-account=Jor1EwoAAABWWihAuqpIz7HpLIPe50Pf
NNTP-Posting-Host: 197.1.175.105
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1ce53936-fb8f-487e-bf59-df0926f130e4n@googlegroups.com>
Subject: matrix row comparison and fetch data with numpy
From: varietyj...@gmail.com (variety jones)
Injection-Date: Tue, 26 Oct 2021 11:20:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 56
 by: variety jones - Tue, 26 Oct 2021 11:20 UTC

I have 2 matrix with , M and M' , The M' matrix is the result of calculation "order preserving" of the matrix M so i will explain more by examples , so here is the matrix M :

M= np.array([
[15,4,-1,9,10,7],
[-4,2,29,11,98,5],
[101,24,3,19,77,53],
[0,88,34,62,13,-9],
[52,93,44,46,24,125],
[0,17,26,8,87,0],
[103,19,52,173,66,24],
[26,78,123,-5,13,41]
])

so lets take the row L1 from the matrix M so the smallest integer is - 1 so we take the position of -1 from the matrix M which is in the column C3 and write 1 in L1 of the matrix M', and here we go for the other numbers we compare them and take the right order , in case of similarity we give them the same order ,
this part is looking fine i write a program who take a matrix and calculate the order preserving of it and show the results in the second matrix , here is my code :
https://pastebin.com/jpaZfVsB

so the second step is , We will take the columns similar to X% from the matrix M'

In this case there are two conditions : X% = 100% similar
The number of minimum similar columns : 𝑁𝑏𝑟𝑒 𝑐𝑜𝑙 𝑚𝑖𝑛=2

so from the matrix M' we will compare row by row : L1 to L2 , L2 to L 3 until we find similar rows and here is the results :
Seed1= {L1 l2 c2 c4 c6}
Seed2= {L1 l3 c1 c3 c5}
Seed3={L3 l6 c2 c4 c5}
Seed4={L4l6 c3 c6}
Seed5= {L7 l8 c3 c5 c6}
In order to build a bi-group , We must combine the seeds with each other: we will unite the rows of the seed and the intersection of the columns of the seed By respecting: 𝑁𝑏𝑟𝑒 𝑐𝑜𝑙 𝑚𝑖𝑛 = 2
the final results :
Bi-groupe 1={L1 l2 l3 l6 c2 c4}
Bi-groupe2={L1 l3 l7 l8 c3 c5}
Bi-groupe 3={L4 l6 l7 l8 c3 c6}

i just want a function or away to figured out the seeds by rows comparison and show the bi-groupe results

Many Thanks

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor