Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: [OT] Normalizing the return result of an exponential formula

by clinton (Priest)
on Apr 14, 2011 at 16:55 UTC ( #899479=note: print w/replies, xml ) Need Help??

in reply to Re: [OT] Normalizing the return result of an exponential formula
in thread [OT] Normalizing the return result of an exponential formula

What I was trying to achieve with radius was to give the user the ability to say: "anything within this circle is really important", where that circle might be a country, or a province. So the curve might look like:

16 : @@@@@@@@@@@@@@@@@@@@@@@@@ - 32 : @@@@@@@@@@@@@@@@@@@@@@@@ | inside radius 64 : @@@@@@@@@@@@@@@@@@@@@@ - 128 : @@@@@@@@@@@@@@ 256 : @@@@@@@@@@ 512 : @@@@@@ 1024 : @@@ 2048 : @@ 4096 : @ 8192 : @
  • Comment on Re^2: [OT] Normalizing the return result of an exponential formula
  • Download Code

Replies are listed 'Best First'.
Re^3: [OT] Normalizing the return result of an exponential formula
by BrowserUk (Pope) on Apr 14, 2011 at 17:20 UTC

    Then I misunderstand what you meant by "2. radius: ie any distance within this inner radius should be pretty much as important as any other point within this radius"

    To me that reads as, everything inside the circle is equally important, but as the distance outside that circle increases, the importance falls off exponentially. This was reinforced by your adding the distance to the radius in your formula.

    As that does not appear to be the case, and as you new diagram does nothing to explain the relationship between 'radius' and 'distance', I think you are going to have to explain the relationships between the 4 input variables much more clearly?

    For at least me. I'm sometimes quite good at reading between the lines, but with your latest information I cannot reconcile your formula, terminology, and stated goals.Ie.

    Is 'distance' measured inside the circle? From the centre toward the edge? Or from the edge toward the centre?

    Is 'boost' an exponential decline in 'importance' over 'distance'? As suggested by the term 'dropoff'. (It is a strange name for a decline in anything?)

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Apologies, I'm not expressing myself terribly well. Let me explain what I'm ACTUALLY trying to achieve, and perhaps the solution will be more apparent.

      I am building an autocomplete function of place names:

      1. Places could be districts, towns, cities, regions, countries.
      2. Each place has a "rank" eg a capital is more important than a village
      3. Each place also has a lat/long position
      4. Each place is indexed in ElasticSearch (a lucene based full text search engine) using edge-ngrams

      Currently, to find a list of relevant place names to return, I do a search against ElasticSearch (ES) based on the text a user has typed in. ES calculates a score based on the frequency of those ngrams, with the usual full-text-search relevance scoring. I then incorporate the "rank" (eg capital vs village) into that final score and sort the results using this final score.

      I would like to add a geo-location element. So villages (low rank) close to (eg) your home town would score more highly than a city (high rank) 2000km away.

      And I would like to be able to say that eg anything with 10km, or 100km or $x km (ie it should be configurable) is more relevant than it would be by just following the curve of the formula

      But the value that gets returned (the boost) should range from (eg 0..10), so that the user of my module wouldn't have to guess about how much effect the value that they pass in might have on the results.

      It may be that I'm over thinking this.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://899479]
[Corion]: Discipulus: Well, in many cases it doesn't make sense to build an interface and complicated program just to enter 20 rows into a database ;) But yes, automating data imports should pay off in the long run
[LanX]: Choroba: this happened before I joined, was still in uni, but my boss was summoned to the CEO of the second biggest German bank at that time and could only say " I told them its not ready" ;)
[LanX]: memories....I missed my connection while chatting
[Discipulus]: in this case Corion we are speaking about software licensing: evry year or two we must rescan the whole ced to produce an excel report, while at every activation / disactivation we update a black box DB: i said that i a week i can produce the perl to..
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2017-03-29 12:04 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (350 votes). Check out past polls.