// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.ml.evaluateDataFrame({
  index: "student_performance_mathematics_reg",
  query: {
    term: {
      "ml.is_training": {
        value: true,
      },
    },
  },
  evaluation: {
    regression: {
      actual_field: "G3",
      predicted_field: "ml.G3_prediction",
      metrics: {
        r_squared: {},
        mse: {},
        msle: {},
        huber: {},
      },
    },
  },
});
console.log(response);
----
