Skip to content

Commit 3c0a962

Browse files
authored
Merge pull request #227103 from ruixinxu/fixcogsvcdoc
Fixcogsvcdoc
2 parents 4132853 + 0ff06db commit 3c0a962

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

articles/synapse-analytics/machine-learning/tutorial-cognitive-services-anomaly.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,33 @@ Sign in to the [Azure portal](https://portal.azure.com/).
3737

3838
You need a Spark table for this tutorial.
3939

40-
1. Download the following notebook file that contains code to generate a Spark table: [prepare_anomaly_detector_data.ipynb](https://go.microsoft.com/fwlink/?linkid=2149577).
41-
42-
1. Upload the file to your Azure Synapse workspace.
43-
44-
![Screenshot that shows selections for uploading a notebook.](media/tutorial-cognitive-services/tutorial-cognitive-services-anomaly-00a.png)
45-
46-
1. Open the notebook file and select **Run All** to run all cells.
47-
48-
![Screenshot that shows selections for creating a Spark table.](media/tutorial-cognitive-services/tutorial-cognitive-services-anomaly-00b.png)
49-
50-
1. A Spark table named **anomaly_detector_testing_data** should now appear in the default Spark database.
40+
Create a PySpark notebook and run following code.
41+
42+
```python
43+
from pyspark.sql.functions import lit
44+
45+
df = spark.createDataFrame([
46+
("1972-01-01T00:00:00Z", 826.0),
47+
("1972-02-01T00:00:00Z", 799.0),
48+
("1972-03-01T00:00:00Z", 890.0),
49+
("1972-04-01T00:00:00Z", 900.0),
50+
("1972-05-01T00:00:00Z", 766.0),
51+
("1972-06-01T00:00:00Z", 805.0),
52+
("1972-07-01T00:00:00Z", 821.0),
53+
("1972-08-01T00:00:00Z", 20000.0),
54+
("1972-09-01T00:00:00Z", 883.0),
55+
("1972-10-01T00:00:00Z", 898.0),
56+
("1972-11-01T00:00:00Z", 957.0),
57+
("1972-12-01T00:00:00Z", 924.0),
58+
("1973-01-01T00:00:00Z", 881.0),
59+
("1973-02-01T00:00:00Z", 837.0),
60+
("1973-03-01T00:00:00Z", 9000.0)
61+
], ["timestamp", "value"]).withColumn("group", lit("series1"))
62+
63+
df.write.mode("overwrite").saveAsTable("anomaly_detector_testing_data")
64+
65+
```
66+
A Spark table named **anomaly_detector_testing_data** should now appear in the default Spark database.
5167

5268
## Open the Cognitive Services wizard
5369

@@ -89,4 +105,7 @@ You can now run all cells to perform anomaly detection. Select **Run All**. [Lea
89105

90106
- [Tutorial: Sentiment analysis with Azure Cognitive Services](tutorial-cognitive-services-sentiment.md)
91107
- [Tutorial: Machine learning model scoring in Azure Synapse dedicated SQL pools](tutorial-sql-pool-model-scoring-wizard.md)
108+
- [Tutorial: Use Multivariate Anomaly Detector in Azure Synapse Analytics](../../cognitive-services/Anomaly-Detector/tutorials/multivariate-anomaly-detection-synapse.md)
109+
- [SynapseML anomaly detection](https://microsoft.github.io/SynapseML/docs/documentation/transformers/transformers_cognitive/#anomaly-detection)
92110
- [Machine Learning capabilities in Azure Synapse Analytics](what-is-machine-learning.md)
111+

articles/synapse-analytics/machine-learning/tutorial-cognitive-services-sentiment.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ The sentiments are returned as **positive**, **negative**, **neutral**, or **mix
9696
## Next steps
9797
- [Tutorial: Anomaly detection with Azure Cognitive Services](tutorial-cognitive-services-anomaly.md)
9898
- [Tutorial: Machine learning model scoring in Azure Synapse dedicated SQL pools](tutorial-sql-pool-model-scoring-wizard.md)
99+
- [SynapseML text sentiment analysis](https://microsoft.github.io/SynapseML/docs/documentation/transformers/transformers_cognitive/#textsentiment)
99100
- [Machine Learning capabilities in Azure Synapse Analytics](what-is-machine-learning.md)

articles/synapse-analytics/machine-learning/tutorial-computer-vision-use-mmlspark.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,4 @@ To ensure the Spark instance is shut down, end any connected sessions(notebooks)
182182

183183
* [Check out Synapse sample notebooks](https://github.com/Azure-Samples/Synapse/tree/main/MachineLearning)
184184
* [SynapseML GitHub Repo](https://github.com/Azure/mmlspark)
185+
* [SynapseML documentation](https://microsoft.github.io/SynapseML/docs/documentation/transformers/transformers_cognitive/)

0 commit comments

Comments
 (0)