KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Advanced capstone 2.3

  • Advanced capstone 2.3

    Posted by timbs_1995 on May 2, 2024 at 11:01 am

    For 2.3 does the modified section of my function and the functional forms look correct and what am i missing. This is only the top half of the function

    .f1.checkSensor:{[raceTab;lapTab;mysensor]

    sensorDict:temptyrewindall!(“temp*”; “tyre*”; “wind*”; “*”);

    // Get avg benchmark values from historical lap data // THESE

    /benchmark:select benchmarkValue:avg sensorValue by sensorId from lapTab;

    benchmark:?[lapTab;();enlist[sensorId]!enlist[sensorId];(benchmarkValue!(avg;sensorValue))]

    /?[t;whereClause;byClause;returnClause] // LINES

    // Calculate avg value as well as standard deviation from new sensor data (from raceTab) // TO BE

    /chk:select avgValue:avg sensorValue, // REPLACED

    / stdDevValue:dev sensorValue // IN .f1.checkSensorFunc

    / by sensorId from raceTab; // INTO THEIR FUNCTIONAL FORM

    chk:?[raceTab;();enlist[sensorId]!enlist[sensorId];(avgValuestdDevValue!((avg;sensorValue);(dev;sensorValue)))]

    megan_mcp replied 1 month, 1 week ago 2 Members · 3 Replies
  • 3 Replies
  • megan_mcp

    Administrator
    May 2, 2024 at 11:48 am

    Hi @timbs_1995

    In exercise 2.3, it asks you to define a dictionary using the logic from the table above (screenshot below). This is missing from your function and is needed to be able to complete the functional code for benchmark and chk.

    Can I ask that you include this and let me know the outcome?

    Thanks,

    Megan

    • This reply was modified 1 month, 1 week ago by  megan_mcp.
  • timbs_1995

    Member
    May 2, 2024 at 1:19 pm

    what do you mean by logic from the table? can you give an example?

    • megan_mcp

      Administrator
      May 2, 2024 at 1:33 pm

      Hi @timbs_1995

      The table provided above is stating that there are 4 possibilities for the “mysensor” parameter: temp, tyre, wind or all.

      If mysensor = temp then what should be returned are all the sensorId’s that include the word temp at the start. So tempBackLeft, tempBackRight, tempFrontLeft, tempFrontRight. The same applies for the rest.

      If mysensor = all then all the sensorId’s must be returned.

      You must create a dictionary that represents this logic.

      Let me know if you have any further questions.

      Thanks,

      Megan

Log in to reply.