# Metamodels from Data models

**URL:** https://persalys.discourse.group/t/metamodels-from-data-models/105
**Category:** Persalys usage
**Created:** [November 25, 2022, 11:19am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105 "2022-11-25T11:19:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Flore](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Flore](https://persalys.discourse.group/u/Flore)
#### Post date: [November 25, 2022, 11:19am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/1 "2022-11-25T11:19:22Z")

</div>

Hello, Bonjour

I just tried to build a meta-model based on a DATA model (import a CSV file) and Q2 factor is very bad  
this DATA model comes from another Persalys DOE performed for an Ansys coupling model, I export DOE table in order to delete 1 point (from a DOE of 850 points) because this particular point is the only one that is far away from mean value (due to perhaps surely an ansys computation error…)  
With the full DOE inside the persalys coupling model project, I got rather good Q2 values  
So I thought that delete this “anomalous” point will lead me to better Q2 values for my metamodels… But it’s just the opposite !

Why ? Because probabilistic model is not provided ?

A way to perform better metamodels from such a data model ?

Thanks a lot in advance for your answers!

Best regards  
Flore

---

<div class="post-metadata">

### Author: ![jschueller](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/jschueller/32/6_2.png) [@jschueller](https://persalys.discourse.group/u/jschueller)
#### Post date: [December 7, 2022, 8:29am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/2 "2022-12-07T08:29:22Z")

</div>

We did a fix for the Q2 recently, are you using the 13.1 version ?

---

<div class="post-metadata">

### Author: ![Flore](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Flore](https://persalys.discourse.group/u/Flore)
#### Post date: [December 7, 2022, 8:46am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/3 "2022-12-07T08:46:59Z")

</div>

Hi Julien!  
I think I tried with version 12  
So I will try with version 13 and we will see  
Flore

---

<div class="post-metadata">

### Author: ![Flore](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Flore](https://persalys.discourse.group/u/Flore)
#### Post date: [December 7, 2022, 9:23am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/4 "2022-12-07T09:23:54Z")

</div>

I tried with version 13.1  
I have same behaviour  
I just noticed that an error message appears  
“La distribution des données n’a pas de copule indépendante, les résultats pourraient être faux.”  
Is there any way to correct this ?

 ![erreur_persalys_metamodel_forDataModel](https://global.discourse-cdn.com/free1/uploads/persalys/original/1X/43e38c8fd5ef83cb12664bc37fd1f9707612023f.png)

Remark : Q2 values are a little bit different compared with case performed with version 12, but Q2 values are always bad

---

<div class="post-metadata">

### Author: ![dumas](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/dumas/32/5_2.png) [@dumas](https://persalys.discourse.group/u/dumas)
#### Post date: [December 8, 2022, 7:45am UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/5 "2022-12-08T07:45:51Z")

</div>

Hello,  
I think you found the good reason of this bad Q2. In the data model, the distributions are inferred from the data to build the polynomial chaos. It might not be as good as the distribution you provide in the real model.

Unfortunately, within the data model, it is not possible to change this. However I think you can use this trick:

- export the initial input DOE with the 850 points in a csv file
- remove the bad point in this csv file
- in the physical model create a new DOE but with an imported DOE and import the csv with the 849 points
- run the analysis: the cache mechanism included in the function should allows you to get the result instantaneously
- build the metamodel on this doe

We have in our dev plan a general topic about the use of DOE in Persalys and the option of removing points (or perform a sub selection) may be something we could add in the future.

I hope the manipulation I proposed will work.

Regards,  
Antoine

---

<div class="post-metadata">

### Author: ![Flore](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Flore](https://persalys.discourse.group/u/Flore)
#### Post date: [December 8, 2022, 4:42pm UTC](https://persalys.discourse.group/t/metamodels-from-data-models/105/6 "2022-12-08T16:42:01Z")

</div>

Thanks Antoine. I tried and it works !
