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
3ff23fad
Commit
3ff23fad
authored
Jul 18, 2019
by
Marcel Henrik Schubert
Browse files
fixed sns return error
parent
9969e6c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Scripts/Analysis_final_mult.py
View file @
3ff23fad
...
...
@@ -772,7 +772,7 @@ def plotter(subsets, subana, phases, labels):
#print([vocab[el] for el in ind_pos + ind_neg])
df
=
pd
.
DataFrame
(
tmp
,
index
=
[
vocab
[
el
].
replace
(
'§'
,
''
).
encode
(
'unicode-escape'
)
for
el
in
ind_pos
+
ind_neg
])
f
,
ax
=
plt
.
subplots
(
figsize
=
(
18
,
len
(
ind_pos
+
ind_neg
)
/
6
))
ax
=
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
f
.
savefig
(
savedir
+
'featureplots/features_heat_{}_{}_{}_phases.png'
.
format
(
st
,
an
,
label
))
elif
label
==
'author'
:
...
...
@@ -819,7 +819,7 @@ def plotter(subsets, subana, phases, labels):
#print([vocab[el] for el in ind_pos + ind_neg])
df
=
pd
.
DataFrame
(
tmp
,
index
=
[
vocab
[
el
].
replace
(
'§'
,
''
).
encode
(
'unicode-escape'
)
for
el
in
ind
])
f
,
ax
=
plt
.
subplots
(
figsize
=
(
18
,
len
(
ind_pos
+
ind_neg
)
/
6
))
ax
=
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
f
.
savefig
(
savedir
+
'featureplots/features_heat_{}_{}_{}_phases.png'
.
format
(
st
,
an
,
label
))
dic
=
{}
...
...
@@ -853,7 +853,7 @@ def plotter(subsets, subana, phases, labels):
ind
=
ind_pos
+
ind_neg
df
=
pd
.
DataFrame
(
tmp
,
index
=
[
vocab
[
el
].
replace
(
'§'
,
''
).
encode
(
'unicode-escape'
)
for
el
in
ind
])
f
,
ax
=
plt
.
subplots
(
figsize
=
(
18
,
len
(
ind_pos
+
ind_neg
)
/
6
))
ax
=
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
sns
.
heatmap
(
df
,
fmt
=
'.1f'
,
ax
=
ax
,
center
=
0
,
yticklabels
=
True
)
f
.
savefig
(
savedir
+
'featureplots/features_heat_{}_{}_{}_gender_phases.png'
.
format
(
st
,
an
,
label
))
return
1
...
...
Write
Preview
Markdown
is supported
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