English 中文(简体)
损坏价值的功能
原标题:Function to dampen a value

我有一份文件清单,每个文件都有搜索点的相关记分。 我需要较老的文件,以降低其相关性分数,努力在排名进程中介绍其日期。 我已尝试干扰第1/(1+date_difference)等职能,但近日来,对等职能则过于歧视。

我认为,或许是一种数学功能,其范围(0.1)和领域(0.x)可以提升其分数,而X-轴是文件时代。 最好用图像解释我从职能中进一步需要的东西:

/></p>
    </div>

           </div>
   
      <div class=

最佳回答

衰减行为往往以权宜之计(从性质上讲,许多衰变过程也随之而来)。 您将使用2个积极参数<代码>A和B,并填写。

y(x) = A exp(-B x)

由于您希望有<条码>y-range [0,1] set A=1。 较大的<代码>B使衰减。

问题回答

如果简单1/(1+x)的下降速度太快,sigmoid function,如1/(1+e^-x)或错误功能可能更适合您的目的。 让目前这个日期在这种职能的负数中有所点,而且你可以获得某种可预见时间的现值,然后降至基值。

log((x+1)-age_of_document)

标识基数(x+1)。 注x与你的图表相同,是“阈值”。 如果文件年龄大于x,则分数为负数。 采用尽可能高的分数,以多加采用。

E.g. 域 = (0,10)最高分10:10*(log(11-x)/log(11)

A bit late, but as thiton says, you might want to use a sigmoid function instead, since it has a "floor" value for your long tail data points. E.g.:





相关问题
Mysql compaire two dates from datetime?

I was try to measure what is faster and what should be the best way to compare two dates, from datetime record in MySql db. There are several approaches how to grab a date from date time, but I was ...

iPhone Date Picker rolls over to 2010 on December 27th?

So I implemented a UIDatepicker in one of my applications for scheduling and autodialing teleconferences... everything is pretty much ready to go except, while testing I noticed that when the date ...

Convert date Python

I have MMDDYY dates, i.e. today is 111609 How do I convert this to 11/16/2009, in Python?

specifying date format when using $form->inputs() in CakePHP

I am wondering if there is a way to specify the date format in the forms created using CakePHP s $form->inputs(); Please note that this is not the individual $form->input() but instead $form->inputs() ...

NSDateFormat, super simple! Where am I screwing up?

Ok, this is really simple, maybe I m a getting a bit burnt out, but seems like it should work, Query XML feed, put out date string, format, display in a cell. The issue is I m a getting a NULL ...

sqlite writing a date into an email

I am exporting a date value from sqlite and placing it into an email. The date appears like this 279498721.322872 I am using Objective C in an Iphone App. Does anyone know how to make this export ...