I only need to use numpy library for this project I am not allowed any external library except panda and numpy. and work should be done in Jupyter notebook This project asks you to implement a logistic regression classifier, and apply it on a real data set. We use the Breast Cancer Wisconsin dataset from UCI machine learning repository: http://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+%28Diagnostic%29 Data File: breast-cancer-wisconsin.data (class: 2 for benign, 4 for malignant) Data Metafile: breast-cancer-wisconsin.names we have seen that logistic regression is a convex problem, and gradient descent gives the optimal parameters. However, the efficiency is highly dependent on the step length which is left for users to tune. In this assignment, we look at a faster solution called Newton’s method (a.k.a. Newton-Raphson method), which avoids the use of step length. Please implement Newton-Raphson algorithm for logistic regression (i.e., to minimize the cross- entropy loss as discussed in class), and run it over the Breast Cancer Wisconsin dataset. Please randomly sample 80% of the training instances to train a classifier and then testing it on the remaining 20%. Ten such random data splits should be performed and the average over these 10 trials is used to estimate the generalization performance. Please submit: (1) your source code (or Jupyter notebook file) that TA should be able to (compile and) run, and the pre-processed dataset if any; (2) a report on a program checklist, how you accomplish the project, and the result of your classification. Hint: you can use sklearn’s LogisticRegression to verify if you get the same accuracy. I have the following code till now- https://cdn.livechat-files.com/api/file/lc/att/3070322/f6d1df317f0555dac2d59345f2ea971b/Mini_project3_wisconsin_breast_cancer_datasets_now%20%281%29%20%281%29.ipynb Please write a new code or fix this one for me. Need o
I only need to use numpy library for this project
I am not allowed any external library except panda and numpy. and work should be done in Jupyter notebook
This project asks you to implement a logistic regression classifier, and apply it on a real
data set.
We use the Breast Cancer Wisconsin dataset from UCI machine learning repository:
http://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+%28Diagnostic%29
Data File: breast-cancer-wisconsin.data (class: 2 for benign, 4 for malignant)
Data Metafile: breast-cancer-wisconsin.names
we have seen that logistic regression is a convex problem, and gradient
descent gives the optimal parameters. However, the efficiency is highly dependent on
the step length which is left for users to tune. In this assignment, we look at a faster
solution called Newton’s method (a.k.a. Newton-Raphson method), which avoids the
use of step length.
Please implement Newton-Raphson
entropy loss as discussed in class), and run it over the Breast Cancer Wisconsin dataset.
Please randomly sample 80% of the training instances to train a classifier and then
testing it on the remaining 20%. Ten such random data splits should be performed and
the average over these 10 trials is used to estimate the generalization performance.
Please submit: (1) your source code (or Jupyter notebook file) that TA should be able to (compile and) run, and the pre-processed dataset if any; (2) a report on a program checklist, how you accomplish the project, and the result of your classification. Hint: you can use sklearn’s LogisticRegression to verify if you get the same accuracy.
I have the following code till now-
https://cdn.livechat-files.com/api/file/lc/att/3070322/f6d1df317f0555dac2d59345f2ea971b/Mini_project3_wisconsin_breast_cancer_datasets_now%20%281%29%20%281%29.ipynb
Please write a new code or fix this one for me. Need original solution
Trending now
This is a popular solution!
Step by step
Solved in 2 steps