An open API service indexing awesome lists of open source software.

https://github.com/udacity-machinelearning-internship/regularization

Implementing regularization using sckit-learn
https://github.com/udacity-machinelearning-internship/regularization

machine-learning regularization sckit-learn

Last synced: 3 months ago
JSON representation

Implementing regularization using sckit-learn

Awesome Lists containing this project

README

        

![Regularization](https://github.com/BaraSedih11/Regularization/assets/98843912/b980c247-f923-4952-a35d-40f6038155f4)

![GitHub repo size](https://img.shields.io/github/repo-size/BaraSedih11/Regularization) ![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/BaraSedih11/Regularization) [![Python Version](https://img.shields.io/badge/python-3.8-blue)](https://www.python.org/downloads/release/python-380/)
[![Pip Version](https://img.shields.io/badge/pip-21.0-orange)](https://pypi.org/project/pip/21.0/)
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/BaraSedih11/Regularization/main)
[![Version](https://img.shields.io/badge/version-v1.0.0-blue)](https://github.com/BaraSedih11/Regularization/releases/tag/v1.0.0)
[![Contributors](https://img.shields.io/github/contributors/BaraSedih11/Regularization)](https://github.com/BaraSedih11/Regularization/graphs/contributors)
![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/BaraSedih11/Regularization)

# Overview

Perhaps it's not too surprising at this point, but there are classes in sklearn that will help you perform regularization with your linear regression. You'll get practice with implementing that in this exercise. In this assignment's data.csv, you'll find data for a bunch of points including six predictor variables and one outcome variable. Use sklearn's Lasso(opens in a new tab) class to fit a linear regression model to the data, while also using L1 regularization to control for model complexity.

## Requirements

To run the code in the Jupyter Notebook, you need to have Python installed on your system along with the following libraries:

- NumPy
- pandas
- scikit-learn
- matplotlib

You can install these libraries using pip:

```bash
pip install numpy pandas scikit-learn matplotlib

```

## Usage

1. Clone this repository to your local machine:

```bash
git clone https://github.com/BaraSedih11/Regularization.git
```

2. Navigate to the repository directory:

```bash
cd Regularization
```

3. Open and run the Jupyter Notebook `Regularization.ipynb` using Jupyter Notebook or JupyterLab.

4. Follow along with the code and comments in the notebook to understand how requalrization in linear regression is implemented using Python.

## Acknowledgements

- [scikit-learn](https://scikit-learn.org/): The scikit-learn library for machine learning in Python.
- [NumPy](https://numpy.org/): The NumPy library for numerical computing in Python.
- [pandas](https://pandas.pydata.org/): The pandas library for data manipulation and analysis in Python.
- [matplotlib](https://matplotlib.org/): The matplotlib library for data visualization in Python.