EDA (Exploratory Data Analysis)

Key Topics


Development Summary


What is EDA

grafico.jpg

Exploratory data analysis (EDA) is the process of analyzing and investigating data sets to summarize their main characteristics. Through the EDA process, patterns and hypotheses can be identified within the data set, which serves as the foundation for implementing machine learning. For this project, our main purpose for EDA is to understand how different people feel when they receive consulting from AI.

EDA for the web-based dashboard.

To create the web-based dashboard, we first started with Exploratory Data Analysis (EDA) to examine the characteristics of our dataset.

Age Distribution

Since gender might affect the satisfaction of consulting users when they talk with AI and human consultants, we first identified the gender distribution in the data. Below are the codes for that.

def generate_sentiment_by_gender(data, consultant):
    data_consult = data[data["the_consultant"] == consultant]
    sentiment_scores = data_consult.groupby('gender')["sentiment"].mean().reset_index()
    fig_sentiment_gender = go.Figure(data=[
        go.Bar(
            x=sentiment_scores["gender"],
            y=sentiment_scores["sentiment"],
            marker_color=colors[:len(sentiment_scores)]
        )
    ])
    fig_sentiment_gender.update_layout(
        xaxis_title="Gender",
        yaxis_title="Average Sentiment Score",
    )

    return fig_sentiment_gender