import seaborn as sns
import matplotlib.pyplot as plt

def plot_correlation(df):
    plt.figure(figsize=(8, 6))
    sns.heatmap(df.corr(numeric_only=True), annot=True, cmap="coolwarm")
    plt.title("Correlation Heatmap")
    plt.show()


def plot_feature_importance(feature_scores):
    features = [f[0] for f in feature_scores]
    scores = [f[1] for f in feature_scores]

    plt.figure(figsize=(8, 5))
    sns.barplot(x=scores, y=features)
    plt.title("Feature Importance Ranking")
    plt.xlabel("Score")
    plt.ylabel("Features")
    plt.show()