Get the latest version of the Neural Causal Regularization package
The easiest way to install the Neural Causal Regularization package is from CRAN:
install.packages("ncausalreg")
To install from the downloaded source package:
# In R
install.packages("path/to/ncausalreg_1.0.0.tar.gz", repos = NULL, type = "source")
To install from the downloaded Windows binary:
# In R
install.packages("path/to/ncausalreg_1.0.0.zip", repos = NULL, type = "win.binary")
To install the development version from GitHub:
# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
# Install ncausalreg from GitHub
devtools::install_github("username/ncausalreg")
To clone the repository for development:
# Using git
git clone https://github.com/username/ncausalreg.git
# Navigate to the directory
cd ncausalreg
# Install the package in development mode
R CMD INSTALL .
We provide a Docker image with Neural Causal Regularization pre-installed:
# Pull the Docker image
docker pull username/ncausalreg:latest
# Run the container with RStudio
docker run -d -p 8787:8787 -e PASSWORD=yourpassword username/ncausalreg:latest
# Then open http://localhost:8787 in your browser
# Username: rstudio
# Password: yourpassword
To build the Docker image yourself:
# Clone the repository
git clone https://github.com/username/ncausalreg.git
# Navigate to the directory
cd ncausalreg
# Build the Docker image
docker build -t ncausalreg .
The Neural Causal Regularization package depends on the following R packages:
These dependencies will be automatically installed when you install the package.
The Neural Causal Regularization package has been tested on the following systems:
For optimal performance, especially when training large neural networks, we recommend:
The Neural Causal Regularization package is released under the MIT License:
MIT License
Copyright (c) 2025 Neural Causal Regularization Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
If you use Neural Causal Regularization in your research, please cite our paper:
@article{richter2025neural,
title={Neural Causal Regularization: Extending Causal Invariance to Deep Models},
author={Richter, F. and Rigana, K. and Wit, E.},
journal={},
year={2025}
}
If you encounter any issues or have questions about the Neural Causal Regularization package, please: