A notebook that you can run on your own data to explore data analytics, Machine Learning, & Deep Learning.
Machine Learning Notebooks
Kaggle contains thousands of notebooks with machine learning and data science examples to explore and run. Explore and run machine learning code with Kaggle Notebooks | Using data from No attached data sources. A notebook that you can run on your own data to explore data analytics, Machine Learning, & Deep Learning.
One of our favorite Python notebooks is the Classifier Trees notebook that trains and tests an Artificial Neural Network (ANN) classifier to predict the animals that live in a zoo, based on the animal’s genus. We used the zoo data to train the model and then tried to classify a new set of data from the zoo.
The goal of this demo is to have students build a classifier to predict the animal that lives in a zoo based on the animal’s genus.
Zoo Data: We’ve borrowed the data from the zoo
Model: We’ve trained a model using the zoo data. The model is a classifier that takes an input feature vector and outputs a probability that a given animal lives in the zoo. We’ve got one class, called zoo animals, and we’ve built it to predict the right class for animals that we haven’t seen before.
Exercise: Build a classifier to predict the animal that lives in a zoo based on the animal’s genus.
Here is a guide to building a classifier:
Build a classifier
The following image shows how to set up the dataset. We imported the zoo dataset, from GitHub. We’ve imported a pandas DataFrame, so that we can perform operations on the dataset.
We can then create an array of feature vectors, each of which represents one of the columns in the zoo data frame. We then append each row of zoo data to the feature vector.
We can define a function that will compute each feature vector. We use the pandas column function to get each column of the zoo data.
We can use the Column Vectorizer to get each of the zoo’s columns, including the zoo’s identifier (GENUS).
Then we need to select all of the animals that are in the zoo that we’d like to predict the animal that lives in a zoo for.
We want to
Related links:
Yorumlar