Skip to content

Binary classification of breast cancer using PyTorch. Used StandardScaler, LabelEncoder, Dataset, DataLoader, custom nn.Module model, BCELoss, and SGD. Focused on implementing a complete training pipeline, not optimizing accuracy.

Notifications You must be signed in to change notification settings

MUHAMMADAKMAL137/Pytorch_Training_Pipeline_Using_Dataset_And_Dataloader_Class.ipynb

Repository files navigation

Breast Cancer Classification using PyTorch This notebook presents a simple binary classification pipeline using the Breast Cancer dataset implemented with PyTorch. The main focus is to apply key PyTorch components and techniques rather than optimize for model accuracy.

Key steps include:

Data Preprocessing: Standardized the features using StandardScaler and converted categorical labels using LabelEncoder.

Data Batching: Converted the processed data into tensors and used TensorDataset and DataLoader to create mini-batches, enabling mini-batch stochastic gradient descent.

Model Creation: Defined a custom neural network class MySimpleNN with a single linear layer and sigmoid activation function using nn.Module.

Training: Used BCELoss as the loss function and SGD optimizer for training the model over mini-batches.

Evaluation: The goal was to demonstrate the complete pipeline, including model creation, data loading, and training—not to maximize accuracy.

About

Binary classification of breast cancer using PyTorch. Used StandardScaler, LabelEncoder, Dataset, DataLoader, custom nn.Module model, BCELoss, and SGD. Focused on implementing a complete training pipeline, not optimizing accuracy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published