From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.ada Subject: Re: Some advice required [OT] Date: Mon, 27 Dec 2021 13:14:40 +0000 Organization: A noiseless patient Spider Message-ID: <87sfue8a0v.fsf@bsb.me.uk> References: <7bede061-4b0f-4029-beb1-1056637e57d6n@googlegroups.com> <49538254-21ed-4fd0-8316-1bccc7d3c635n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="43c94de768bae35691324aa39c32d313"; logging-data="16133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hYf9QYqJkv/0uqDM2unT7/uwVMLfbEqk=" Cancel-Lock: sha1:kyTAH9i83mQbQOzcKu+EvsvL5BM= sha1:6+WaJPa9FY1r+Qqka4w6lLKiZWg= X-BSB-Auth: 1.28d44797039971f8b356.20211227131440GMT.87sfue8a0v.fsf@bsb.me.uk Xref: reader02.eternal-september.org comp.lang.ada:63276 List-Id: Laurent writes: > On Monday, 27 December 2021 at 12:16:27 UTC+1, Niklas Holsti wrote: > >> Sorry, but I found your problem description impossible to understand. >> Try to describe more clearly the experiment that is done, the structure >> of the data the experiment provides (the meaning of the Excel rows and >> columns), and the statistic you want to compute. > > Sorry tried to keep it short, was too short. > > Columns are the antimicrobial drugs > Rows are the microorganism. > > So every cell contains a result of S, I, R or simply an empty cell > > S = Sensible > I = Intermediate > R = Resistant > > empty cell > If a patient has 3 strains of the same microorganism but with > different resistance profiles I have to find the most resistant > one. Or if they are different I keep them all. > > I have no idea how to explain what I am doing to the compiler. I think when you can explain it to people, you'll be able to code it. I am still struggling to understand what you need. > Why I would choose result from strain B over the result from strain A. > > strain A: SSSRSS > strain B: SSRRRS Let's space it out drug 1 drug 2 drug 3 drug 4 drug 5 drug 6 strain A S S S R S S strain B S S R R R S You want to choose B because it has is resistant to more drugs, yes? I think, from the ordering you give, you need a measure that treats an R as "more important" that any "I" which is "more important" than an "S". (We will come to empty cells later.) I think you need to treat the number of Rs, Is and Ss like digits in a number. In base 10, the strains score R S I strain A 1 5 0 = 150 strain B 3 3 0 = 330 Now, in fact, you don't need to use base 10. The smallest base you can use is one more than the maximum number of test results. If there can be up to 16 tests (say) the score is n(R)*17*17 + n(S)*17 + n(I). If this suits your needs, we can consider empty cells later on. It's not at all clear to me how to compare strain C R____ strain D RRSSSS Strain C is "less resistant" but only because there is not enough information. In fact it seems more serious as it is resistant to all tested drugs. And then what about strain D SR strain E RS Do you need to weight the drugs to break ties? I.e. is drug x more important than drug y if x < y? -- Ben.