Skip to content

Commit

Permalink
0.9.46 update
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Mar 20, 2024
1 parent cd19495 commit d8218d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions czsc/utils/corr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
"""
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import metrics
from tqdm import tqdm
from typing import Union


plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号


def nmi_matrix(df: pd.DataFrame, heatmap=False) -> pd.DataFrame:
"""计算高维标准化互信息并以矩阵形式输出
:param df: 数据
:param heatmap: 是否绘制热力图
:return:
"""
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import metrics

plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号

cols = df.columns.to_list()

m_dict = {}
Expand Down

0 comments on commit d8218d2

Please sign in to comment.