Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Artificial Intelligence with Python

You're reading from   Artificial Intelligence with Python A Comprehensive Guide to Building Intelligent Apps for Python Beginners and Developers

Arrow left icon
Product type Paperback
Published in Jan 2017
Publisher Packt
ISBN-13 9781786464392
Length 446 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Prateek Joshi Prateek Joshi
Author Profile Icon Prateek Joshi
Prateek Joshi
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Introduction to Artificial Intelligence FREE CHAPTER 2. Classification and Regression Using Supervised Learning 3. Predictive Analytics with Ensemble Learning 4. Detecting Patterns with Unsupervised Learning 5. Building Recommender Systems 6. Logic Programming 7. Heuristic Search Techniques 8. Genetic Algorithms 9. Building Games With Artificial Intelligence 10. Natural Language Processing 11. Probabilistic Reasoning for Sequential Data 12. Building A Speech Recognizer 13. Object Detection and Tracking 14. Artificial Neural Networks 15. Reinforcement Learning 16. Deep Learning with Convolutional Neural Networks

Building a Perceptron based classifier

A Perceptron is the building block of an artificial neural network. It is a single neuron that takes inputs, performs computation on them, and then produces an output. It uses a simple linear function to make the decision. Let's say we are dealing with an N-dimension input data point. A Perceptron computes the weighted summation of those N numbers and it then adds a constant to produce the output. The constant is called the bias of the neuron. It is remarkable to note that these simple Perceptrons are used to design very complex deep neural networks. Let's see how to build a Perceptron based classifier using NeuroLab.

Create a new Python file and import the following packages:

import numpy as np 
import matplotlib.pyplot as plt 
import neurolab as nl 

Load the input data from the text file data_perceptron.txt provided to you. Each line contains space separated numbers where the first two numbers are the features and the last number is the label...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime