Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Good evening Monks --

I am trying to partly 'backfill' or 'backrepair' a database of information about transactions wherein a user has downloaded a piece (or pieces) of data from one of our servers. More specifically, I am trying to repair some partial information, if possible.

The problem: the information in this database has been generated from a motley variety of logfiles, etc. over the past dozen years or so -- the hostname of the download-er is usually captured, to some degree, but it is sometimes only a partial hostname.

Ultimately we'd like to gather geographical information about where users are from, etc., for generating usage statistics, and so on.

What I am struggling to do currently is to match these partial hostnames (I'm working on identifying them _as_ partials, too) against a large text file of hostnames I have gathered from all the available relevant logfiles -- specifically, ones where the hostnames _don't_ have the 'partial' problem.

So, for example, if I have an entry where the host is recorded as 'blahdee.etcet' I'd like to match this to 'blahdee.etcetera.rome.it' or whatever, from my list of complete hostnames, and be able to assign a measure of 'confidence' that it is correct.

I'd guess this would be at least partly based on the number of characters in the partial hostname vs the number in the candidate full hostname ... but my maths aren't really up to* designing such a 'confidence algorithm.'

I can't show code for this part because I'm trying to plan it first -- the rest of the application this is part of is rather vanilla and dull. :) If anyone knows what sort of algorithm I should be looking for here, or whether what I'm trying to do is even feasible, I'd be grateful for a nudge in the right direction.

Thanks,

* I should say they aren't bad, but I have never taken a stats course, for example. I guess I am looking for formulae I might be able to grok without too awful much trouble.


In reply to how to generate confidence / weight score for a match? by chexmix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-03-29 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found