Iris Feature Analysis and Visualization in Python
Load the Iris dataset from scikit-learn, create a seaborn feature pairplot, and explore species separation patterns using an AI data analyst.
What this AI workflow does
This AI Data Analyst workflow loads the Iris dataset from scikit-learn into a pandas DataFrame and reports basic statistics and dataset shape. It generates a seaborn pairplot of the four numeric features, colored by species, to visualize pairwise relationships. It then compares feature separation patterns across species and summarizes which measurements most clearly distinguish the classes.
Who this example is for
This is for learners and analysts who want a compact, conversational example of exploratory data analysis on a classic multiclass dataset. It helps you practice interpreting pairplots and translating visual separation into a feature-level summary.
Expected analysis outcomes
These are the results the AI workflow is expected to generate.
- Iris DataFrame with shape (150, 5) and df.describe() summary
- Seaborn pairplot (4x4) colored by setosa, versicolor, and virginica
- Identification of petal length and petal width as the strongest separators
- Observation that setosa is fully isolated in petal feature space
Tools and libraries used
Main Python packages and tooling used to run this AI data analysis task.
- scikit-learn
- pandas
- seaborn
- matplotlib
- numpy
Prompt sequence
This is the exact list of prompts used in this workflow. The same prompt sequence is sent to each model so outputs and scores can be compared fairly.
- 1load iris dataset from scikit-learn and show basic statistics
- 2create a feature pairplot colored by species
- 3which features best separate the three species?
Model Comparison
We compared several LLM models on the same analysis task. The table below shows their scores side by side. You can also open each model run to check the full conversation and notebook results.
| Model Source | Score | Task | Execution | Output | Reasoning | Reliability | Run |
|---|---|---|---|---|---|---|---|
| gemma4:31b | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open gemma4:31b conversation |
| glm-5.1 | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open glm-5.1 conversation |
| gpt-5.4 | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open gpt-5.4 conversation |
| gpt-oss:120b | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open gpt-oss:120b conversation |
| qwen3-coder-next | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open qwen3-coder-next conversation |
| qwen3.5:397b | 10/10 | 2/2 | 2/2 | 3/3 | 2/2 | 1/1 | Open qwen3.5:397b conversation |
How scoring works
Each run is graded on five dimensions:
- Task Completion (0-2): how fully the workflow answered the requested analysis task and completed required steps.
- Execution Correctness (0-2): whether generated code is correct, consistent, and likely runnable without major fixes.
- Output Quality (0-3): how well tables, charts, and results match the expected analytical outcomes.
- Reasoning Quality (0-2): clarity and correctness of interpretation, explanation, and conclusions.
- Reliability (0-1): robustness of the run, including low hallucination risk and stable behavior.
The final score is the sum of these dimensions, so total score = 0-10. Higher values indicate more complete, correct, and reliable notebook results for this workflow.
AI Analysis with glm-5.1
This run uses AI with a step-by-step list of prompts to perform the analysis task Iris Feature Analysis and Visualization in Python. Below, you can review the full conversation generated with glm-5.1. After the conversation, we show detailed score cards for this run.
Score cards for glm-5.1 for Iris Feature Analysis and Visualization in Python
Total score: 10/10
Task Completion: 2/2
ExcellentThe workflow completed all requested steps: loaded the Iris dataset, showed basic statistics, created a species-colored pairplot, and answered which features separate the species best.
Execution Correctness: 2/2
ExcellentThe provided code is syntactically correct and consistent with the outputs shown, including the expected DataFrame shape and seaborn pairplot generation.
Output Quality: 3/3
ExcellentOutputs match the expected outcomes semantically: df.describe() for a 150x5 dataset, a 4-feature pairplot colored by species, and a correct summary that petal features separate species best with setosa isolated.
Reasoning Quality: 2/2
ExcellentThe reasoning is clear and accurate, correctly identifying petal length and width as the strongest separators and noting setosa's isolation and overlap between versicolor and virginica.
Reliability: 1/1
ExcellentThe workflow is consistent and grounded in the displayed outputs, with no evident hallucinations or unsafe behavior.
Try MLJAR Studio
Run the same type of AI-powered data analysis on your own datasets with conversational notebooks in MLJAR Studio.
Explore More AI Analysis Examples
Discover additional workflows across categories. Each example includes prompts, conversation outputs, and model-level scoring so you can compare approaches and results.