{% extends "common/step.jinja" %}
{% block step_content %}
    <h3 class="fs-5">Description</h3>
    <p>
        In this step dimensionality reduction is performed on numerical variables
        using principal component analysis (PCA). It can help us see if there is
        any clustering in the dataset. Below is a table with all principal
    components calculated.
    </p>
    <h3 class="fs-5">PCA data</h3>
    <h3 class="fs-6">Data snapshot</h3>
    <div class="table-responsive overflow-auto mb-4" style="max-height: 400px;">
        {{ data[i].output["pca_data"] }}
    </div>

    <h3 class="fs-5">Explained variance plot</h3>
    <p>Below is a cumulative explained variance plot, showing how many principal
    components account for how much variance the variance. If the first two components
    PC1 and PC2 don't account for most of the variance, then in PCA plot in the end
    of this step clustering is unlikely to be spotted.</p>
    {{ data[i].output["explained_variance"] }}

    <h3 class="fs-5">PCA plot</h3>
    {{ data[i].output["pca_plot"] }}
{% endblock %}