Natural Language Processing
Compress a table of word use
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
Return the first supplied singular direction as a one-row projection matrix.
A document may concern a query's subject without using exactly the same words. We want to compare documents through broader patterns of term use. The singular directions are supplied here; we will retain the strongest one and project the document table into that smaller representation.
Inspect the component calculation
Take a range(
List: Swap rows and columns(
Matrix: Left singular vectors as columns
)
First index: 0
Stop before: 1
)Examples and results
- Left singular vectors as columns
1 0 0 1 - Required result
1 0
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
The SVD is supplied. This challenge builds truncation and projection; it does not find singular directions or train a language model. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
The strongest term direction uses both coordinates
This check uses the pieces from “Project documents onto the strongest supplied direction”.
BOTIE
- Left singular vectors as columns
0.6 -0.8 0.8 0.6 - Term-document matrix
3 6 0 4 8 0
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 stage would be needed before this construction if the singular directions were not supplied?
Projection uses a fitted representation; it does not calculate the SVD or guarantee that a direction names a human concept.
The SVD is supplied. This challenge builds truncation and projection; it does not find singular directions or train a language model.
Work through the Python challenges →