Skip to content

Commit f256715

Browse files
authored
Update README.md (Azure#32486)
1 parent 6faeac5 commit f256715

File tree

1 file changed

+89
-6
lines changed
  • sdk/anomalydetector/azure-ai-anomalydetector

1 file changed

+89
-6
lines changed

sdk/anomalydetector/azure-ai-anomalydetector/README.md

Lines changed: 89 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Azure Anomaly Detector client library for Java
22

3-
Microsoft Azure Cognitive Services Anomaly Detector API enables you to monitor and detect abnormalities in your time series data with machine learning.
3+
[Anomaly Detector](https://learn.microsoft.com/azure/cognitive-services/Anomaly-Detector/overview) is an AI service with a set of APIs, which enables you to monitor and detect anomalies in your time series data with little machine learning (ML) knowledge, either batch validation or real-time inference.
44

55
[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation] | [Samples][samples_readme]
66

@@ -17,17 +17,19 @@ For more information about creating the resource or how to get the location and
1717
### Include the Package
1818

1919
[//]: # ({x-version-update-start;com.azure:azure-ai-anomalydetector;current})
20+
2021
```xml
2122
<dependency>
2223
<groupId>com.azure</groupId>
2324
<artifactId>azure-ai-anomalydetector</artifactId>
2425
<version>3.0.0-beta.5</version>
2526
</dependency>
2627
```
27-
[//]: # ({x-version-update-end})
2828

29+
[//]: # ({x-version-update-end})
2930

3031
### Authenticate the client
32+
3133
In order to interact with the Anomaly Detector service, you'll need to create an instance of the [`AnomalyDetectorClient`][anomaly_detector_client_class] class. You will need an **endpoint** and an **API key** to instantiate a client object.
3234

3335
#### Get API Key
@@ -47,6 +49,7 @@ You can authenticate with Azure Active Directory using the [Azure Identity libra
4749
To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, or other credential providers provided with the Azure SDK, please include the `azure-identity` package:
4850

4951
[//]: # ({x-version-update-start;com.azure:azure-identity;dependency})
52+
5053
```xml
5154
<dependency>
5255
<groupId>com.azure</groupId>
@@ -60,6 +63,7 @@ You will also need to [register a new AAD application][register_aad_app] and [gr
6063
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET.
6164

6265
##### Sync client
66+
6367
```java readme-sample-createAnomalyDetectorClient
6468
String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT");
6569
String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY");
@@ -73,8 +77,80 @@ AnomalyDetectorClient anomalyDetectorClient =
7377

7478
## Key concepts
7579

80+
With the Anomaly Detector, you can either detect anomalies in one variable using **Univariate Anomaly Detection**, or detect anomalies in multiple variables with **Multivariate Anomaly Detection**.
81+
82+
|Feature |Description |
83+
|---------|---------|
84+
|Univariate Anomaly Detection | Detect anomalies in one variable, like revenue, cost, etc. The model was selected automatically based on your data pattern. |
85+
|Multivariate Anomaly Detection| Detect anomalies in multiple variables with correlations, which are usually gathered from equipment or other complex system. The underlying model used is Graph attention network.|
86+
87+
### Univariate Anomaly Detection
88+
89+
The Univariate Anomaly Detection API enables you to monitor and detect abnormalities in your time series data without having to know machine learning. The algorithms adapt by automatically identifying and applying the best-fitting models to your data, regardless of industry, scenario, or data volume. Using your time series data, the API determines boundaries for anomaly detection, expected values, and which data points are anomalies.
90+
91+
Using the Anomaly Detector doesn't require any prior experience in machine learning, and the REST API enables you to easily integrate the service into your applications and processes.
92+
93+
With the Univariate Anomaly Detection, you can automatically detect anomalies throughout your time series data, or as they occur in real-time.
94+
95+
|Feature |Description |
96+
|---------|---------|
97+
| Streaming detection| Detect anomalies in your streaming data by using previously seen data points to determine if your latest one is an anomaly. This operation generates a model using the data points you send, and determines if the target point is an anomaly. By calling the API with each new data point you generate, you can monitor your data as it's created. |
98+
| Batch detection | Use your time series to detect any anomalies that might exist throughout your data. This operation generates a model using your entire time series data, with each point analyzed with the same model. |
99+
| Change points detection | Use your time series to detect any trend change points that exist in your data. This operation generates a model using your entire time series data, with each point analyzed with the same model. |
100+
101+
### Multivariate Anomaly Detection
102+
103+
The **Multivariate Anomaly Detection** APIs further enable developers by easily integrating advanced AI for detecting anomalies from groups of metrics, without the need for machine learning knowledge or labeled data. Dependencies and inter-correlations between up to 300 different signals are now automatically counted as key factors. This new capability helps you to proactively protect your complex systems such as software applications, servers, factory machines, spacecraft, or even your business, from failures.
104+
105+
With the Multivariate Anomaly Detection, you can automatically detect anomalies throughout your time series data, or as they occur in real-time. There are three processes to use Multivariate Anomaly Detection.
106+
107+
- **Training**: Use Train Model API to create and train a model, then use Get Model Status API to get the status and model metadata.
108+
- **Inference**:
109+
- Use Async Inference API to trigger an asynchronous inference process and use Get Inference results API to get detection results on a batch of data.
110+
- You could also use Sync Inference API to trigger a detection on one timestamp every time.
111+
- **Other operations**: List Model API and Delete Model API are supported in Multivariate Anomaly Detection model for model management.
112+
113+
### Thread safety
114+
115+
We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
116+
76117
## Examples
77-
More examples can be found in [samples][samples_code].
118+
119+
The following section provides several code snippets covering some of the most common Anomaly Detector service tasks, including:
120+
121+
- [Univariate Anomaly Detection - Batch detection](#batch-detection)
122+
- [Univariate Anomaly Detection - Streaming detection](#streaming-detection)
123+
- [Univariate Anomaly Detection - Detect change points](#detect-change-points)
124+
- [Multivariate Anomaly Detection](#multivariate-anomaly-detection-sample)
125+
126+
### Create client
127+
128+
```java readme-sample-createAnomalyDetectorClient
129+
String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT");
130+
String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY");
131+
132+
AnomalyDetectorClient anomalyDetectorClient =
133+
new AnomalyDetectorClientBuilder()
134+
.credential(new AzureKeyCredential(key))
135+
.endpoint(endpoint)
136+
.buildClient();
137+
```
138+
139+
### Batch detection
140+
141+
For batch detection in univariate anomaly detection, please go to this sample for better understanding the workflow: [DetectAnomaliesEntireSeries.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java)
142+
143+
### Streaming detection
144+
145+
For streaming/last detection in univariate anomaly detection, please go to this sample for better understanding the workflow: [DetectAnomaliesLastPoint.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java)
146+
147+
### Detect change points
148+
149+
For change points detection in univariate anomaly detection, please go to this sample for better understanding the workflow: [DetectChangePoints.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java)
150+
151+
### Multivariate Anomaly Detection Sample
152+
153+
To see how to use Anomaly Detector library to conduct Multivariate Anomaly Detection, see this [MultivariateSample.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java).
78154

79155
## Troubleshooting
80156

@@ -86,15 +162,23 @@ locate the root issue. View the [logging][logging] wiki for guidance about enabl
86162

87163
## Next steps
88164

165+
These code samples show common scenario operations with the Azure Anomaly Detector library. More samples can be found under the [samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector) directory.
166+
167+
For more extensive documentation on Azure Anomaly Detector, see the [Anomaly Detector documentation](https://learn.microsoft.com/azure/cognitive-services/anomaly-detector/overview) on docs.microsoft.com.
168+
89169
## Contributing
90170

91-
This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.
171+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla].
92172

93173
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
94174

95-
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
175+
This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
96176

97177
<!-- LINKS -->
178+
[cla]: https://cla.microsoft.com
179+
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
180+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
181+
[coc_contact]: mailto:opencode@microsoft.com
98182
[samples]: src/samples/java/com/azure/ai/anomalydetector
99183
[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src
100184
[samples_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/
@@ -114,5 +198,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
114198
[package]: https://mvnrepository.com/artifact/com.azure/azure-ai-anomalydetector
115199
[samples_readme]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md
116200
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK
117-
118201
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fanomalydetector%2Fazure-ai-anomalydetector%2FREADME.png)

0 commit comments

Comments
 (0)