### Using a Perceptron to Classify Mushrooms as Edible or Poisonous
In this Notebook, we'll be using the mushroom classification dataset, which you can find here https://www.kaggle.com/uciml/mushroom-classification to train a Perceptron to determine whether a mushroom is edible (e) or poisonous (p), based its physical characteristics.
%% Cell type:code id: tags:
``` python
#load the dataset
data=pd.read_csv("./dataset/mushrooms.csv")
data=pd.read_csv("./datasets/mushrooms.csv")
```
%% Cell type:code id: tags:
``` python
#check out its features
data.head()
```
%% Output
class cap-shape cap-surface cap-color bruises odor gill-attachment \
Now, let's just pick the 'class_e' feature. This means if the Perceptron returns a value of 1, then the mushroom is edible. If it returns 0, then the mushroom is poisonous. Let's also pick 'gill_size_b', because the only other value it can be is 'gill_size_n', which means the gill size will be broad when it = 1, and narrow when it = 0. We'll pick all the colours to train on.
C:\Users\Andreas Shepley\Anaconda3\lib\site-packages\sklearn\linear_model\stochastic_gradient.py:166: FutureWarning: max_iter and tol parameters have been added in Perceptron in 0.19. If both are left unset, they default to max_iter=5 and tol=None. If tol is not None, max_iter defaults to max_iter=1000. From 0.21, default max_iter will be 1000, and default tol will be 1e-3.