Question: [ Colab ] The task is to implement a classifier ( logistic regressor ) for breast cancer data. The deep - learning model is represented

[Colab] The task is to implement a classifier (logistic regressor) for breast cancer data. The deep-learning model is represented by the figure below. It is a fully connected network having one hidden layer. The function \( f \) represents the Sigmoid function [50 points].
a) Load a dataset by importing load_breast_cancer from "sklearn.dataset". Check the number of samples (patients). Also, check the number of features for each sample.
b) Split the dataset into training-set, validation-set and test-set using sklearn. (Ratio: 6:2:2).
c) Pre-process (normalize) the three datasets for scaling the range of each feature.
d) The model must use the cross entropy as a loss function. Also, the parameters of the model must be updated by "stochastic gradient descent". Find the derivative of the loss with respect of each parameter.
e) Make a class for implementing the deep learning model using results in d). Note that the model is fed by all features of each sample. Like sections 16 in our textbook, you need to make your own class and functions without adopting packages (libraries) such as "sklearn_neural_network".
f) Plot training error and validation error over epoch for checking learning curves. The error indicates the mean loss using all samples. Discuss whether overfitting or underfitting happens.
g) Determine hyper-parameters so that the model provide best performance. After learning, please test your trained model. What is the mean loss using all samples in the test set. What is the score (the number of correct predictions / the number of all samples)?
[ Colab ] The task is to implement a classifier (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!