{ "task": { "id": "case_52", "name": "square_root", "summary": "Apply square root to each token/value independently.", "examples": [ { "input": [ "BOS", 2, 4, 2, 6, 4, 8, 6, 1, 3 ], "output": [ "BOS", 1.4142135623730951, 2.0, 1.4142135623730951, 2.449489742783178, 2.0, 2.8284271247461903, 2.449489742783178, 1.0, 1.7320508075688772 ] }, { "input": [ "BOS", 4, 1, 7, 5, 1, 4, 0, 9, 5 ], "output": [ "BOS", 2.0, 1.0, 2.6457513110645907, 2.23606797749979, 1.0, 2.0, 0.0, 3.0, 2.23606797749979 ] }, { "input": [ "BOS", 10, 10, 7, 4, 3, 7, 7, 2, 5 ], "output": [ "BOS", 3.1622776601683795, 3.1622776601683795, 2.6457513110645907, 2.0, 1.7320508075688772, 2.6457513110645907, 2.6457513110645907, 1.4142135623730951, 2.23606797749979 ] }, { "input": [ "BOS", 8, 0, 10, 10, 9, 2, 6, 3, 8 ], "output": [ "BOS", 2.8284271247461903, 0.0, 3.1622776601683795, 3.1622776601683795, 3.0, 1.4142135623730951, 2.449489742783178, 1.7320508075688772, 2.8284271247461903 ] }, { "input": [ "BOS", 6, 3, 10, 7, 4, 6, 9, 2, 6 ], "output": [ "BOS", 2.449489742783178, 1.7320508075688772, 3.1622776601683795, 2.6457513110645907, 2.0, 2.449489742783178, 3.0, 1.4142135623730951, 2.449489742783178 ] } ], "is_categorical": true }, "program": "return rasp.Map(lambda x: x ** 0.5, rasp.tokens).named(\"square_root\")", "components": [ { "id": "L0_MLP", "hook": "blocks.0.mlp.hook_post", "role": { "tag": "MAPPER", "note": "Applies a per-position numeric map by computing the square root for each element." }, "rasp_vars": [ "square_root" ], "labels": [ "square_root_1" ] } ] }