Python编程语言学习:输出一个类或者实例化对象的所有属性和方法名

Python编程语言学习:输出一个类或者实例化对象的所有属性和方法名

目录

输出一个类或者实例化对象的所有属性和方法名

输出结果

实现代码


输出一个类或者实例化对象的所有属性和方法名

输出结果

ActionOptimizer
AdditiveExplainer
Cohorts
DeepExplainer
Explainer
Explanation
GPUTreeExplainer
GradientExplainer
KernelExplainer
LinearExplainer
PartitionExplainer
PermutationExplainer
SamplingExplainer
TreeExplainer


__builtins__
__cached__
__doc__
__file__
__loader__
__name__
__package__
__path__
__spec__
__version__
_cext
_explanation
_serializable
actions


approximate_interactions
bar_plot
datasets
decision_plot
dependence_plot
embedding_plot
explainers
force_plot
getjs
group_difference_plot
have_matplotlib
image_plot
initjs
kmeans
links
maskers
matplotlib
models
monitoring_plot
multioutput_decision_plot
other
partial_dependence_plot
plots
sample
save_html
summary_plot
sys
text_plot
unsupported
utils
warnings
waterfall_plot

实现代码

import shap

for item in dir(shap):  #  shap 是某类的一个实例化对象
    print(item)

猜你喜欢

转载自blog.csdn.net/qq_41185868/article/details/126082163