

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 Amazon AI 中使用 Scikit-Learn 的资源 SageMaker
<a name="sklearn"></a>

您可以使用自定义 Scikit-Learn 代码使用 SageMaker Amazon AI 来训练和部署模型。 SageMaker AI Python SDK scikit-Learn 估算器和模型以及 SageMaker AI 开源 Scikit-Learn 容器使编写 Scikit-Learn 脚本和在 AI 中运行脚本变得更加容易。 SageMaker 以下部分提供了参考资料，你可以用来学习如何将 Scikit-Learn 与 AI 配合使用。 SageMaker 

**要求**

Scikit-Learn 1.4 具有以下依赖关系。


| 依赖关系 | 最低版本 | 
| --- | --- | 
| Python | 3.10 | 
| NumPy | 2.1.0 | 
| SciPy | 1.15.3 | 
| joblib | 1.5.2 | 
| threadpoolctl | 3.6.0 | 

 SageMaker AI Scikit-Learn 容器支持以下 Scikit-Learn 版本。


| 支持的 Scikit-learn 版本 | 最低 Python 版本 | 
| --- | --- | 
| 1.4-2 | 3.10 | 
| 1.2-1 | 3.8 | 
| 1.0-1 | 3.7 | 
| 0.23-1 | 3.6 | 
| 0.20.0 | 2.7 或 3.4 | 

[有关编写 Scikit-Learn 训练脚本以及在 AI 中使用 Scikit-Learn 估算器和模型的一般信息，请参阅在 Python SDK 中使用 Scikit-L SageMaker earn。 SageMaker ](https://sagemaker.readthedocs.io/en/stable/using_sklearn.html)

## 您需要做什么？
<a name="sklearn-intent"></a>

**注意**  
运行 AI Scikit-Learn 示例笔记本需要 Matplotlib v2.2.3 或更高版本。 SageMaker 

我想在 AI 中使用 Scikit-Learn 进行数据处理、特征工程或模型评估。 SageMaker   
有关 Jupyter 笔记本的示例，请参阅 [https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker\_processing/scikit](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker_processing/scikit_learn_data_processing_and_model_evaluation)\_learn\_data\_processing\_and\_model\_alumation。  
有关训练和部署 Scikit-Learn 模型的博客文章，请参阅[亚马逊 A SageMaker I 增加](https://www.amazonaws.cn/blogs/machine-learning/amazon-sagemaker-adds-scikit-learn-support/)了 Scikit-Learn 支持。  
有关文档，请参阅 [ReadTheDocs](https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_processing.html#data-pre-processing-and-model-evaluation-with-scikit-learn)。

我想在 AI 中训练一个自定义 Scikit-Learn 模型。 SageMaker   
有关 Jupyter 笔记本的示例，请参阅 [https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/scikit](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/scikit_learn_iris)\_learn\_iris。  
有关文档，请参阅[使用 Scikit-learn 训练模型](https://sagemaker.readthedocs.io/en/stable/using_sklearn.html#train-a-model-with-sklearn)。

我有一个用 SageMaker 人工智能训练的 Scikit-Learn 模型，我想将其部署到托管端点。  
有关更多信息，请参阅[部署 Scikit-learn 模型](https://sagemaker.readthedocs.io/en/stable/using_sklearn.html#deploy-sklearn-models)。

我有一个在 AI 之外训练的 Scikit-Learn 模型，我想将其部署到 SageMaker AI 端点 SageMaker   
有关更多信息，请参阅[从模型数据部署端点](https://sagemaker.readthedocs.io/en/stable/using_sklearn.html#deploy-endpoints-from-model-data)。

我想查看 [Amaz SageMaker on Python SDK SDK](https://sagemaker.readthedocs.io/en/stable) scikit-Learn 类的 API 文档。  
有关更多信息，请参阅 [Scikit-learn 类](https://sagemaker.readthedocs.io/en/stable/sagemaker.sklearn.html)。

我想查看有关 SageMaker AI Scikit-Learn 容器的信息。  
有关更多信息，请参阅 [SageMaker Scikit-Learn 容器存储库](https://github.com/aws/sagemaker-scikit-learn-container)。 GitHub 