Metadata-Version: 2.1
Name: BreastCancerMLPModel
Version: 0.0.30
Summary: A package for breast cancer diagnosis using MLP classifier.
Home-page: https://github.com/sergio11/breast_cancer_diagnosis_mlp
Author: Sergio Sánchez Sánchez
Author-email: dreamsoftware92@gmail.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.7, <4
Description-Content-Type: text/markdown
Requires-Dist: scikit-learn ==1.4.2
Requires-Dist: numpy ==1.25.2

# 🩺 Breast Cancer Diagnosis with MLP 🧠

This project aims to develop a machine learning model for the diagnosis of breast cancer using a Multi-Layer Perceptron (MLP) classifier. The dataset utilized for this task is the Breast Cancer Wisconsin dataset, obtained from the UCI Machine Learning Repository.

## 🎯 Purpose

The main purpose of this code is to demonstrate the application of a MLP classifier in diagnosing breast cancer based on features extracted from fine needle aspiration (FNA) images of breast masses. The features describe various characteristics of cell nuclei present in the images. By analyzing these features, the MLP classifier can learn to differentiate between benign and malignant tumors, thereby aiding in the early detection and diagnosis of breast cancer.

## 🛠️ Decision Making

1. **Model Selection**: The MLP classifier from the scikit-learn library is chosen for its ability to capture complex patterns in the data. MLPs are capable of learning non-linear relationships between features, making them suitable for this classification task.

2. **Data Preprocessing**: Prior to training the model, the dataset is divided into training and testing sets using a standard 80-20 split. Additionally, feature scaling is performed using StandardScaler to standardize the feature values, ensuring that each feature contributes equally to the learning process and improving convergence speed.

3. **Model Training**: The MLP model is instantiated with two hidden layers containing 100 and 50 neurons respectively. The 'adam' solver is chosen for optimization, and the model is trained with a maximum of 500 iterations. The 'verbose' parameter is set to 10 to display progress during training.

4. **Evaluation**: After training, the model is evaluated using the testing set. Accuracy score and confusion matrix are computed to assess the performance of the model in diagnosing breast cancer.

## 🚀 Usage

To run the code, ensure that you have the required dependencies installed. You can execute the script in any Python environment that supports scikit-learn. Simply clone the repository and execute the `breast_cancer_diagnosis_mlp.py` script. Make sure to adjust any parameters or configurations as needed for your specific use case.



data = "ID: 842302, Diagnosis: M, mean_radius: 17.99, mean_texture: 10.38, mean_perimeter: 122.8, mean_area: 1001, mean_smoothness: 0.1184, mean_compactness: 0.2776, mean_concavity: 0.3001, mean_concave_points: 0.1471, mean_symmetry: 0.2419, mean_fractal_dimension: 0.07871, se_radius: 1.095, se_texture: 0.9053, se_perimeter: 8.589, se_area: 153.4, se_smoothness: 0.006399, se_compactness: 0.04904, se_concavity: 0.05373, se_concave_points: 0.01587, se_symmetry: 0.03003, se_fractal_dimension: 0.006193, worst_radius: 25.38, worst_texture: 17.33, worst_perimeter: 184.6, worst_area: 2019, worst_smoothness: 0.1622, worst_compactness: 0.6656, worst_concavity: 0.7119, worst_concave_points: 0.2654, worst_symmetry: 0.4601, worst_fractal_dimension: 0.1189"

