| От | Ed Loehr |
|---|---|
| Тема | Re: Re: Matching and Scoring with multiple fields |
| Дата | |
| Msg-id | 396A409C.520CCDA@austin.rr.com обсуждение исходный текст |
| Ответ на | Re: Matching and Scoring with multiple fields ("Tim Johnson" <tim@lincolnshirenow.com>) |
| Список | pgsql-sql |
Tim Johnson wrote: > > I have a table like this: > > a,b,c,d,e,f,g,h > --------------- > 2,5,3,4,4,5,2,2 > 1,1,1,1,1,1,1,1 > > a to h are of type int. > > I want to take input values which relate to this table say: > how do you feel about a: > how do you feel about b: > how do you feel about c: > ... > > and the answers will be 1 to 5. > > Now I want to take those answers for my incoming a to h and scan down the > table pulling out the closest matches from best to worst. I wonder if you don't really just want to find the vector(s) closest in N-space to the input vector. You might dig up an old 3-variable calculus book, find the formula, and write a PL/pgSQL function to compute the distance between two N-dimensional vectors... Regards, Ed Loehr
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера