Jump to content

Log-like functions


btherl

Recommended Posts

Hi!

 

I'm looking for some functions which "look like" log.  That is, f(x) should start out increasing fast for x near 0, and then slow down as x increases.  If you can provide a class of such functions (mathematical class, not PHP class) then that would be even better :)

 

I want these to apply to some data points to squash them down into a log like scale.  But log often isn't quite the right function, so I want to try some other similar looking functions.

 

The key points for these functions are:

 

- Implementable in PHP

- Input domain is integers in {1..INT_MAX}.

- Parameters if possible, to affect the shape of the curve in various ways

- First derivative starts high but approaches 0 as x increases

- Not c*log_b(x), I've tried that :)

Link to comment
Share on other sites

If you are looking for a natural curve with logarithmic tendencies the hyperbolic functions sinh, cosh might help you. However I must ask why you need a function when the function is really defined by a  series of values not the series of values by the function

 

Logarithmic application is used a lot in chemistry to create a qualitative answer that is unitless for ease of compassions is that your motive here?

 

Link to comment
Share on other sites

However I must ask why you need a function when the function is really defined by a  series of values not the series of values by the function

 

Sorry, I don't get what you mean here.  In my mind, a function and a series of values (indexed by input variable) are equivalent.

 

My motive is to rank various entities (such as websites, links, search terms) based on various values.  At the low end of the scale, differences in rank are very important, but at the high end of the scale (meaning lower ranked), differences in rank are less important.  Hence the need for a log like approach to interpreting these ranks.

 

I am also ranking other entities according to counts (eg, times a search term was entered).  In this case a logarithmic scale is also useful, but this time because I want the numbers to be manageable.  For example, google might be a 9.9 on a scale of 1 to 10, which is easier to understand to the average person than google being a 48375857 on a scale of 1 to 53875936.

Link to comment
Share on other sites

Logarithmic application is used a lot in chemistry to create a qualitative answer that is unitless for ease of compassions is that your motive here?

 

i have to disagree here.  the point of using log functions in chemistry isn't just to make something "unitless," but rather to bring an extremely large-scale set of data down to rational numbers, exactly what a log function is intended to do.  granted it comes out unitless simply because the log of a unit doesn't really translate, but any chemist knows precisely what the unit was before it was tossed through a log function.

 

things come out with smaller numbers, which may seem easier to compare, but the main reason is laziness.  we don't like writing scientific notation.  furthermore, i'd argue that it's harder to compare logarithmic numbers fairly unless one knows it's a log scale, because it's somewhat counterintuitive to say that something with a value of 2 (assuming a 10-base log) is 10 times greater than a value of 1.

 

i just had to jump in because for once, chemistry was mentioned around here.

Link to comment
Share on other sites

Yes that is the secondary part to the log application in chemistry so that you can compare based on a y=mx+b realtionship vs somethign that is y=n^x+b where n is any integer value.  However I think your best idea to this is some equation like

$quality= C1(v1) + C2(v2) + ... where the constants are some sort of weighting factor for them such as 2ln(v1) for example until you come across some curves that quantify each variable in the manner you see fit.

Link to comment
Share on other sites

However I think your best idea to this is some equation like

$quality= C1(v1) + C2(v2) + ... where the constants are some sort of weighting factor for them such as 2ln(v1) for example until you come across some curves that quantify each variable in the manner you see fit.

 

My input domain is a single integer, not a vector of integers.

Link to comment
Share on other sites

My input domain is a single integer, not a vector of integers.

[quote author=btherl link=topic=157000.msg682838#msg682838 date=1188264416

My motive is to rank various entities (such as websites, links, search terms) based on various values.  At the low end of the scale, differences in rank are very important, but at the high end of the scale (meaning lower ranked), differences in rank are less important.  Hence the need for a log like approach to interpreting these ranks.

If you have various entries you goal is to develop one number that is a quantitative comparison of site A to B based on the collaboration of all these values.  So you will have to apply factors to each one individual then sum them as a whole (even possible to have stuff like var1/var2*c + var1*c2 if var1 and 2 are comparative values  like var 1 = unique hits and var 2 is total hits

Link to comment
Share on other sites

Yeah Y=Log (base c) X where C is >0 and an integer, but thats not what you are saying.  You have a bunch of variables or am I looking at the too big of a picture right now, because i think that is what you think.  There are alot of mathmatical functions out there to provide a curve, one such coming to mind is a bell curve that could be for a site that has ads, too few ads isn't good but too many is also bad the function e^-x^2 will produce a bell curve.  I like your idea and I want to help so lay out some variables/ranges (like for example Hits if it has <100 hits its almost nothing (per day) and majority of the climb is in the 1k-100k per day range I can develop something for you to show you as example for this.  And then say return a quantity value that is between 0-100 (percentage so to speak) then just weight them/add/divide all the factors together to get that 1-100 scale rating.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.