First, clone the repository and navigate to the project directory:
git clone <repository-url>
cd Python_Project_TemplateCreate and activate a virtual environment:
# Create virtual environment
make venv
# Activate virtual environment (shown after running make venv)
source venv/bin/activate # For Unix/MacOS
# or
.\venv\Scripts\activate # For WindowsInstall required packages:
make installInitialize repository and push to GitHub:
# Set your GitHub username and repo name in Makefile
# Then run:
make init
# For subsequent pushes:
make pushTo pull latest changes and update packages:
make syncThe project includes a raw dataset (raw_data/boston.txt) and configuration (src/config/config.yaml) for running a random forest regression. The configuration file allows you to adjust model hyperparameters without changing the code.
To run the analysis:
- Activate your virtual environment.
- Preprocess the raw data to prepare the dataset:
python src/00_rawdata_process.py
- Execute the regression analysis script:
python src/01_regression.py
- Visualize the results using the visualization script:
python src/02_visualization.py
Example configuration in config.yaml:
model:
type: "random_forest"
parameters:
n_estimators: 100
max_depth: 10
test_size: 0.2
scoring: "roc_auc"