I have ecommerce site which I try to optimize my search results to give the most relevant ones for the user.
To give the most relevant results for searches I made a rating
metric. The rating
metric is build based on the product parameters and the weight of each one.
The
rating
score is normalized from 0-1The functions of
fn
returns score from 0-1rating = b0*f0(X0) + b0*f1(X1) + bn*fn(Xn)
e.g: rating = 0.4*f(seller_score) + 0.25*f(customers_stars) + 0.35*f(return_rate) = 0.683
When someone search for "kitchen chair" I sort the returned results based on the rating score.
SELECT
*
FROM
db
WHERE
category = "kitchen chair"
ORDER BY rating DESC
LIMIT 50
The user click on some results which I log. In optimal world the user will pick one of the first results since the rating score is working well and the user is getting what he probably was looking for. But if the user picked the 24th product from the list maybe my rating score is not optimized.
My goal is to optimize the coefficients of my rating
metric to match as much as possible for what the users actually click on so they will get the best result first.
I have a series of n
search terms with their results and what the user clicked on.
What algorithm I can use to find the best coefficients of b0, b1, ..bn
so the clicked results will actually be on top.
For now I look to find a result the fits for all the search term and not to optimize each search term.