Random Examples
In [1]:
Copied!
%load_ext autoreload
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import circumplex
data = pd.read_excel(
"/Users/mitch/Library/CloudStorage/OneDrive-UniversityCollegeLondon/_Fellowship/Papers - Drafts/J2308_APA_SATP-Main/data/SATP Dataset v1.4.xlsx"
)
%load_ext autoreload
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import circumplex
data = pd.read_excel(
"/Users/mitch/Library/CloudStorage/OneDrive-UniversityCollegeLondon/_Fellowship/Papers - Drafts/J2308_APA_SATP-Main/data/SATP Dataset v1.4.xlsx"
)
In [2]:
Copied!
%autoreload
plt.style.use("ggplot")
scales = ["PAQ1", "PAQ2", "PAQ3", "PAQ4", "PAQ5", "PAQ6", "PAQ7", "PAQ8"]
ssm_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"])
ssm_res.plot()
%autoreload
plt.style.use("ggplot")
scales = ["PAQ1", "PAQ2", "PAQ3", "PAQ4", "PAQ5", "PAQ6", "PAQ7", "PAQ8"]
ssm_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"])
ssm_res.plot()
Error: array must not contain infs or NaNs | in Language = arb Error: array must not contain infs or NaNs | in Language = cmn Error: array must not contain infs or NaNs | in Language = ell Error: array must not contain infs or NaNs | in Language = fra Error: array must not contain infs or NaNs | in Language = ind Error: array must not contain infs or NaNs | in Language = jpn Error: array must not contain infs or NaNs | in Language = kor Error: array must not contain infs or NaNs | in Language = nld Error: array must not contain infs or NaNs | in Language = spa Error: array must not contain infs or NaNs | in Language = vie Error: array must not contain infs or NaNs | in Language = zsm
Out[2]:
(<Figure size 640x480 with 1 Axes>, <PolarAxes: >)
In [3]:
Copied!
ssm_res.results[0]
ssm_res.results[0]
Out[3]:
SSMParams(deu_loud, scores=PAQ1 -0.735505 PAQ2 -0.094355 PAQ3 0.344259 PAQ4 0.656572 PAQ5 0.753815 PAQ6 0.021532 PAQ7 -0.394931 PAQ8 -0.795127 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315))
In [4]:
Copied!
test = circumplex.ssm_analyse_grouped_corrs(data, scales, ["loud"], ["Language"])
test = circumplex.ssm_analyse_grouped_corrs(data, scales, ["loud"], ["Language"])
Error: array must not contain infs or NaNs | in Language = arb Error: array must not contain infs or NaNs | in Language = cmn Error: array must not contain infs or NaNs | in Language = ell Error: array must not contain infs or NaNs | in Language = fra Error: array must not contain infs or NaNs | in Language = ind Error: array must not contain infs or NaNs | in Language = jpn Error: array must not contain infs or NaNs | in Language = kor Error: array must not contain infs or NaNs | in Language = nld Error: array must not contain infs or NaNs | in Language = spa Error: array must not contain infs or NaNs | in Language = vie Error: array must not contain infs or NaNs | in Language = zsm
In [5]:
Copied!
test.results
test.results
Out[5]:
[SSMParams(deu_loud, scores=PAQ1 -0.735505 PAQ2 -0.094355 PAQ3 0.344259 PAQ4 0.656572 PAQ5 0.753815 PAQ6 0.021532 PAQ7 -0.394931 PAQ8 -0.795127 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(eng_loud, scores=PAQ1 -0.606997 PAQ2 -0.027397 PAQ3 0.324510 PAQ4 0.608231 PAQ5 0.644103 PAQ6 0.117573 PAQ7 -0.314404 PAQ8 -0.730986 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(hrv_loud, scores=PAQ1 -0.621366 PAQ2 0.328738 PAQ3 0.364106 PAQ4 0.700794 PAQ5 0.669574 PAQ6 0.011157 PAQ7 -0.321482 PAQ8 -0.633544 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(ita_loud, scores=PAQ1 -0.516713 PAQ2 0.126906 PAQ3 0.249130 PAQ4 0.617427 PAQ5 0.690386 PAQ6 -0.058512 PAQ7 -0.191610 PAQ8 -0.651333 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(por_loud, scores=PAQ1 -0.489250 PAQ2 0.375296 PAQ3 0.695722 PAQ4 0.639984 PAQ5 0.607933 PAQ6 -0.223063 PAQ7 -0.328263 PAQ8 -0.621765 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(swe_loud, scores=PAQ1 -0.661008 PAQ2 0.014031 PAQ3 0.232966 PAQ4 0.725853 PAQ5 0.787736 PAQ6 0.066319 PAQ7 -0.298978 PAQ8 -0.737212 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(tur_loud, scores=PAQ1 -0.502171 PAQ2 0.087115 PAQ3 0.580815 PAQ4 0.562785 PAQ5 0.758338 PAQ6 -0.187736 PAQ7 -0.584758 PAQ8 -0.723721 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315))]
In [6]:
Copied!
fig, axes = plt.subplots(4, 2, figsize=(12, 16), sharey=True)
ssm_res.profile_plots(axes=axes)
plt.show()
fig, axes = plt.subplots(4, 2, figsize=(12, 16), sharey=True)
ssm_res.profile_plots(axes=axes)
plt.show()