Recommendations and Ranking

Predict a reader’s rating

BOTIE

Subtract neighbour means, compute a weighted average of deviations, then add the target reader’s mean.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.

Try your own inputs

Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Subtract neighbour means, compute a weighted average of deviations, then add the target reader’s mean.

Readers use rating scales differently. Botie must transfer neighbours' deviations from their usual ratings rather than copying raw scores.

Subtract each neighbour mean, combine deviations with positive similarity weights, divide by total weight, and add the target reader's mean.

Examples and results
Neighbour ratings
  1. 05
  2. 13
Neighbour means
  1. 03
  2. 14
Positive similarity weights
  1. 00.75
  2. 10.25
Target reader mean
3
Required result
4.25
Neighbour ratings
  1. 04
Neighbour means
  1. 03
Positive similarity weights
  1. 00.5
Target reader mean
3
Required result
4
Try a fresh construction

This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.

Stuck? Inspect a worked construction

The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.

Assumptions and test precision

Weights must be non-negative with positive total. Missing neighbours are excluded before this calculation. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

A generous reviewer rated below their usual level

This check uses the pieces from “Transfer centred neighbour preferences”.

BOTIE

Botie has two neighbours' ratings for a guide, each neighbour's usual mean rating, and their positive similarity weights. Predict the target reader's rating by adding the weighted mean of the neighbours' deviations to the target mean.
Neighbour ratings
  1. 03
  2. 14
Neighbour means
  1. 04.5
  2. 13.5
Positive similarity weights
  1. 00.6
  2. 10.4
Target reader mean
3.2

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Why must the divisor use the sum of similarity weights rather than the number of neighbours?

A weighted deviation needs a matching weighted normalisation before it is transferred to another baseline.

Weights must be non-negative with positive total. Missing neighbours are excluded before this calculation.

Work through the Python challenges →
Continue the courseCompressing a Sparse Table of Preferences →