Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MutualIndependence Plot throws error with large dataset #107

Open
shreyanmitra opened this issue Jul 20, 2024 · 0 comments
Open

MutualIndependence Plot throws error with large dataset #107

shreyanmitra opened this issue Jul 20, 2024 · 0 comments

Comments

@shreyanmitra
Copy link

Hello,

Here is the minimum repro:

file = pd.read_csv("country_full.csv", keep_default_na=False)
target = "name"

tabular_data = Tabular(
file,
feature_columns=file.columns,
categorical_columns = [column for column in file.columns if ((not is_numeric_dtype(file[column]) or len(set(file[column])) < 0.5*len(file[column])) and column!=target)],
target_column=target
)
explainer = DataAnalyzer(
explainers=["mutual"],
mode = "classification" if (not is_numeric_dtype(file[target]) or len(set(file[column])) < 0.5*len(file[target])) else "regression",
data=tabular_data
)
explanations = explainer.explain_global()

For the file country_full.csv, this code throws the error:
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.
although there are many samples in the data.

Let me know if you need any other information from my part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant