# 2.6 定位数据不匹配（Addressing data mismatch）

解决train set与dev/test set样本分布不一致的两条建议：

[![](https://github.com/fengdu78/deeplearning_ai_books/raw/master/images/019a324b983247e11da7ad373426b756.png)](https://github.com/fengdu78/deeplearning_ai_books/blob/master/images/019a324b983247e11da7ad373426b756.png)

为了让训练数据更接近开发集，可以人工合成数据（**artificial data synthesis**）。例如说话人识别问题，实际应用场合（dev/test set）是包含背景噪声的，而训练样本train set很可能没有背景噪声。为了让train set与dev/test set分布一致，可以在train set上人工添加背景噪声，合成类似实际场景的声音。这样会让模型训练的效果更准确。但是不能给每段语音都增加同一段背景噪声，会出现对背景噪音过拟合，这就是人工数据合成需要注意的地方

[![](https://github.com/fengdu78/deeplearning_ai_books/raw/master/images/e8e1e932abb7a0bb44cab6403657321d.png)](https://github.com/fengdu78/deeplearning_ai_books/blob/master/images/e8e1e932abb7a0bb44cab6403657321d.png)

研发无人驾驶汽车，用计算机合成图像

[![](https://github.com/fengdu78/deeplearning_ai_books/raw/master/images/cfd503f877d21d96821a81293ab0fdeb.png)](https://github.com/fengdu78/deeplearning_ai_books/blob/master/images/cfd503f877d21d96821a81293ab0fdeb.png)

如果只合成这些车中很小的子集，学习算法可能会对合成的这一个小子集过拟合

![](/files/-Le0cnnW3HjLTFU0tVfT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://baozoulin.gitbook.io/neural-networks-and-deep-learning/di-san-men-ke-jie-gou-hua-ji-qi-xue-xi-xiang-mu-structuring-machine-learning-projects/di-san-men-ke-structuring-machine-learning-projects/ml-strategy/26-ding-wei-shu-ju-bu-pi-pei-ff08-addressing-data-mismatch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
