Are there any algorithms for weighting various factors?

Sorry if I do not explain it correctly. I want to know if there are algorithms for weighing various factors in the decision-making process.

I read the software collective intelligence, and there is a chapter in which you build a search engine and use various factors to rank web pages (pagerank, word frequency, word spacing, words in the heading, etc.). Basically in their code example, they have all the factors as functions in the class, and then use this command to evaluate them:

weights=[(1.0,self.locationscore(rows)), (1.0,self.frequencyscore(rows)), (1.0,self.distancescore(rows)), (1.0,self.pagerankscore(rows)), (1.0,self.linktextscore(rows, wordids))] 

Each factor is evaluated in the same way (1.0), but I was wondering if there was a way to dynamically distinguish between different factors without manually setting the scales? In the book, they continue to use neural networks to study user clicks, but the indicated weights remain the same.

I get a sense of a non-static way to do this, but I don’t know what. Any suggestions on how to approach this would be great.

Thanks in advance

Note: if you need an example code from a book, http://examples.oreilly.com/9780596529321/ , and the chapter I'm talking about is chapter 4 Also, if I don't explain anything correctly, let me know and I will clarify Your question.

+6
source share
1 answer

First define your utility function . How to evaluate if one solution is better than another. One common utility for the problem you described is recall and accuracy and F measure .

Also create a scorecard . Create a set of queries and a set of expected responses for these queries.

Now you can customize your weight functions with any AI optimization algorithm, such as climbing a hill or genetic algorithms . In these optimization algorithms, your variables are weights for each algorithm, and you are trying to optimize your utility functions.

Note. If your search engine API allows you to get some explicit feedback, you can also use the same method to continue tuning on the fly : after enough users have indicated what are the β€œright” responses to the queries, you can add it to your evaluation set and run your customization algorithm again.

+2
source

Source: https://habr.com/ru/post/906822/


All Articles