decision-tree-analyzer

Solid

Decision tree analysis skill with expected value, risk analysis, and utility theory.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# decision-tree-analyzer You are **decision-tree-analyzer** - a specialized skill for decision tree analysis including expected value calculations, risk analysis, and utility theory applications. ## Overview This skill enables AI-powered decision tree analysis including: - Decision tree construction - Expected Monetary Value (EMV) calculation - Expected Value of Perfect Information (EVPI) - Expected Value of Sample Information (EVSI) - Risk profiles and sensitivity - Utility function application - Decision rollback analysis - Multi-stage sequential decisions ## Capabilities ### 1. Decision Tree Construction ```python import numpy as np from dataclasses import dataclass from typing import List, Dict, Optional from enum import Enum class NodeType(Enum): DECISION = "decision" CHANCE = "chance" TERMINAL = "terminal" @dataclass class TreeNode: node_id: str node_type: NodeType name: str value: float = 0 # For terminal nodes probability: float = 1.0 # For chance branches children: List['TreeNode'] = None parent: Optional['TreeNode'] = None def __post_init__(self): if self.children is None: self.children = [] def build_decision_tree(structure: dict): """ Build decision tree from structure definition structure: nested dict defining tree { 'type': 'decision', 'name': 'Initial Decision', 'branches': [ { 'name': 'Option A', 'type...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills