Scoring without floating point calculations

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Scoring without floating point calculations

Otis Gospodnetic-2
Hello,

Apparently Sun's Niagara servers have a weak FPU, and I don't need my matches to contain floating point scores, so I would like to avoid floating point calculations when scoring, if possible.

Doing a quick `grep -R ' float ' *` in the source tree shows a number of places where floats are used: various *Score and *Scorer classes, various Query classes, Similarity, etc.

What would be the easiest way to plug in my own non-float scoring?

Thanks,
Otis



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Scoring without floating point calculations

kkrugler
>Apparently Sun's Niagara servers have a weak FPU, and I don't need
>my matches to contain floating point scores, so I would like to
>avoid floating point calculations when scoring, if possible.
>
>Doing a quick `grep -R ' float ' *` in the source tree shows a
>number of places where floats are used: various *Score and *Scorer
>classes, various Query classes, Similarity, etc.
>
>What would be the easiest way to plug in my own non-float scoring?

I'd briefly thought about this same issue (for the same reason), but
didn't see an easy way to plug in a different scoring algorithm.

You can always add the log of the score versus doing a
multiplication, but that would still involve a lot of source code
changes.

-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"Find Code, Find Answers"

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Scoring without floating point calculations

Otis Gospodnetic-2
Ah, this is pretty disheartening.  Regardless, I'm about to dive into this, so if you have any tips or experiences to share, I'm all eyeballs.

Otis

----- Original Message ----
From: Ken Krugler <[hidden email]>
To: [hidden email]
Sent: Friday, April 28, 2006 7:34:16 PM
Subject: Re: Scoring without floating point calculations

>Apparently Sun's Niagara servers have a weak FPU, and I don't need
>my matches to contain floating point scores, so I would like to
>avoid floating point calculations when scoring, if possible.
>
>Doing a quick `grep -R ' float ' *` in the source tree shows a
>number of places where floats are used: various *Score and *Scorer
>classes, various Query classes, Similarity, etc.
>
>What would be the easiest way to plug in my own non-float scoring?

I'd briefly thought about this same issue (for the same reason), but
didn't see an easy way to plug in a different scoring algorithm.

You can always add the log of the score versus doing a
multiplication, but that would still involve a lot of source code
changes.

-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"Find Code, Find Answers"

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Scoring without floating point calculations

Paul Elschot
On Tuesday 09 May 2006 01:39, Otis Gospodnetic wrote:

> Ah, this is pretty disheartening.  Regardless, I'm about to dive into this, so if you have any tips or experiences to share, I'm all eyeballs.
>
> Otis
>
> ----- Original Message ----
> From: Ken Krugler <[hidden email]>
> To: [hidden email]
> Sent: Friday, April 28, 2006 7:34:16 PM
> Subject: Re: Scoring without floating point calculations
>
> >Apparently Sun's Niagara servers have a weak FPU, and I don't need
> >my matches to contain floating point scores, so I would like to
> >avoid floating point calculations when scoring, if possible.

In case you don't need score values at all, have a look at the score(HitCollector) method of Scorer. This method is easily
simplified to not call the Scorer.score() method at all.

> >
> >Doing a quick `grep -R ' float ' *` in the source tree shows a
> >number of places where floats are used: various *Score and *Scorer
> >classes, various Query classes, Similarity, etc.

By default, a lot of the score computation during query search is done by
table look up in TermScorer.

> >
> >What would be the easiest way to plug in my own non-float scoring?

Is there a profile available showing a floating point bottleneck during
a query search?

Regards,
Paul Elschot