# 🔬 CasualLite — *Generated by Project GENESIS*

> ⚠️ This is **not** a human-coded project.  
> CasualLite was entirely discovered and built by **[Project GENESIS](https://pgenesis.tech)** — our autonomous AI engine for AI research.

---

### 🧠 What is CasualLite?

**CasualLite** (coded as RCSE-IBFS) is a **fast, interpretable causal discovery algorithm** created by GENESIS. It builds causal skeletons from tabular datasets using independence-based and scoring-based mechanisms.

This repository is a **proof-of-concept** to demonstrate the reasoning, architecture design, and implementation capabilities of GENESIS.

We are proud to announce that CasualLite is the first public algorithm from **Project GENESIS** under the banner of **theAiAlgoRepository**. 

---

### 🤖 Built by GENESIS: What does that mean?

**Project GENESIS** is an AI research system capable of autonomously producing original machine learning algorithms — from concept to functional code — without human programming.  
For CasualLite, GENESIS handled the full research and development lifecycle, delivering the final implementation in **50 seconds**.

Human involvement in code creation: *zero*.

---

### ⚙️ CasualLite Highlights

* Zero black-box dependencies  
* Causal skeleton recovery in seconds  
* Scales to datasets with 10–50+ variables  
* Minimal GPUs or tuning required  
* Outputs adjacency matrix and visual graphs  

---

### 🧪 Usage

```python
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from casuallite import RCSE_IBFS, plot_graph
import seaborn as sns
import numpy as np


if __name__ == '__main__':
    # Load and preprocess the Titanic dataset
    df = sns.load_dataset("titanic")
    df['sex'] = df['sex'].map({'male': 0, 'female': 1})
    df['embarked'] = df['embarked'].astype('category').cat.codes  
    df['class'] = df['class'].astype('category').cat.codes
    df['who'] = df['who'].astype('category').cat.codes
    df['deck'] = df['deck'].astype('category').cat.codes
    df['alive'] = df['alive'].map({'no': 0, 'yes': 1})
    df['adult_male'] = df['adult_male'].astype(int)
    df['alone'] = df['alone'].astype(int)
    df = df.select_dtypes(include=np.number).dropna()

    X_data = df.to_numpy()
    feature_names = df.columns.tolist()

    print("\n🚀 Running RCSE-IBFS...")
    # Correctly unpack the two return values
    G, importances = RCSE_IBFS(X_data, beta=0.9, alpha_init=0.15, max_cond_set_size=2, feature_names=feature_names)

    print("\n📌 Recovered Causal Skeleton:")
    if G and G.nodes():
        for node in G.nodes():
            print(f"{feature_names[node]}: {[feature_names[n] for n in G.neighbors(node)]}")
        # Pass the importances dictionary to the plotting function
        plot_graph(G, labels=feature_names, title="Titanic Causal Skeleton (RCSE-IBFS)", node_importance=importances)
    else:
        
        print("No causal edges discovered.")

```
### 🧭 Why This Matters

This marks a turning point:
CasualLite is **one of the first fully AI-generated causal discovery algorithms** released to the public.

This isn’t AutoML.
This is **AutoScience** — the beginning of AI engines performing real scientific work.

---


### 🧑‍💻 GENESIS Created. You Deploy.

Use CasualLite in your own pipelines. Or, use GENESIS to build your own algorithm.

For partnership or licensing inquiries: [Email us] srinimagi99@gmail.com or genesisproject.autoai@gmail.com

---

### 📄 License

Apache 2.0 License

---

### 🤖 About Project Genesis and theAiAlgoRepository

**GENESIS** is an AI-driven research system that has already produced groundbreaking machine learning algorithms. 

Its milestones include **ARF-OP** (Adaptive Resonance Forest with Optimized Pruning), **MSGL-v2.0** (Meta-Structural Graph Learner), and its first publicly released algorithm — **CasualLite** — a lightweight, high-speed causal discovery algorithm.

**theAiAlgoRepository** is a dedicated branch of the **GENESIS** ecosystem, serving as the official channel for accessing and acquiring both public and commercial algorithms developed by Project GENESIS.

It also offers premium *Research-as-a-Service* (RaaS) solutions for academic, industrial, and enterprise applications. Institutions, researchers, AI labs, and corporations can engage with **theAiAlgoRepository** for licensed, commercial use of GENESIS-developed technologies. 

## *GENESIS continues to set new benchmarks in AI-led algorithm invention and innovation*.

---



