Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78293

Re: "Fuzzy" Counter?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.079
X-Spam-Evidence '*H*': 0.84; '*S*': 0.00; 'input,': 0.09; '23,': 0.16; 'exist.': 0.16; 'item)': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'advance.': 0.19; 'example': 0.22; 'creating': 0.23; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'usually': 0.31; 'closer': 0.31; 'sep': 0.31; 'guess': 0.33; 'actual': 0.34; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'definition': 0.35; 'equal': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'previous': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; 'first': 0.61; "you'll": 0.62; 'here': 0.66; 'determine': 0.67
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Z5Y6dwmUh+7n9cs/09WdGR4jjWLnzEt1Ci3UmXlVxpE=; b=W3DhaGVm41xtbHBubZiqKU/vs4jhE3KaZ1WMIY4TPPP128u0HU9IhB0I9GeHA+d2K3 LKed9i+3Y5g5r0Yq59uYKddNFb1MzrswEbgGT8eAvAneAd+MBGHaiyVPiQV8Hm5RdQ+D vqFwnuyB4pIXmPlnEQ7N08G3DE0Sc8I0yRE6I900htW+3tVtDU6gOno69gp9uWkUyKLh xOIGac3EUtVNu/M8O8cW2D92txCXKFiSrvQzK+4a8aZj0dtJBNfWE0V+5f6F3js4Qhma xdP/lEQ+XHNEUL5a6F46b5nmnC1HJJQkpvRCap77WkrUVwO8JgPp8WrvgUDkEeyi9uaX dHtQ==
X-Received by 10.194.209.207 with SMTP id mo15mr8506832wjc.6.1411570618319; Wed, 24 Sep 2014 07:56:58 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <1a63fb8d-e0b8-4385-acbc-ddb6bf1f0f7d@googlegroups.com>
References <0d28ee82-2240-4f10-9db9-e966c0e62a13@googlegroups.com> <20140923093244.066bb10b@rg.highlandtechnology.com> <1a63fb8d-e0b8-4385-acbc-ddb6bf1f0f7d@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Wed, 24 Sep 2014 08:56:18 -0600
Subject Re: "Fuzzy" Counter?
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14318.1411570620.18130.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1411570620 news.xs4all.nl 2967 [2001:888:2000:d::a6]:45540
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78293

Show key headers only | View raw


On Tue, Sep 23, 2014 at 11:01 PM, Miki Tebeka <miki.tebeka@gmail.com> wrote:
> On Tuesday, September 23, 2014 7:33:06 PM UTC+3, Rob Gaddi wrote:
>
>> While you're at it, think
>> long and hard about that definition of fuzziness.  If you can make it
>> closer to the concept of histogram "bins" you'll get much better
>> performance.
> The problem for me here is that I can't determine the number of bins in advance. I'd like to get frequencies. I guess every "new" (don't have any previous equal item) can be a bin.

Then your result depends on the order of your input, which is usually
not a good thing.

Why would you need to determine the *number* of bins in advance? You
just need to determine where they start and stop. If for example your
epsilon is 0.5, you could determine the bins to be at [-0.5, 0.5);
[0.5, 1.5); [1.5, 2.5); ad infinitum. Then for each actual value you
encounter, you could calculate the appropriate bin, creating it first
if it doesn't already exist.

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

"Fuzzy" Counter? Miki Tebeka <miki.tebeka@gmail.com> - 2014-09-23 05:34 -0700
  Re: "Fuzzy" Counter? Peter Otten <__peter__@web.de> - 2014-09-23 15:36 +0200
    Re: "Fuzzy" Counter? Miki Tebeka <miki.tebeka@gmail.com> - 2014-09-23 21:57 -0700
      Re: "Fuzzy" Counter? random832@fastmail.us - 2014-09-26 13:57 -0400
  Re: "Fuzzy" Counter? Tim Chase <python.list@tim.thechases.com> - 2014-09-23 08:42 -0500
  Re: "Fuzzy" Counter? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-09-23 09:32 -0700
    Re: "Fuzzy" Counter? Chris Angelico <rosuav@gmail.com> - 2014-09-24 02:41 +1000
    Re: "Fuzzy" Counter? Miki Tebeka <miki.tebeka@gmail.com> - 2014-09-23 22:01 -0700
      Re: "Fuzzy" Counter? Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-24 08:56 -0600
        Re: "Fuzzy" Counter? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-26 16:45 +1000
        Re: "Fuzzy" Counter? Miki Tebeka <miki.tebeka@gmail.com> - 2014-09-26 01:23 -0700
      Re: "Fuzzy" Counter? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-09-26 11:30 -0700
        Re: "Fuzzy" Counter? random832@fastmail.us - 2014-09-26 15:10 -0400
          Re: "Fuzzy" Counter? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-09-26 12:36 -0700
    Re: "Fuzzy" Counter? Ethan Furman <ethan@stoneleaf.us> - 2014-09-26 09:20 -0700

csiph-web