btherl Posted August 28, 2007 Share Posted August 28, 2007 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 Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 28, 2007 Share Posted August 28, 2007 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? Quote Link to comment Share on other sites More sharing options...
btherl Posted August 28, 2007 Author Share Posted August 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 28, 2007 Share Posted August 28, 2007 develop an equation weighting each value based on its importance in a log function Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 28, 2007 Share Posted August 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 28, 2007 Share Posted August 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 28, 2007 Share Posted August 28, 2007 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. this application being secondary to what? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 28, 2007 Share Posted August 28, 2007 secondary as in there are 2 not being second order or any such thing (second order talking reactions orders need to stop.) Quote Link to comment Share on other sites More sharing options...
Barand Posted August 28, 2007 Share Posted August 28, 2007 secondary as in there are 2 not being second order or any such thing (second order talking reactions orders need to stop.) I guess there's an alternative universe somewhere where that made perfect sense. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 28, 2007 Share Posted August 28, 2007 barand did your mother ever tell you if you don't have something nice to say don't say anything at all, because you never seem to have anythign nice to say. Quote Link to comment Share on other sites More sharing options...
Barand Posted August 28, 2007 Share Posted August 28, 2007 And did your mother tell you if you can't say something sensible, don't say anything at all? Quote Link to comment Share on other sites More sharing options...
btherl Posted August 29, 2007 Author Share Posted August 29, 2007 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. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 29, 2007 Share Posted August 29, 2007 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 Quote Link to comment Share on other sites More sharing options...
btherl Posted August 29, 2007 Author Share Posted August 29, 2007 I understand what you are saying, but that's not what I want. I want a log-like function with a single integer as input and a single float as output. Do you know of any such functions? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 30, 2007 Share Posted August 30, 2007 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. Quote Link to comment Share on other sites More sharing options...
btherl Posted September 5, 2007 Author Share Posted September 5, 2007 Thanks! Those are the kinds of functions I'm looking for. I'm going to try out a few of them and see if I can get a curve that works. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted September 6, 2007 Share Posted September 6, 2007 Got anything designed yet? Quote Link to comment Share on other sites More sharing options...
teng84 Posted September 7, 2007 Share Posted September 7, 2007 @barand @cooldude832 keep it up guys I love reading your post you guys make me laugh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.