Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marcel Henrik Schubert
AttributionFeatures
Commits
7363d2be
Commit
7363d2be
authored
Jul 31, 2019
by
Marcel Henrik Schubert
Browse files
fixed halfing error
parent
d94299a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Scripts/Analysis_final_mult.py
View file @
7363d2be
...
...
@@ -904,7 +904,8 @@ def plotter(subsets, subana, phases, labels):
dic
[
ph
+
'
\n
({})'
.
format
(
leng
)].
update
({
el
[
0
]:
-
(
abs
(
arr
[
el
[
0
]])
/
abs
(
mini
[
el
[
0
]])).
round
(
3
)
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
})
ind_pos
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_pos'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
ind_neg
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
phase_key
.
append
(
ph
+
'
\n
({})'
.
format
(
leng
))
#phase_key.append(ph+'\n({})'.format(leng))
phase_key
.
append
(
ph
)
ind_pos
=
list
(
np
.
unique
(
ind_pos
))
ind_neg
=
list
(
np
.
unique
(
ind_neg
))
...
...
@@ -942,7 +943,8 @@ def plotter(subsets, subana, phases, labels):
####plot is too long - half it
half
=
math
.
floor
(
len
(
df
.
index
))
half
=
math
.
floor
(
len
(
df
.
index
)
/
2
)
sub
=
df
[
0
:
half
]
f
,
ax
=
plt
.
subplots
(
figsize
=
(
18
,
len
(
ind_pos
+
ind_neg
)
/
5
))
sns
.
heatmap
(
sub
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
...
...
@@ -979,7 +981,8 @@ def plotter(subsets, subana, phases, labels):
dic
[
ph
+
'
\n
({})'
.
format
(
leng
)].
update
({
el
[
0
]:
-
(
abs
(
arr
[
el
[
0
]])
/
abs
(
mini
[
el
[
0
]])).
round
(
3
)
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
})
ind_pos
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_pos'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
ind_neg
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
phase_key
.
append
(
ph
+
'
\n
({})'
.
format
(
leng
))
#phase_key.append(ph+'\n({})'.format(leng))
phase_key
.
append
(
ph
)
ind_pos
=
list
(
np
.
unique
(
ind_pos
))
ind_neg
=
list
(
np
.
unique
(
ind_neg
))
...
...
@@ -1037,7 +1040,8 @@ def plotter(subsets, subana, phases, labels):
dic
[
sex
+
'_'
+
ph
+
'
\n
({})'
.
format
(
leng
)].
update
({
el
[
0
]:
-
(
abs
(
arr
[
el
[
0
]])
/
abs
(
mini
[
el
[
0
]])).
round
(
3
)
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
sex
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
})
ind_pos
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
sex
][
'count_tot_pos'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
ind_neg
.
extend
([
el
[
0
]
for
el
in
most_pred
[
st
][
an
][
label
][
ph
][
sex
][
'count_tot_neg'
]
if
(
el
[
1
]
/
leng
)
>=
.
95
])
phase_key
.
append
(
sex
+
'_'
+
ph
+
'
\n
({})'
.
format
(
leng
))
#phase_key.append(sex+'_'+ph+'\n({})'.format(leng))
phase_key
.
append
(
sex
+
'
\n
({})'
.
format
(
ph
))
ind_pos
=
list
(
np
.
unique
(
ind_pos
))
ind_neg
=
list
(
np
.
unique
(
ind_neg
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment