Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ejercicios-clase-08-datos
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sasiri Juliana Vargas Urbano
ejercicios-clase-08-datos
Commits
c20c8057
Commit
c20c8057
authored
4 years ago
by
Sasiri Juliana Vargas Urbano
Browse files
Options
Downloads
Patches
Plain Diff
Cuaderno
parent
5c1e5e39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reporte/CoNGA.md
+162
-2
162 additions, 2 deletions
reporte/CoNGA.md
with
162 additions
and
2 deletions
reporte/CoNGA.md
+
162
−
2
View file @
c20c8057
...
@@ -6,6 +6,8 @@ import numpy as np
...
@@ -6,6 +6,8 @@ import numpy as np
```
python
```
python
#Para la lectura de archivos
Lista_A
=
[]
Lista_A
=
[]
Lista_B
=
[]
Lista_B
=
[]
...
@@ -358,6 +360,8 @@ Lista_A[0]
...
@@ -358,6 +360,8 @@ Lista_A[0]
```
python
```
python
#Perfiles de densidad para cada semilla de random
densidad_ListaA
=
[]
densidad_ListaA
=
[]
densidad_ListaB
=
[]
densidad_ListaB
=
[]
...
@@ -395,7 +399,7 @@ grafico(0,densidad_ListaA, densidad_ListaB)
...
@@ -395,7 +399,7 @@ grafico(0,densidad_ListaA, densidad_ListaB)


...
@@ -406,6 +410,162 @@ grafico(1,densidad_ListaA, densidad_ListaB)
...
@@ -406,6 +410,162 @@ grafico(1,densidad_ListaA, densidad_ListaB)


```
python
#Densidad de A en Data Frame
densidad_DF_A
=
pd
.
DataFrame
(
densidad_ListaA
)
#Densidad de B en Data Frame
densidad_DF_B
=
pd
.
DataFrame
(
densidad_ListaB
)
```
0 1.00000
1 0.99758
2 0.99488
3 1.00000
4 1.00000
5 0.99996
6 0.99296
7 0.99978
8 1.00000
9 1.00000
Name: 100, dtype: float64
```
python
#Promedio de la densidad de todas las semillas
prom_densidad_ListaA
=
list
(
densidad_DF_A
.
mean
())
prom_densidad_ListaB
=
list
(
densidad_DF_B
.
mean
())
#Desviacion estandar
desviacion_A
=
list
(
densidad_DF_A
.
std
(
ddof
=
0
))
desviacion_B
=
list
(
densidad_DF_B
.
std
(
ddof
=
0
))
fig
=
plt
.
figure
()
plt
.
plot
(
X
,
prom_densidad_ListaA
,
c
=
'
b
'
)
plt
.
plot
(
X
,
prom_densidad_ListaB
,
c
=
'
r
'
)
#Graficas de barras de error(desviación estándar)
plt
.
errorbar
(
X
,
prom_densidad_ListaA
,
yerr
=
desviacion_A
,
linestyle
=
"
None
"
)
plt
.
errorbar
(
X
,
prom_densidad_ListaB
,
yerr
=
desviacion_B
,
linestyle
=
"
None
"
)
plt
.
xticks
(
np
.
arange
(
X
[
0
],
X
[
-
1
]
+
10
,
step
=
10
))
#plt.text(min(X),0.05,'semilla '+str(semilla),fontsize=10)
plt
.
legend
([
'
Particulas A
'
,
'
Particulas B
'
],
loc
=
'
upper right
'
,
bbox_to_anchor
=
(
1.35
,
1
))
plt
.
xlabel
(
'
x
'
)
plt
.
ylabel
(
'
Perfil de densidad
'
)
plt
.
show
()
```

```
python
#Gráfica desviación estándar
plt
.
figure
()
plt
.
plot
(
X
,
desviacion_A
,
c
=
'
b
'
)
plt
.
plot
(
X
,
desviacion_B
,
c
=
'
r
'
)
plt
.
xlabel
(
'
x
'
)
plt
.
ylabel
(
'
Desviación estándar
'
)
plt
.
show
()
```

```
python
#Valor de mayor desviacion estándar
max_desv_A
=
np
.
argmax
(
desviacion_A
)
max_desv_B
=
np
.
argmax
(
desviacion_B
)
print
(
max_desv_A
)
print
(
max_desv_B
)
```
39
64
```
python
#Histograma de la posicion 39
plt
.
hist
(
densidad_DF_A
[
39
],
bins
=
10
)
plt
.
xlabel
(
'
x=39
'
)
plt
.
title
(
'
Máxima desviación estandar A
'
)
#plt.ylabel("x=100")
plt
.
show
()
```

```
python
#Histograma de la posicion 64
plt
.
hist
(
densidad_DF_B
[
64
],
bins
=
10
)
plt
.
xlabel
(
'
x=64
'
)
plt
.
title
(
'
Máxima desviación estandar B
'
)
#plt.ylabel("x=100")
plt
.
show
()
```

```
python
fig
=
plt
.
figure
()
plt
.
plot
(
X
,
prom_densidad_ListaA
,
c
=
'
b
'
)
plt
.
plot
(
X
,
prom_densidad_ListaB
,
c
=
'
r
'
)
plt
.
xticks
(
np
.
arange
(
X
[
0
],
X
[
-
1
]
+
10
,
step
=
10
))
#plt.text(min(X),0.05,'semilla '+str(semilla),fontsize=10)
plt
.
legend
([
'
Particulas A
'
,
'
Particulas B
'
],
loc
=
'
upper right
'
,
bbox_to_anchor
=
(
1.35
,
1
))
plt
.
xlabel
(
'
x
'
)
plt
.
ylabel
(
'
Perfil de densidad
'
)
plt
.
scatter
(
X
[
39
],
prom_densidad_ListaA
[
39
],
c
=
'
black
'
)
plt
.
scatter
(
X
[
64
],
prom_densidad_ListaB
[
64
],
c
=
'
black
'
)
plt
.
show
()
```

```
python
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment