Skip to content

Concatenating the 2 arrays in 1D ALE for Discrete Variables  #17

@awp233

Description

@awp233

When you concatenate the the 2 files (Delta_plus and Delta_neg), why does the feature value get increased by 1 for the delta_plus array and not for the delta_neg array?

This means that the resultant concatenated array has a column (FeatureName) that contains the TRUE feature value for the second part of the array (Delta_neg), but then this same column contains the feature value increased by 1 for the first part of the array (Delta_plus)

The code extract is given below:

Delta_plus = y_hat_plus - y_hat[ind_plus]
Delta_neg = y_hat[ind_neg] - y_hat_neg

#compute the mean of the difference per group
delta_df = pd.concat(
[
pd.DataFrame(
{"eff": Delta_plus, feature: groups[feature_codes[ind_plus] + 1]}
),
pd.DataFrame({"eff": Delta_neg, feature: groups[feature_codes[ind_neg]]}),
]
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions