sweetviz-4-intra-set-comparison-compareintra

Sub-skill of sweetviz: 4. Intra-set Comparison (Compare_Intra) (+1).

5 stars

Best use case

sweetviz-4-intra-set-comparison-compareintra is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of sweetviz: 4. Intra-set Comparison (Compare_Intra) (+1).

Teams using sweetviz-4-intra-set-comparison-compareintra should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/4-intra-set-comparison-compareintra/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/analysis/sweetviz/4-intra-set-comparison-compareintra/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/4-intra-set-comparison-compareintra/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sweetviz-4-intra-set-comparison-compareintra Compares

Feature / Agentsweetviz-4-intra-set-comparison-compareintraStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of sweetviz: 4. Intra-set Comparison (Compare_Intra) (+1).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 4. Intra-set Comparison (Compare_Intra) (+1)

## 4. Intra-set Comparison (Compare_Intra)


**Compare Subpopulations Within Dataset:**
```python
import sweetviz as sv
import pandas as pd
import numpy as np

np.random.seed(42)
n = 4000

# Create dataset with a categorical variable for splitting
df = pd.DataFrame({
    "age": np.random.randint(18, 70, n),
    "income": np.random.exponential(50000, n),
    "purchases": np.random.poisson(10, n),
    "satisfaction_score": np.random.uniform(1, 5, n),
    "customer_type": np.random.choice(["Premium", "Standard"], n, p=[0.3, 0.7]),
    "churned": np.random.choice([0, 1], n, p=[0.85, 0.15])
})

# Compare Premium vs Standard customers within same dataset
intra_report = sv.compare_intra(
    source_df=df,
    condition_series=df["customer_type"] == "Premium",
    names=["Premium Customers", "Standard Customers"],
    target_feat="churned"
)

intra_report.show_html("customer_type_comparison.html")
```

**Compare by Boolean Condition:**
```python
import sweetviz as sv
import pandas as pd
import numpy as np

np.random.seed(42)
n = 3000

df = pd.DataFrame({
    "age": np.random.randint(18, 80, n),
    "income": np.random.exponential(60000, n),
    "credit_score": np.random.normal(700, 50, n).astype(int),
    "loan_amount": np.random.exponential(20000, n),
    "default": np.random.choice([0, 1], n, p=[0.9, 0.1])
})

# Compare high-income vs low-income customers
median_income = df["income"].median()

income_comparison = sv.compare_intra(
    source_df=df,
    condition_series=df["income"] > median_income,
    names=["High Income", "Low Income"],
    target_feat="default"
)

income_comparison.show_html("income_segment_comparison.html")
```

**Multiple Segment Analysis:**
```python
import sweetviz as sv
import pandas as pd
import numpy as np

np.random.seed(42)
n = 5000

df = pd.DataFrame({
    "age": np.random.randint(18, 80, n),
    "spend": np.random.exponential(500, n),
    "visits": np.random.poisson(5, n),
    "region": np.random.choice(["North", "South", "East", "West"], n),
    "converted": np.random.choice([0, 1], n, p=[0.8, 0.2])
})

# Create age groups
df["age_group"] = pd.cut(
    df["age"],
    bins=[0, 30, 50, 100],
    labels=["Young", "Middle", "Senior"]
)

# Compare Young vs Senior (Middle excluded)
age_comparison = sv.compare_intra(
    source_df=df,
    condition_series=df["age_group"] == "Young",
    names=["Young (18-30)", "Senior (50+)"],
    target_feat="converted"
)

age_comparison.show_html("age_group_comparison.html")
```


## 5. Feature Configuration


**Specifying Feature Types:**
```python
import sweetviz as sv
import pandas as pd
import numpy as np

np.random.seed(42)
n = 2000

df = pd.DataFrame({
    "id": range(1, n + 1),
    "zip_code": np.random.randint(10000, 99999, n),  # Should be categorical
    "rating": np.random.randint(1, 6, n),  # Ordinal (1-5 stars)
    "revenue": np.random.exponential(1000, n),
    "category": np.random.choice(["A", "B", "C"], n),
    "target": np.random.choice([0, 1], n)
})

# Configure feature types
feature_config = sv.FeatureConfig(
    skip=["id"],  # Skip ID column
    force_cat=["zip_code", "rating"],  # Force as categorical
    force_num=[]  # Force as numerical (if needed)
)

report = sv.analyze(
    source=df,
    target_feat="target",
    feat_cfg=feature_config
)

report.show_html("configured_analysis.html")
```

**Skipping Features:**
```python
import sweetviz as sv
import pandas as pd
import numpy as np

np.random.seed(42)
n = 1500

df = pd.DataFrame({
    "user_id": range(n),
    "session_id": [f"sess_{i}" for i in range(n)],
    "email": [f"user_{i}@example.com" for i in range(n)],
    "feature_1": np.random.randn(n),
    "feature_2": np.random.exponential(10, n),
    "outcome": np.random.choice([0, 1], n)
})

# Skip ID and PII columns
config = sv.FeatureConfig(
    skip=["user_id", "session_id", "email"]
)

report = sv.analyze(
    source=df,
    target_feat="outcome",
    feat_cfg=config
)

report.show_html("filtered_analysis.html")
```

Related Skills

export-tax-summary-with-year-comparison

5
from vamseeachanta/workspace-hub

Extract and structure tax return data into YAML format for year-over-year comparison across different filing products

orcaflex-results-comparison

5
from vamseeachanta/workspace-hub

Compare results across multiple OrcaFlex simulations for design verification, sensitivity studies, and configuration comparison. Includes pretension, stiffness, and force distribution analysis.

orcaflex-results-comparison-comparison-summary-table

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-results-comparison: Comparison Summary Table (+1).

orcaflex-results-comparison-comparison-bar-chart

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-results-comparison: Comparison Bar Chart (+1).

orcaflex-results-comparison-basic-comparison

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-results-comparison: Basic Comparison (+1).

orcaflex-results-comparison-1-pretension-comparison

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-results-comparison: 1. Pretension Comparison (+3).

webapp-testing-example-1-screenshot-comparison-testing

5
from vamseeachanta/workspace-hub

Sub-skill of webapp-testing: Example 1: Screenshot Comparison Testing (+2).

ydata-profiling-6-comparison-reports

5
from vamseeachanta/workspace-hub

Sub-skill of ydata-profiling: 6. Comparison Reports.

sweetviz-sweetviz-with-streamlit

5
from vamseeachanta/workspace-hub

Sub-skill of sweetviz: Sweetviz with Streamlit (+1).

sweetviz-sweetviz-in-data-pipeline

5
from vamseeachanta/workspace-hub

Sub-skill of sweetviz: Sweetviz in Data Pipeline.

sweetviz-6-pairwise-analysis-control

5
from vamseeachanta/workspace-hub

Sub-skill of sweetviz: 6. Pairwise Analysis Control.

sweetviz-3-dataset-comparison-compare

5
from vamseeachanta/workspace-hub

Sub-skill of sweetviz: 3. Dataset Comparison (Compare).