Monday, 11.08.2025, 01:01
Welcome Guest | RSS
Site menu
Section categories
Cognitive learning [70]
cognitive learning
Log In
Search
Calendar
Entries archive

Cognitive Learning


09:59
Learning examples of cognitive learning theory in the classroom to Rank Explained (with Code) Machine Learning Explained

In supervised machine learning, the most common tasks are classification and regression. Though these two tasks will get you fairly far, sometimes your problem cannot be formulated in this way.Examples of cognitive learning theory in the classroom for example, suppose you wanted to build a newsfeed or a recommendation system. In these cases, you don’t just want to know the probability of a user clicking an article or buying an item; you want to be able to prioritize and order the articles/items to maximize your chances of getting a click or purchase.Examples of cognitive learning theory in the classroom this kind of scenario is actually more common than you think: often we use machine learning to augment human decisions, and ranking things to focus human attention on the most important things is an effective way to do this.Examples of cognitive learning theory in the classroom

In this post, I will go over learning to rank, a technique for learning – you guessed it – effective rankings. Although classification and regression can be used as proxies for ranking, I’ll show how directly learning the ranking is another approach that has a lot of intuitive appeal, making it a good tool to have in your machine learning toolbox.Examples of cognitive learning theory in the classroom I will also go over a code example of how to apply learning to rank with the lightgbm library.

Let’s take the example of ranking items for the newsfeed of a user.Examples of cognitive learning theory in the classroom if all we cared about was clicks, then we could just train a model to predict whether a user will click on each item and rank them according to the click probability however, we might care about more than just clicks; for instance, if the user clicks on an article but does not finish reading it, it might not be that interesting to them and we won’t want to recommend similar articles to them in the future.Examples of cognitive learning theory in the classroom

Specifically, we formulate the problem like this: we have a model take two items as input and predict which one will rank over the other. A simple way to do this is to train a model to assign a “score” to each item so that higher-ranked items have higher scores and lower-ranked items have lower scores.Examples of cognitive learning theory in the classroom this model can be anything from a neural network to a gradient boosted decision tree. The only property we would like the model to have is for it to be differentiable so we can use gradient descent to optimize it.Examples of cognitive learning theory in the classroom

Now, we have to take this idea and formulate it so that we can train the model. To do this, we want to define a loss function. If you’ve taken a machine learning course in the past, you’ll know that loss functions are often defined using the maximum likelihood principle.Examples of cognitive learning theory in the classroom your model learns a probability distribution over possible outputs (the ranking) and you maximize the likelihood of the data that you’ve observed (i.E.Examples of cognitive learning theory in the classroom the training data).

This equation exposes the essence of learning to rank so it’s worth going into in more detail. Since , taking a gradient descent step using the above gradient is taking a gradient ascent step for and a gradient descent step for weighted by $latex || lambda_{ij} ||.Examples of cognitive learning theory in the classroom this gives us our first, pairwise interpretation of learning to rank: we are moving the weights to increase the score of the item with the higher rank and decrease the score of the item with the lower rank, with a certain weighting factor.Examples of cognitive learning theory in the classroom

This equation gives us an item-wise interpretation of learning to rank. For each item, there are two “ forces” at play. For each item that ranks lower, there is a force pushing the score up and for each item that ranks higher there is a force pushing the score down.Examples of cognitive learning theory in the classroom the “force” that each item exerts is proportionate to the difference in scores. This means that higher ranking items will receive stronger pushes upwards because there are many items that rank lower.Examples of cognitive learning theory in the classroom

The above approach was proposed in ranknet and is pretty good in many situations. There is one major pitfall to the ranknet approach though: the loss is agnostic to the actual ranking of the item.Examples of cognitive learning theory in the classroom in other words, the loss is the same for any pair of items regardless of whether and are ranked in 5th and 6th place or if they are in 1st and 200th place.Examples of cognitive learning theory in the classroom

Let’s see what this implies. Like we discussed earlier, the score for each item is pushed upwards by each item that ranks lower and pushed downwards by each item that ranks higher.Examples of cognitive learning theory in the classroom the strength of the push is determined only by the current difference in scores. So it doesn’t matter if the items that rank below are 1, 2, or 500 ranks below: they will all have the same influence on the score of the current item as long as they have the same score.Examples of cognitive learning theory in the classroom this means that ranknet effectively only cares about the total number of pairwise-rankings it gets wrong. Swapping 1st and 10th is essentially equivalent to swapping 101st and 110th place because the only thing that matters is that the rankings change by 10 places (as long as the scores are the same of course).Examples of cognitive learning theory in the classroom

This can be particularly problematic if we are mostly interested in the top ranking items (which is the case for most applications). Thankfully there is a rather simple solution: we weight the gradient for the pairwise loss by a factor that incorporates the importance of getting the pairwise ranking correct.Examples of cognitive learning theory in the classroom in other words, instead of using

Here, is the number of items we actually care about (e.G. We might only care about the top 100 items since we won’t be showing any lower-ranking items).Examples of cognitive learning theory in the classroom is the relevance score of each item, where the higher an item is ranked, the higher. Be careful not to confuse what we are summing over: we are summing over the ranking predicted by our model and not the actual ranking.Examples of cognitive learning theory in the classroom

This makes it easier to compare the quality of ranking across datasets since the DCG could be arbitrarily high depending on the importance scores put on each item.Examples of cognitive learning theory in the classroom using NDCG, we can use the change in NDCG that would occur if we were to rank and in the opposite order as . Intuitively, this means that items ranked highly by the model will exert a stronger force, which is exactly what we want.Examples of cognitive learning theory in the classroom

Since learning to rank was originally an information retrieval problem, the data is organized by “query”. Each item was returned in response to some user query with some being labeled as relevant (e.G.Examples of cognitive learning theory in the classroom because the user clicked on it). Items in different queries are not compared. We pass this grouping information to lightgbm as an array, where each element in the array indicates how many items are in each group (caution: we’re not passing the query id of each item or some group indicator directly!).Examples of cognitive learning theory in the classroom for instance, if the grouping array was

Category: Cognitive learning | Views: 79 | Added by: poiskspider | Rating: 0.0/0
Total comments: 0
avatar