Book Image

Artificial Intelligence and Machine Learning Fundamentals

By : Zsolt Nagy
Book Image

Artificial Intelligence and Machine Learning Fundamentals

By: Zsolt Nagy

Overview of this book

Machine learning and neural networks are pillars on which you can build intelligent applications. Artificial Intelligence and Machine Learning Fundamentals begins by introducing you to Python and discussing AI search algorithms. You will cover in-depth mathematical topics, such as regression and classification, illustrated by Python examples. As you make your way through the book, you will progress to advanced AI techniques and concepts, and work on real-life datasets to form decision trees and clusters. You will be introduced to neural networks, a powerful tool based on Moore's law. By the end of this book, you will be confident when it comes to building your own AI applications with your newly acquired skills!
Table of Contents (10 chapters)
Artificial Intelligence and Machine Learning Fundamentals
Preface

Lesson 4: Classification


Activity 7: Preparing Credit Data for Classification

This section will discuss how to prepare data for a classifier. We will be using german.data from https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/, as an example and prepare the data for training and testing a classifier. Make sure all your labels are numeric, and the values are prepared for classification. Use 80% of the data points as training data.

data_frame_encoded.head()
CheckingAccountStatus  DurationMonths  CreditHistory  CreditPurpose  \
0                      0               6              4              4   
1                      1              48              2              4   
2                      3              12              4              7   
3                      0              42              2              3   
4                      0              24              3              0   

   CreditAmount  SavingsAccount  EmploymentSince  DisposableIncomePercent  \
0...