Explore our real-time modeling and causal learning metrics: Workspace Link
CCNet is a new ML framework designed to uncover and model causal relationships between input observations ๐ and labels ๐ฆ in datasets. This framework employs three neural networks to form a cooperative structure that enables bidirectional inference between input ๐ and target ๐ฆ.
This framework learns an explanation vector ๐ that transforms the associations observed between inputs ๐ and outputs y into a causal relationship. Here, ๐ and ๐ฆ are considered comprehensive factors instrumental in generating ๐.
CCNet consists of three neural networks having role of โExplainer, Reasoner, and Producerโto execute six fundamental operations in machine learning:
-
Explain
: Extracts key features from input observations (X) to form an Explanation Vector(e), which captures the essential aspects of the data. -
Reason
: Utilizes the Explanation Vector alongside Input Observations (X) to infer the associated label (y) of the observation. -
Produce
: Generates new data based on specified conditions and the derived Explanation(e), enabling the creation of data instances that resemble authentic observations. -
Infer
: Determines outputs (y') from input data (X) by integrating the insights from both the Explainer and Reasoner networks, providing a prediction or outcome based on learned patterns. -
Generate
: Constructs new data using the Explanation Vector with randomly sampled conditions (y), allowing for the exploration of possible data scenarios that could occur under different circumstances. -
Reconstruct
: Rebuilds input data (X) by sequentially explaining, reasoning, and then producing the output, effectively creating a reconstructed version of the input based on the network's understanding and reasoning.
conda create -name ccnets python=3.9.18
conda activate ccnets
pip install jupyter
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install pandas==2.2.2
pip install scikit-learn==1.1.0
pip install transformers==4.40.2
pip install tensorboard==2.16.2
pip install ipywidgets==8.1.2
- Steps to install the framework.
- Note: Ensure you have the required dependencies installed as listed in the "Dependencies" section above.
Installation Steps:
-
Clone the repository:
git clone https://github.com/ccnets-team/causal-learning.git
-
Navigate to the directory and install the required packages:
cd ccnets pip install -r requirements.txt conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
Traditional ML models predict patient survival (Y) based on condition data (X). CCNet, however, takes a reverse approach by simulating and identifying the necessary conditions (X) to achieve the desired outcome (Y), ensuring patient survival.
Instead of applying treatments (T) to improve survival, CCNet generates the necessary treatments and patient conditions (X) for survival using latent variables (E) that contain additional information unrelated to the patient's survival (Y).
CCNets harnesses a dual cooperative network structure, each designed to optimize the processing and analysis of complex datasets
-
Core Cooperative Network (GPT-based)
At the core of CCNetsโ architecture is a Cooperative Network configured with GPT models. These models are optimized for sequence learning and label comprehension within extensive datasets. They serve as the central processing unit, adept at handling and interpreting sequence data and extracting meaningful insights from complex patterns.
-
Encoder Cooperative Network
The Encoder Cooperative Network is engineered to preprocess and transform raw input data into a format that significantly enhances the analytical capabilities of the Core Cooperative Network. This network specializes in adapting raw data into a structured, analyzable form. For example, in handling image data, this network translates visual information into a trajectory format.
Labelโฌ๏ธ\Dataโก๏ธ Type | Tabular | Time-Series | Image | Text |
---|---|---|---|---|
Binary Classification | - Causal Generate Rebalanced Dataset - How Causality Ensures Perfect Airline Customer Satisfaction - How to Cheat Decision Making Model(Card Fraud) - How to Cheat Decision Making Model(Loan Approval) |
|||
Multi Class Classification | - EEG performance |
- Design Your Fashion Using CCNet - Generate Your Handwritten Digits - Transform Old Painting to Photo - Gender Expression Reshape - Animal Match - Recycling Classification |
||
Multi Label Classification | ||||
Single Regression | - California House Price | - Climate Prediction - Energy Prediction - Prediction Air Quality in India |
||
Compositional Regression | - Sparse Drug Composition Prediction from NIR dataset Using CCNet | |||
Ordinal Regression | ||||
Encoding |
- We're currently in the process of building our official documentation webpage to better assist you. In the meantime, if you have any specific questions or need clarifications, feel free to reach out through our other support channels. We appreciate your patience and understanding!
More Information
Thank you for taking the time to report issues and provide feedback. This helps improve our project for everyone! To ensure that your issue is handled efficiently, please follow the guidelines below:We provide three issue templates to streamline the reporting process:
- Bug Report: Use this template if you've found a bug or something isn't working as expected. Please provide as much detail as possible to help us reproduce and fix the bug.
- Feature Request: If you have an idea for a new feature or think something could be improved, this is the template to use. Describe the feature, its benefits, and how you envision it.
- Custom Issue Template: For all other issues or general feedback, use this template. Make sure to provide sufficient context and detail.
Before submitting a new issue, please search the existing issues to avoid duplicates. If you find a similar issue, you can add your information or ๐ the issue to show your support.
- Title: Use a descriptive title that summarizes the issue.
- Description: Provide as much detail as necessary, but try to be concise. If reporting a bug, include steps to reproduce, expected behavior, and actual behavior.
- Screenshots: If applicable, add screenshots to help explain the issue.
If possible, categorize your issue using the appropriate GitHub labels. This helps us prioritize and address issues faster.
After submitting an issue, please check back periodically. Maintainers or other contributors may ask for further information or provide updates.
Thank you for helping improve our project! Your feedback and contributions are invaluable.
Causal Learning is dual-licensed under the GNU General Public License version 3(GPLv3) and a separate Commercial License.
Please consult the LICENSE files in the repository for more detailed information on the licensing of Causal Learning.