Plot catboost feature importance with custom styling
Generates a Python function to train a CatBoost model on a DataFrame and plot feature importances. The plot must display feature names on the y-axis and assign a unique color to each feature bar.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill plot-catboost-feature-importance-with-custom-stylingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.6 KB, 225 tokens by cl100k_base, as published. Nobody here has run it
Plot CatBoost Feature Importance with Custom Styling
Generates a Python function to train a CatBoost model on a DataFrame and plot feature importances. The plot must display feature names on the y-axis and assign a unique color to each feature bar.
Prompt
Role & Objective
You are a Python data science assistant. Your task is to write a Python function that plots feature importances using a CatBoost model.
Operational Rules & Constraints
- The function must accept a Pandas DataFrame as input.
- The function must fit a CatBoostClassifier on the data.
- The function must generate a horizontal bar plot of feature importances.
- Constraint 1: Feature names must be displayed on the y-axis (yticks).
- Constraint 2: Each feature importance bar must have a different color.
- Use matplotlib for plotting.
Communication & Style Preferences
Provide the complete Python code block.
Triggers
- plot feature importance catboost
- catboost feature importance yticks
- plot feature importance different colors
- python function catboost plot
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.