Skip to content

DeepAstrix/Machine-learning-tutorial

Repository files navigation

Neural Network Regularization Tutorial

This repository contains the code used to demonstrate the effects of regularization in neural networks. Follow the steps below to set up the project and reproduce the results.


Getting Started

1. Clone or Download the Repository

To begin, download the repository from GitHub. You can either:

  • Clone the repository using Git:
    git clone https://github.com/DeepAstrix/Machine-learning-tutorial.git
    cd your-repo-name
  • Download the ZIP file:
    • Go to the repository page on GitHub.
    • Click the green Code button.
    • Select Download ZIP.
    • Extract the ZIP file to your desired location.

2. Set Up the Environment

Ensure you have Python installed on your system (preferably version 3.7 or higher).

Create a Virtual Environment (Optional but Recommended)

  1. Create a virtual environment:
    python -m venv env
  2. Activate the virtual environment:
    • Windows:
      .\env\Scripts\activate
    • macOS/Linux:
      source env/bin/activate

Requirements

Install the following essential libraries using pip:

  • TensorFlow/Keras
  • Matplotlib
  • NumPy
  • Pandas


3. Run the Code

After setting up the environment, run the provided Python script to train the models and generate results.

  1. Navigate to the project directory if not already there:
    cd your-repo-name
  2. Run the script:
    python ML_Tutorial.py

4. Reproduce Results

  • The script will train models with different regularization methods (Baseline, L2 Regularization, and Dropout) and display validation loss and accuracy results for comparison.
  • Graphs such as Validation Loss Comparison, Training vs. Validation Accuracy and Distribution of Weights will come out as results.

Contributing

Contributions are welcome! Feel free to fork the repository, submit issues, or make pull requests.


License

This project is licensed under the MIT License. See the LICENSE file for more details.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages