Recommendations and Ranking
Match topic directions
BOTIE
Examples, experiments and workspace controls
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.
Context for this challenge
Take their dot product and divide by the product of their lengths.
Botie has a reader topic vector and a guide description vector. Topic direction should determine their match independently of vector length.
Calculate their dot product and divide by the product of their lengths.
Examples and results
- Reader topic vector
- 01
- 10
- Guide topic vector
- 03
- 10
- Required result
1
- Reader topic vector
- 02
- 11
- Guide topic vector
- 01
- 12
- Required result
0.8
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
Requires nonzero vectors with matching feature meanings. A score is not a calibrated probability. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
A longer feature vector points the same way
This check uses the pieces from “Compare reader and guide topic directions”.
BOTIE
- Reader topic vector
- 01
- 12
- 22
- Guide topic vector
- 03
- 16
- 26
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.
Which assumption about coordinate meanings is needed before these two vectors can be compared?
A cosine score needs shared feature meanings and is not a calibrated probability of interest.
Requires nonzero vectors with matching feature meanings. A score is not a calibrated probability.
Work through the Python challenges →