Retrieve without the worked example: Candy popular is derived from winpercent.
Select sugarpercent and pricepercent only. Use the new retrieval population shown here.
Retrieve earlier concepts before combining them.
This practice: Retrieve earlier concepts before combining them. Next: Retrieval 2 · Honest evaluation retrieval.
Given data · candy_class_REVIEW
68 observations. One candy product in the survey. The dataframe df is supplied afresh for each Run.
Download source CSV · Source and original dictionary
| competitorname | chocolate | fruity | caramel | peanutyalmondy | nougat | crispedricewafer | hard | bar | pluribus | sugarpercent | pricepercent | winpercent | popular |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Skittles wildberry | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.941 | 0.22 | 55.1037 | 50% or above |
| Hershey's Special Dark | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0.43 | 0.918 | 59.2361 | 50% or above |
| Dum Dums | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0.732 | 0.034 | 39.4606 | below 50% |
| Sugar Babies | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0.965 | 0.767 | 33.4376 | below 50% |
| Rolo | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0.86 | 0.86 | 65.7163 | 50% or above |
| Haribo Twin Snakes | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.465 | 0.465 | 42.1788 | below 50% |
| Pixie Sticks | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.093 | 0.023 | 37.7223 | below 50% |
| Sour Patch Kids | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.069 | 0.116 | 59.864 | 50% or above |
Column meanings and units
sugarpercent: sugar percentile. pricepercent: price percentile. winpercent: percentage of survey matchups won. Ingredient, bar and multipack fields are 0/1 flags.
Percentile ranks are neither physical sugar percentages nor currency prices. Ratios of percentiles do not measure economic value. Chocolate and fruit flags can overlap; non-chocolate is not synonymous with fruit. The ML class target is defined by winpercent ≥ 50.
| Column | Stored type |
|---|---|
| competitorname | str |
| chocolate | int64 |
| fruity | int64 |
| caramel | int64 |
| peanutyalmondy | int64 |
| nougat | int64 |
| crispedricewafer | int64 |
| hard | int64 |
| bar | int64 |
| pluribus | int64 |
| sugarpercent | float64 |
| pricepercent | float64 |
| winpercent | float64 |
| popular | str |
Supporting concepts: Could we know this at prediction time? →
Remember the idea
Use the inputs and evidence to recover the method. Hints and explained solutions remain collapsed; exact phrasing is not graded.
Hint 1 — Think
A renamed target source can still reveal the answer.
Hint 2 — Tools
Feature availability and target-derived leakage.
Hint 3 — Approach
Identify the source used to define popular and exclude it from the permitted measurement table.
Explained solution
answer=df[['sugarpercent','pricepercent']]
The two permitted measurements preserve the intended prediction task; winpercent would reconstruct the target directly.
Helpful prior knowledge: Could we know this at prediction time? These links are guidance, not locks.
Sources and API context
Examples run with this Playground’s scikit-learn 1.4.2 / Pyodide 0.26.4 runtime.