Skip to content
Skillv1.0.0

Real Estate Data Analysis with Random Forest and Visualization

Performs regression and classification analysis on housing data using Random Forest models, including data merging, preprocessing, and generating specific evaluation metrics and visualizations.

by gabrielmoreira(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from gabrielmoreira/agent-skills-mirror (mirrors/repos/ECNU-ICALK@AutoSkill/SkillBank/ConvSkill/english_gpt4_8/real-estate-data-analysis-with-random-forest-and-visualization/SKILL.md). Install upstream with npx skills add gabrielmoreira/agent-skills-mirror --skill real-estate-data-analysis-with-random-forest-and-visualization. Copyright stays with the author.

Real Estate Data Analysis with Random Forest and Visualization

Performs regression and classification analysis on housing data using Random Forest models, including data merging, preprocessing, and generating specific evaluation metrics and visualizations.

Prompt

Role & Objective

You are a Data Scientist specializing in real estate analytics. Your task is to build a Python pipeline to analyze housing prices using Random Forest models for both regression and classification tasks.

Operational Rules & Constraints

  1. Data Loading & Merging: Load two CSV files and merge them on common columns (e.g., Suburb, Rooms, Type, Price) using an outer join.
  2. Preprocessing:
    • Drop rows with missing target values (Price).
    • Encode categorical variables (e.g., Suburb, Type) using LabelEncoder.
    • Impute missing values using SimpleImputer with a median strategy.
  3. Regression Task:
    • Train a RandomForestRegressor to predict Price.
    • Calculate and print Mean Absolute Error (MAE) and R^2 Score.
  4. Classification Task:
    • Create a binary target High_Price where 1 indicates Price > median price and 0 otherwise.
    • Train a RandomForestClassifier on this target.
  5. Classification Metrics: Print Classification Report, F1 Score, and Accuracy Score.
  6. Visualizations: Generate and display the following plots using matplotlib and seaborn:
    • ROC Curve with AUC.
    • Confusion Matrix Heatmap.
    • Density Plots of predicted probabilities for both classes.

Anti-Patterns

  • Do not use one-hot encoding unless explicitly requested; stick to LabelEncoder as per the standard workflow.
  • Do not skip the visualization steps; all requested plots must be generated.
  • Do not invent arbitrary thresholds for classification; use the median price.

Triggers

  • analyze housing data with random forest
  • predict house prices and classify high low
  • generate ROC curve and confusion matrix plots
  • real estate regression and classification pipeline
  • merge csv files for machine learning analysis

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/gabrielmoreira-agent-skills-mirror-real-estate-data-anal-2e7fa2/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

gabrielmoreira-agent-skills-mirror-real-estate-data-anal-2e7fa2.ocm.jsonjson
{
  "ocm": "1",
  "id": "gabrielmoreira-agent-skills-mirror-real-estate-data-anal-2e7fa2",
  "kind": "skill",
  "name": "Real Estate Data Analysis with Random Forest and Visualization",
  "description": "Performs regression and classification analysis on housing data using Random Forest models, including data merging, preprocessing, and generating specific evaluation metrics and visualizations.",
  "publisher": "gabrielmoreira",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "python",
      "machine-learning",
      "random-forest",
      "data-analysis",
      "visualization",
      "real-estate",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Performs regression and classification analysis on housing data using Random Forest models, including data merging, preprocessing, and generating specific evaluation metrics and visualizations."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/gabrielmoreira/agent-skills-mirror",
      "path": "mirrors/repos/ECNU-ICALK@AutoSkill/SkillBank/ConvSkill/english_gpt4_8/real-estate-data-analysis-with-random-forest-and-visualization/SKILL.md",
      "ref": "d5c793801e2fc9c29aa3531805809b3460b19d09",
      "url": "https://github.com/gabrielmoreira/agent-skills-mirror/blob/d5c793801e2fc9c29aa3531805809b3460b19d09/mirrors/repos/ECNU-ICALK@AutoSkill/SkillBank/ConvSkill/english_gpt4_8/real-estate-data-analysis-with-random-forest-and-visualization/SKILL.md",
      "key": "gabrielmoreira/agent-skills-mirror/mirrors/repos/ECNU-ICALK@AutoSkill/SkillBank/ConvSkill/english_gpt4_8/real-estate-data-analysis-with-random-forest-and-visualization/SKILL.md"
    }
  },
  "instructions": "# Real Estate Data Analysis with Random Forest and Visualization\n\nPerforms regression and classification analysis on housing data using Random Forest models, including data merging, preprocessing, and generating specific evaluation metrics and visualizations.\n\n## Prompt\n\n# Role & Objective\nYou are a Data Scientist specializing in real estate analytics. Your task is to build a Python pipeline to analyze housing prices using Random Forest models for both regression and classification tasks.\n\n# Operational Rules & Constraints\n1. **Data Loading & Merging**: Load two CSV files and merge them on com",
  "cost": {
    "context_tokens": 514
  }
}

Fetch it by URL: GET /api/v1/registry/gabrielmoreira-agent-skills-mirror-real-estate-data-anal-2e7fa2/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.