"""
<h2>Breast Cancer data review for beginners</h2>
"""
"""
It is formed by the uncontrolled proliferation of the constituent cells on the milk duct in the breast tissue.
"""
"""
We can list the main symptoms of breast cancer as follows::
* Painless, firm, movement, usually in the breast
* Visible change in breast size or shape.
* Bloody or bloodless discharge from the nipple.
* Painful or painless swelling under the armpits that is noticeable by hand
"""
"""
*The features in the data set are as follows*
"""
"""
* diagnosis = M or B(malignant or benign)
* radius = distances from center to points on the perimeter
* texture 
* perimeter 
* area_mean 
* smoothness = local variation in radius lengths
* compactness =  (perimeter^2 / area - 1.0)
* concavity=  the effect of concave parts of the contour
* concave points = number of concave portions of the contour
* symmetry 
* fractal_dimension = ("coastline approximation" - 1)
"""
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv
import matplotlib.pyplot as plt
import seaborn as sns
data = pd.read_csv("/kaggle/input/breast-cancer-wisconsin-data/data.csv")
data.head()
"""
When we examine the output,some things might attract attention;
* id -We cannot be used for classificaiton
* Diagnosis- That's feature is a class label.Expresses whether patients are benign or malignant 
* Unnamed:32 - We don't need this because it's all Nan values

Then we can drop these not important features for this 'Practice'
"""
"""
> **Before we drop it we can do some analysis**
"""
sns.countplot(x='diagnosis', data=data,)
diag = data.diagnosis
list = ['Unnamed: 32','id','diagnosis']
cancer = data.drop(list,axis=1)
cancer.head()
"""
As you can see, now we only have numerical data.
"""
"""
<h2> Correlation </h2>

It allows us to make a comparison between quantitative values according to their effect on each other.
"""
"""
![clip_image0011](https://fisherdong.files.wordpress.com/2011/03/clip_image0011.jpg)
"""
"""
> From:[https://fisherdong.wordpress.com/2011/03/25/positive-and-negative-correlation/](https://fisherdong.wordpress.com/2011/03/25/positive-and-negative-correlation/)
"""
"""
* >  1 indicates a perfect positive correlation.
* > -1 indicates a perfect negative correlation.
* >  0 tells that there is no relation between the two values.
"""
cancer.corr()
"""
* *Colleration breast cancer dataset*
"""
"""
<h3>
    Filtering with logical and: </h3>
"""
cancer[np.logical_and(cancer["area_mean"] > 250, cancer["area_worst"] < 350)]
"""
# Data Visulatization
"""
"""
Matplotlib is the most popular data visualization library in Python. 
It allows us to create figures and plots, and makes it very easy to produce static raster.Some plots: Scatter,Line,Histogram

"""
f,ax = plt.subplots(figsize=(18,18))
sns.heatmap(cancer.corr(),annot=True , linewidths =.5, fmt = ".1f", ax=ax)
plt.show()
"""
* *Colleration Heatmap*
"""
"""
<h2> Bar Plot </h2>
"""
"""
The  diagnosis chart we examined at first let's examine it this way
 We can see full value with an extra counter
"""
data_frame = pd.DataFrame(data)
data_frame['diagnosis'].value_counts().plot(kind='bar', alpha=0.5, figsize=(12,7))
plt.title("Bar Plot with Diagnosis Values")
plt.xlabel("Diagnosis Values")
plt.ylabel("Number of Values")
plt.show()
"""
<h2> Scatter Plot </h2>
"""
cancer.plot(kind='scatter', x='smoothness_mean', y='smoothness_worst', grid=True, alpha=0.5, color="blue", figsize=(12, 7))
plt.title("Scatter Plot with Smoothness")
plt.xlabel("smoothness_mean")
plt.ylabel("smoothness_worst")
plt.show()
"""
<h2> LinePlot </h2>
"""
cancer.smoothness_mean.plot(kind='line', color='red', alpha=0.5, label="smoothness_mean", grid=True, linestyle=":", figsize=(12,7))
cancer.smoothness_worst.plot(kind='line', color='blue', alpha=0.7, label= "smoothness_worst.plot", grid=True ,linestyle="-.")
plt.title("Line Plot with Smoothness")
plt.legend()
plt.show()
"""
<h2>Histogram</h2>
"""
data_frame['fractal_dimension_mean'].value_counts().plot(kind='hist', color='g', alpha=0.5, figsize=(12,7))
plt.xlabel("Fractal_Dimension_Mean")
plt.show()