Closed Leo-T-Zang closed 1 year ago
Follow-up questions:
For your initial question, it would be helpful if you could include the output of pip list
as well as a cut down repro of the issue. I think it's probably safe to ignore those warnings for now as they mostly relate to how the internal structure of scikit-learn will change in future updates.
For your followups:
heterogeneity_model
).Thank you for your explanation. It helps a lot!
I have successfully run part of example codes. However, I found another issue when using heterogeneity tree
ca.plot_heterogeneity_tree(
x_test,
"age_m",
max_depth=2,
min_impurity_decrease=1e-6,
min_samples_leaf = 5
)
The error is
[/usr/local/lib/python3.9/dist-packages/sklearn/utils/validation.py] in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator, input_name)
869 # If input is scalar raise error
870 if array.ndim == 0:
--> 871 raise ValueError(
872 "Expected 2D array, got scalar array instead:\narray={}.\n"
873 "Reshape your data either using array.reshape(-1, 1) if "
ValueError: Expected 2D array, got scalar array instead:
array=nan.
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
Do you have any idea of how to fix this problem? Thanks in advance.
Sorry for the slow response. Could you provide a full stack trace (and ideally a self-contained repro)? It's possible we have a bug here but it's hard to know without understanding more of your context.
Problem is sovled. Thank you.
Hi,
When using Causal Analysis Function, I encounter following warnings.