Developing AI Applications
It’s time to get practical about AI. Move past playing around with chatbots and plugging your data into
others’ applications—learn how to create your own! Walk through key AI methods like decision trees, convolutional
layers, cluster analysis, and more. Get your hands dirty with simple no-code exercises and then apply that knowledge
to more complex (but still beginner-friendly!) examples. With information on installing KNIME and using tools like
AutoKeras, ChatGPT, and DALL-E, this guide will let you do more with AI!
- Learn to program your own AI applications—even if you’ve never coded before!
- Get started without code using the KNIME platform and then expand your skills by programming with basic Python
- Work with neural networks, transfer learning, anomaly detection, reinforcement learning, and more
You'll learn about:
- AI Algorithms:
Understand the theory and structure behind the most useful AI models and methods and how they can be used
to solve problems. Learn about artificial neural networks, anomaly detections, cluster analysis, text and image
classification, reinforcement learning, and other algorithms.
- Tools and Platforms:
Install and use AI platforms like KNIME and Anaconda. See how tools like ChatGPT and libraries like XGBoost
can enhance your AI applications.
- Practical Exercises:
Get step-by-step instructions for creating AI applications, whether you’re implementing them with no code
on the KNIME platform or programming them using basic Python.
Key Highlights:
- Python
- KNIME
- ChatGPT
- DALL-E
- Artificial neural networks (ANN)
- Decision trees
- Convolutional layers
- Transfer learning
- Anomaly detection
- Text and image classification
- Cluster analysis
- Reinforcement learning
View Full Table of Contents
- 1 Introduction
- 1.1 What Does This Book Offer?
- 1.2 What Is Artificial Intelligence?
- 1.3 The History of AI: A Brief Overview
- 1.4 Development Tools Used in This Book
- 1.4.1 Python
- 1.4.2 Jupyter Notebook
- 1.4.3 KNIME
- 1.4.4 ChatGPT and GPT-4
- 1.4.5 DALL-E 2 or DALL-E 3
- 2 Installation
- 2.1 Anaconda Distribution
- 2.1.1 Windows and macOS
- 2.1.2 Linux
- 2.1.3 Configuration and Test
- 2.2 KNIME
- 2.2.1 Installation
- 2.2.2 Configuration
- 2.2.3 Test
- 3 Artificial Neural Networks
- 3.1 Classification
- 3.2 The Recipe
- 3.2.1 Data Preparation
- 3.2.2 Building Up the AI
- 3.2.3 Training the AI
- 3.2.4 Testing the AI
- 3.2.5 Using AI
- 3.3 Building ANNs
- 3.4 Structure of an Artificial Neuron
- 3.5 Feed Forward
- 3.6 Back Propagation
- 3.7 Updating the Weights
- 3.8 ANN for Classification
- 3.9 Hyperparameters and Overfitting
- 3.10 Dealing with Nonnumerical Data
- 3.11 Dealing with Data Gaps
- 3.11.1 Filling Empty Cells with Data
- 3.11.2 Removing Rows with Empty Cells
- 3.12 Correlation versus Causality
- 3.13 Standardization of the Data
- 3.14 Regression
- 3.15 Deployment
- 3.15.1 Training, Testing, and Saving
- 3.15.2 Using the ANN Model
- 3.16 Exercises
- 3.16.1 Exercise 1: Hyperparameter Optimization for Classification
- 3.16.2 Exercise 2: Hyperparameter Optimization for Regression
- 3.16.3 Exercise 3: ANN for Classification
- 3.16.4 Exercise 4: ANN for Regression
- 4 Decision Trees
- 4.1 Simple Decision Trees
- 4.1.1 Decision Tree Classifier
- 4.1.2 Decision Tree Regressor
- 4.1.3 Decision Forests
- 4.1.4 Random Forest Classifier
- 4.1.5 Random Forest Regressor
- 4.2 Boosting
- 4.2.1 Gradient Boosting
- 4.2.2 XGBoost Classifier
- 4.2.3 Automatic Hyperparameter Setting Using GridSearchCV
- 4.3 XGBoost Regressor
- 4.4 Deployment
- 4.5 Decision Trees Using Orange
- 4.6 Exercises
- 4.6.1 Exercise 1: XGBoost for Classification
- 4.6.2 Exercise 2: XGBoost for Regression
- 4.6.3 Exercise 3: Automatic Hyperparameter Optimization
- 5 Convolutional Layers and Images
- 5.1 Simple Image Classification
- 5.2 Hyperparameter Optimization Using Early Stopping and KerasTuner
- 5.3 Convolutional Neural Network
- 5.4 Image Classification Using CIFAR-10
- 5.5 Using Pretrained Networks
- 5.6 Exercises
- 5.6.1 Exercise 1: Hyperparameter Optimization for CIFAR-10
- 5.6.2 Exercise 2: Pretrained VGG19 Model
- 6 Transfer Learning
- 6.1 How It Works
- 6.2 Exercises
- 6.2.1 Exercise 1: Rock-Paper-Scissors
- 6.2.2 Exercise 2: Human or Horse
- 7 Anomaly Detection
- 7.1 Unbalanced Data
- 7.2 Resampling
- 7.3 Autoencoders
- 7.4 Exercises
- 7.4.1 Exercise 1: Anomaly Detection Using XGBoost and Upsampling
- 7.4.2 Exercise 2: Anomaly Detection Using an Autoencoder
- 8 Text Classification
- 8.1 Embedding Layer
- 8.2 GlobalAveragePooling1D Layer
- 8.3 Text Vectorization
- 8.4 Analysis of the Relationships
- 8.5 Classifying Large Amounts of Data
- 8.6 Exercises
- 8.6.1 Exercise 1: Hyperparameter Optimization
- 8.6.2 Exercise 2: Text Classification
- 8.6.3 Exercise 3: Text Classification Using Upsampling
- 9 Cluster Analysis
- 9.1 Graphical Analysis of the Data
- 9.2 The k-Means Clustering Algorithm
- 9.3 The Finished Program
- 9.4 Exercises
- 9.4.1 Exercise 1: Grouping of Diamonds
- 9.4.2 Exercise 2: Grouping of Mushrooms
- 10 AutoKeras
- 10.1 Classification
- 10.2 Regression
- 10.3 Image Classification
- 10.4 Text Classification
- 10.5 Exercises
- 10.5.1 Exercise 1: Classification
- 10.5.2 Exercise 2: Regression
- 10.5.3 Exercise 3: Image Classification
- 10.5.4 Exercise 4: Text Classification
- 11 Visual Programming Using KNIME
- 11.1 Simple ANNs
- 11.1.1 Classification
- 11.1.2 Classification Using Python Node
- 11.1.3 Regression
- 11.1.4 Regression Using Python Node
- 11.2 XGBoost
- 11.2.1 Classification
- 11.2.2 Deployment
- 11.2.3 Regression
- 11.3 Image Classification Using a Pretrained Model
- 11.3.1 Image Classification Using Keras Node
- 11.3.2 Image Classification Using Python Node
- 11.4 Transfer Learning
- 11.4.1 Transfer Learning Using Keras Node
- 11.4.2 Transfer Learning Using Python Node
- 11.5 Autoencoder
- 11.5.1 Autoencoder with Keras Node
- 11.5.2 Autoencoder with Python Node
- 11.6 Text Classification
- 11.6.1 Text Classification with Keras Node
- 11.6.2 Text Classification with Python Node
- 11.7 AutoML
- 11.7.1 Installation
- 11.7.2 Classification
- 11.8 Cluster Analysis
- 11.8.1 Manual Cluster Setting
- 11.8.2 Cluster Setting with a Loop
- 11.9 Time Series Analysis
- 11.9.1 Recurrent Neural Networks
- 11.9.2 Long Short-Term Memory
- 11.9.3 Prediction of Energy Consumption (Next Hour) Using Keras Node
- 11.9.4 Prediction of Energy Consumption (Next Hour) Using Python Node
- 11.9.5 Prediction of Energy Consumption (Next 500 Hours) Using Keras Node
- 11.9.6 Prediction of Energy Consumption (Next 500 Hours) Using Python Node
- 11.10 Text Generation
- 11.10.1 Data Preparation
- 11.10.2 Trainings
- 11.10.3 Generation
- 11.11 Further Information on KNIME
- 11.12 Exercises
- 11.12.1 Exercise 1: XGBoost for Classification, Mushrooms
- 11.12.2 Exercise 2: XGBoost for Regression, Diamonds
- 11.12.3 Exercise 3: Image Classification Using InceptionV3
- 11.12.4 Exercise 4: Transfer Learning, Horses or Humans
- 11.12.5 Exercise 5: Anomaly Detection Using an Autoencoder, ECG
- 11.12.6 Exercise 6: Text Classification
- 11.12.7 Exercise 7: AutoML for Regression
- 11.12.8 Exercise 8: Cluster Analysis
- 11.12.9 Exercise 9: Time Series Analysis
- 11.12.10 Exercise 10: Text Generation
- 12 Reinforcement Learning
- 12.1 Q-Learning
- 12.2 Python Knowledge Required for the Game
- 12.2.1 Lists
- 12.2.2 Branches
- 12.2.3 Loops
- 12.2.4 Random Choice
- 12.2.5 Functions
- 12.3 Trainings
- 12.4 Test
- 12.5 Outlook
- 12.6 Exercises
- 12.6.1 Exercise 1: Hyperparameters
- 12.6.2 Exercise 2: Expansion of the Game
- 13 Genetic Algorithms
- 13.1 The Algorithm
- 13.1.1 Start Generation
- 13.1.2 Selection
- 13.1.3 Reproduction
- 13.1.4 Mutation
- 13.1.5 New Generation
- 13.2 Example of a Sorted List
- 13.3 Example of Equation Systems
- 13.4 Real-Life Sample Application
- 13.5 Exercises
- 13.5.1 Exercise 1: Hyperparameter Optimization
- 13.5.2 Exercise 2: System of Equations
- 14 ChatGPT and GPT-4
- 14.1 Prompt Engineering
- 14.1.1 Generating Content
- 14.1.2 Programming
- 14.1.3 Analyzing and Summarizing
- 14.1.4 Final Questions for ChatGPT
- 14.2 The ChatGPT Programming Interface
- 14.2.1 Application Programming Interface Key and First Program
- 14.2.2 Parameters
- 14.2.3 Input Filters
- 14.2.4 Roles
- 14.2.5 Memory
- 14.2.6 User Profiles
- 14.2.7 Playground
- 14.2.8 Speech to Text
- 14.3 Exercise 1: Math Support
- 15 DALL-E and Successor Models
- 15.1 DALL-E 2
- 15.1.1 Prompt Engineering
- 15.1.2 Editing Generated Images
- 15.2 DALL-E 3
- 15.3 Programming Interface
- 15.3.1 Image Creation
- 15.3.2 Image Variations
- 15.3.3 Image Processing
- 15.4 Exercise 1: DALL-E API with Moderation
- 16 Outlook
- Appendices
- A Exercise Solutions
- A.1 Chapter 3
- Exercise 1: Hyperparameter Optimization for Classification
- Exercise 2: Hyperparameter Optimization for Regression
- Exercise 3: ANN for Classification
- Exercise 4: ANN for Regression
- A.2 Chapter 4
- Exercise 1: XGBoost for Classification
- Exercise 2: XGBoost for Regression
- Exercise 3: Automatic Hyperparameter Optimization
- A.3 Chapter 6
- Exercise 1: Rock-Paper-Scissors
- Exercise 2, Part 1: Human or Horse, Training and Testing
- Exercise 2, Part 2: Human or Horse, Application
- A.4 Chapter 7
- Exercise 1: Anomaly Detection Using XGBoost and Upsampling
- Exercise 2: Anomaly Detection Using an Autoencoder
- A.5 Chapter 8
- Exercise 1: Hyperparameter Optimization
- Exercise 2: Text Classification
- Exercise 3: Text Classification Using Upsampling
- A.6 Chapter 9
- Exercise 1: Grouping of Diamonds
- Exercise 2: Grouping of Mushrooms
- A.7 Chapter 10
- Exercise 1: Classification
- Exercise 2: Regression
- Exercise 3: Image Classification
- Exercise 4: Text Classification
- A.8 Chapter 11
- Exercise 1: XGBoost for Classification, Mushrooms
- Exercise 2: XGBoost for Regression, Diamonds
- Exercise 3: Image Classification Using InceptionV3
- Exercise 4: Transfer Learning, “Human or Horse”
- Exercise 5: Anomaly Detection Using an Autoencoder: ECG
- Exercise 6: Text Classification
- Exercise 7: AutoML for Regression
- Exercise 8: Cluster Analysis
- Exercise 9: Time Series Analysis
- Exercise 10: Text Generation
- A.9 Chapter 12
- Exercise 1: Hyperparameters
- Exercise 2: Expansion of the Game
- A.10 Chapter 13
- Exercise 1: Hyperparameter Optimization
- Exercise 2: System of Equations
- A.11 Chapter 14
- A.12 Chapter 15
- Exercise 1: DALL-E API with Moderation
- B References
- C The Author
- Index