<jupyter_start><jupyter_text>Using Machine Learning to Diagnose Breast Cancer in Python by:  <NAME>  1.  Problem Statement:Find a Machine Learning (ML) model that accurately predicts breast cancer based on the 30 features described below.  2.  Background:Features are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image. n the 3-dimensional space is that described in: [<NAME> and <NAME>: "Robust Linear Programming Discrimination of Two Linearly Inseparable Sets", Optimization Methods and Software 1, 1992, 23-34].This database is also available through the UW CS ftp server: ftp ftp.cs.wisc.edu cd math-prog/cpo-dataset/machine-learn/WDBC/Also can be found on UCI Machine Learning Repository: https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+%28Diagnostic%29Attribute Information:1) ID number 2) Diagnosis (M = malignant, B = benign) 3-32)Ten real-valued features are computed for each cell nucleus:a) radius (mean of distances from center to points on the perimeter) b) texture (standard deviation of gray-scale values) c) perimeter d) area e) smoothness (local variation in radius lengths) f) compactness (perimeter^2 / area - 1.0) g) concavity (severity of concave portions of the contour) h) concave points (number of concave portions of the contour) i) symmetry j) fractal dimension ("coastline approximation" - 1)The mean, standard error and "worst" or largest (mean of the three largest values) of these features were computed for each image, resulting in 30 features. For instance, field 3 is Mean Radius, field 13 is Radius SE, field 23 is Worst Radius.All feature values are recoded with four significant digits.Missing attribute values: noneClass distribution: 357 benign, 212 malignant  3.  Import Libraries<jupyter_code>import warnings
import os # Get Current Directory
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import accuracy_score, precision_score, recall_score
import pandas as pd # data processing, CSV file I/O (e.i. pd.read_csv)
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import joblib
from time import time
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.neural_network import MLPClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import GradientBoostingClassifier
from xgboost import XGBClassifier
from sklearn.decomposition import PCA
from scipy import stats
import subprocess<jupyter_output><empty_output><jupyter_text>3.  Hide Warnings<jupyter_code>warnings.filterwarnings("ignore")
pd.set_option('mode.chained_assignment', None)<jupyter_output><empty_output><jupyter_text>4. Get Current Directory<jupyter_code>currentDirectory=os.getcwd()
print(currentDirectory)<jupyter_output>/Users/stevensmiley/Desktop/GraduateSchool/Python/PythonCodes/NeuralNetworks/Homework4<jupyter_text>5. Import and View Data<jupyter_code>#data= pd.read_csv('/kaggle/input/breast-cancer-wisconsin-data/data.csv')
data=os.path.join(currentDirectory,'data.csv')
data= pd.read_csv(data)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0701210052745889, 'fraction_numerical': 0.013962147067949116, 'mean_word_length': 6.27765237020316, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '620241', 'license': 'Apache-2.0', 'n_tokens_mistral': 987, 'n_tokens_neox': 908, 'n_words': 349, 'path': '.ipynb', 'repo_name': 'stevensmiley1989/Kaggle-WisconsinBreastCancer', 'size': '3248'}