-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New] show cluster map with new method Scenario.corr() #841
Comments
Users will specify delay period (lag). Indicator should be delayed. |
For more option, Also, If this is implement in |
|
To detect non-linear correlation, New method should detect non-linear correlation when user need to do ( |
Memo for visualization (seaborn) |
Memo regarding coding. X = snl.records(variables="all", show_figure=False)
X = X.drop(["Susceptible", "Confirmed", "Infected", "Recovered", "Fatal", "Date"], axis=1)
X = X.apply(lambda x: (x-x.mean())/ x.std(), axis=0).dropna(axis=1)
Y = snl.track()
Y = Y.loc[Y.Scenario == "Main", ["theta", "kappa", "rho", "sigma"]]
df = pd.concat([Y, X], axis=1)
df.corr().style.background_gradient(cmap="coolwarm") |
Highlight corr and PCA. |
Or we can do import seaborn as sns
df = pd.concat([Y, X], axis=1)
df = df.corr()
mask = np.zeros_like(df)
mask[np.triu_indices_from(mask)] = True
sns.heatmap(df, mask=mask, square=True); |
Cliuster map: df = pd.concat([Y, X], axis=1)
df = df.corr()
sns.clustermap(df, square=True); |
Summary of this new feature
To find useful indicators for ODE parameter prediction,
seaborn.clstermap()
will be helpful. This shows correlation coefficients and peeform clustering. Results will be shonone figure.Ne method
Scenario.corr()
will show cluster map and return correlation coefficients as a dataframe.The text was updated successfully, but these errors were encountered: