Skip to content

Automatic printing of indices #46

@gnopik

Description

@gnopik

Would be great if the computed indices were printed automatically when simdec.sensitivity_indices is run.

Now it requires several more lines:

foe = pd.Series(res.first_order.ravel(), index=X.columns, name="First-order effects")
display(foe.to_frame())

soe = np.asarray(res.second_order).ravel()
soe_matrix = soe.reshape(X.shape[1],X.shape[1])
cols = list(X.columns)
soe_df = pd.DataFrame(soe_matrix, index=cols, columns=cols)
display(soe_df)

si = pd.Series(np.asarray(res.si).ravel(), index=X.columns, name="Combined_indices")
si_with_total = si.to_frame()
si_with_total.loc["Total explained variance"] = si.sum()
display(si_with_total)

The aggregate table can have the following structure:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions