---
title: "Trained features"
method: GET
path: "/api/{projectId}/training/anomaly/{learnId}/features/get-graph"
tags: ["Learn"]
---

# Trained features

`GET /api/{projectId}/training/anomaly/{learnId}/features/get-graph`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/training/anomaly/{learnId}/features/get-graph`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/:projectId/training/anomaly/:learnId/features/get-graph/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a sample of trained features, this extracts a number of samples and their features.

## Path parameters

- `projectId` integer, required
- `learnId` integer, required

## Query parameters

- `featureAx1` integer, required
- `featureAx2` integer, required

## Response `200`

OK

- AnomalyTrainedFeaturesResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `totalSampleCount` integer, required: Total number of windows in the data set
  - `data` object[], required
    - `X` object, required: Data by feature index for this window. Note that this data was scaled by the StandardScaler, use the anomaly metadata to unscale if needed.
    - `label` number: Label used for datapoint colorscale in anomaly explorer (for gmm only). Is currently the result of the scoring function.

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
