All problems

Spotting Obvious Target Leakage

mediumPythonModel Validation

A model at Halewood Analytics has come back with a validation score nobody believes. The usual cause is leakage: a column that quietly carries the answer, so the model is reading the result rather than predicting it. A full investigation is slow, and the cheapest first pass is just to read the column names — a column whose name contains the name of the thing being predicted is worth a hard look before anything else is tried.

Task: Print the feature columns whose names implicate the target.

Input

Three lines. The first holds the name of the target being predicted. The second holds n, the number of feature columns. The third holds the n feature names, separated by single spaces.

Output

One line. Print the suspect names in alphabetical order, separated by commas with no spaces around them. A name is suspect when the target's name appears anywhere inside it, at the start, the end or the middle, and the check ignores upper and lower case on both sides. A feature named exactly the target is the most blatant case of all and is still listed. Print none if nothing is suspect.

Example:

Input:
price
4
sqft price_per_sqft bedrooms final_price

Output:
final_price,price_per_sqft

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…