<div align="center">
    <img src="causal-factory-logo.png" width="200">
</div>

# Core User Story for CausalFactory - Under Developement
As a user working with causal analysis, I want to seamlessly discover, visualize, and operationalize causal relationships within my data so that I can make informed, evidence-based decisions and drive impactful outcomes in my field.

## CausalFactory Capabilities List:
- Flexible Data Handling: I can load diverse datasets into CausalFactory, with flexibility to accommodate different input structures and variable features.
- Causal Discovery and Model Selection: I can choose and run a causal discovery model, such as the PC algorithm, and obtain insights that reveal cause-effect relationships in my data.
- Standardized Results and Schema Compatibility: I can retrieve formatted results with a consistent schema, ensuring compatibility with logging and deployment systems.
- Interactive Visualizations: I can generate and explore causal graphs interactively, enabling deeper understanding of relationships, and I can export these visualizations to share with stakeholders.
- Automated Logging for CausalOps: I can log and version models, results, and visualizations to MLflow, allowing me to track my analysis steps, manage model versions, and streamline the deployment process.
- Challenges of Causal Models Solved: I benefit from dynamic signature management, flexible output formatting, and tools that address the unique challenges of causal models, making it possible to integrate causal analysis in a production environment without additional overhead.

## CausalFactory: Beyond MLflow and gCastle

While **MLflow** focuses on experiment tracking, model management, and deployment, and **gCastle** provides causal discovery algorithms, **CausalFactory** unifies these tools into a dedicated toolkit for **CausalOps**. CausalFactory enables end-to-end causal discovery, addressing unique challenges like schema management, standardized output formatting, visualization, and deployment readiness that neither MLflow nor gCastle can achieve alone.

---

### Capability Comparison Table

| **Capability**                     | **MLflow**               | **gCastle**               | **CausalFactory** (Combined Benefits)                                                   |
|------------------------------------|--------------------------|---------------------------|----------------------------------------------------------------------------------------|
| **Unified Interface for CausalOps** | ✖️ No native support     | ✖️ No unified interface   | ✅ Provides a single interface for configuring, running, logging, and visualizing causal models |
| **Dynamic Signature Management**    | ✖️ No support            | ✖️ No schema management   | ✅ Infers and applies flexible schemas for causal models, ensuring MLflow compatibility |
| **Standardized Output Formatting**  | ✖️ Not tailored to causal models | Partial: Raw causal matrices only | ✅ Converts causal outputs to standardized formats (e.g., JSON, edge lists) suitable for MLflow and reports |
| **Visualization Module**            | ✖️ No visualization      | ✖️ No visualization       | ✅ Generates interactive and exportable causal graphs to illustrate relationships       |
| **Automatic Logging and Versioning**| Partial: General ML model logging only | ✖️ No logging            | ✅ Logs causal models, results, visualizations, and schema to MLflow for full tracking  |
| **Deployment-Ready**                | Partial: Deployment for traditional ML models only | ✖️ Not designed for deployment | ✅ Supports real-time data pipelines and causal model deployment in production          |
| **Error Handling and Usability**    | ✖️ Limited feedback for causal models | Partial: Technical configurations only | ✅ User-friendly configuration, error handling, and feedback for causal discovery setup |

---
