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 deeplearning model is represented by the figure below. It is a fully connected network having one hidden layer. The function f represents the Sigmoid function points
a Load a dataset by importing loadbreastcancer from "sklearn.dataset". Check the number of samples patients Also, check the number of features for each sample.
b Split the dataset into trainingset, validationset and testset using sklearn. Ratio: ::
c Preprocess 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 in our textbook, you need to make your own class and functions without adopting packages libraries such as "sklearnneuralnetwork".
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 hyperparameters 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
