
Developing AI Applications
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- Focus on beginner-friendly no-code solutions to lower barriers and accelerate learning speed
- Step-by-step integration of advanced AI models like ChatGPT and DALL-E through real coding examples
Book DescriptionThis book opens with a clear introduction to AI fundamentals, covering its history and key concepts while guiding readers through installing essential tools like KNIME and AutoKeras. It begins by building a strong foundation in artificial neural networks and decision trees, enabling readers to grasp core AI methods. The journey then advances to convolutional layers for image classification, transfer learning, and anomaly detection, offering practical, beginner-friendly examples. As the reader progresses, the book explores text classification, cluster analysis, and automated AI model creation with AutoKeras. Visual programming with KNIME is introduced to simplify complex AI workflows. Further chapters cover reinforcement learning and genetic algorithms, expanding the reader's skill set and preparing them for more advanced challenges. Hands-on exercises throughout reinforce concepts and practical application. In its final chapters, the guide dives into cutting-edge AI tools by demonstrating how to leverage ChatGPT and DALL-E APIs, including prompt engineering and API programming. It concludes with an outlook on the future of AI, equipping readers with the knowledge and confidence to build and deploy their own AI-powered applications from start to finish.What you will learn - Understand core AI concepts and foundational neural network designs
- Install and configure key AI tools like KNIME and AutoKeras
- Build and train decision trees with boosting for better accuracy
- Develop convolutional neural networks for image classification
- Apply transfer learning techniques to enhance AI model results
- Use ChatGPT and DALL-E APIs to create innovative AI applications
Who this book is forIdeal for beginner to intermediate AI enthusiasts, developers, and data scientists interested in practical AI application development. Readers should have basic programming knowledge, ideally in Python, and an understanding of fundamental AI concepts. No prior experience with no-code AI tools is necessary, but familiarity with data analysis basics will be helpful. The book is suited for learners eager to transition from theory to hands-on AI development using accessible software and APIs.
All prices
More details
Content
- Cover
- 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
- Exercise 1: Math Support
- A.12 Chapter 15
- Exercise 1: DALL-E API with Moderation
- B: References
- C: The Author
- Index
1.4 Development Tools Used in This Book
Many programming languages, libraries, and tools are available for developing AIs. Here is a brief introduction to the selection used in this book. Nothing is installed or programmed yet.
1.4.1 Python
The Python programming language is both very easy to learn and very powerful. Even during development, great importance was attached to readability, platform independence, and simple structures. Even if you program on Windows, the program can then be run on a Linux computer or macOS. These advantages have led to it becoming one of the most popular programming languages of all. In the world of data science and AI, Python has become the de facto standard. As already mentioned, this book isn't intended as an introduction to the Python programming language. For us, it's only a means to an end. The following Python statements are intended to illustrate the simplicity. We won't start programming until the installation has been completed in the next chapter.
The standard "Hello World" example looks like this:
print("Hello World!")The print function can be used to output data to the console, in this case, "Hello World!". We can also save this character combination (string data type) in a variable first and then output it:
output = "Hello World!"print(output)
Data Types
The most elementary data types in Python are as follows:
-
Strings (character strings), which are written in single or double quotation marks (e.g., "Hello World!")
-
Integers (e.g., 72)
-
Floats (floating-point numbers, e.g., 3.14)
Certain operations are possible depending on the data type. String data such as "Hello" and "World" can be combined to form "Hello World". Integer or float data can be offset against each other, for example, 3 × 8.
We'll only introduce other data types when they are required to solve a specific task.
The same variable can also be reused for an integer (integer data type) or floating-point number (float data type). Python variables can store objects of any type:
output = "Hello World!"print(output)
output = 42
print(output)
output = 42.2
print(output)
Listing 1.1 Variables with Python
Here, "Hello World!", 42, and 42.2 are output one after the other. Now let's take a look at a supposedly more complicated program:
# Setting the age to 20age = 20
# Query whether the person is of legal age
if age >= 18:
print("You are of legal age!")
else:
print("You are not yet of legal age!")
Listing 1.2 If-Else Structure with Python
The # character introduces comments that can help when reading the code, and these lines aren't executed. The number 20 is stored in the age variable. You'll then be asked whether the age is greater than or equal to 18. If that is the case (as in this example), the corresponding output is generated. The else branch is skipped, and the program is ended. Let's clarify the following questions:
-
What effect would it have if the value 16 were stored in the age variable? Answer: The if branch would be skipped, and the else branch would be executed. The output would read "You are not yet of legal age!"
-
In some countries you're only of legal age at 21. What changes are necessary to this program? Answer: In the if query, the comparison is made with the number 21 instead of 18.
-
Can the change to the age of majority query be described as "programming" or as a "configuration"? You can argue about that if you have nothing better to do.
As you can see, it's quite easy to trace the source code in Python.
1.4.2 Jupyter Notebook
We need software into which we can type the Python commands. This software is used for programming, execution, and testing. Software of this type is called an integrated development environment (IDE). There are numerous very good IDEs available for Python. However, simple Jupyter Notebooks (open source) have established themselves in data science and AI development. The program is programmed in the browser and usually consists of a single file. To install and configure Python and Jupyter Notebook (and many other tools if required), we'll use the free Anaconda distribution, which was developed for this purpose. It's available for Windows, Linux and macOS. Using Anaconda you can set up simple development environments locally on a PC or centrally on a server. The advantage of the server version is that you can easily program in Jupyter Notebook from multiple clients via a browser. No further installation is necessary on these clients. However, if instead of using your own server, you want to use one provided by Anaconda in the cloud, you'll have to pay for it.
Development Environment
An IDE provides important tools that support you in programming. This includes the automatic recognition and completion of commands, auto-correction, and helpful hints in the event of programming errors.
1.4.3 KNIME
The KNIME Analytics Platform software takes a completely different approach in that programming is carried out using graphical blocks, which are dragged and dropped into the workspace, linked together, and configured. This is also known as visual programming.
KNIME is based on Eclipse, a widely used development environment for various programming languages. It's open source, free of charge, and platform-independent.
The following example shows a program that reads the contents of an Excel file and plots the numerical values in a graph (see Figure 1.1).
You can see the output of the Line Chart module in Figure 1.2. For this purpose, right-click on the block after executing it, and then click on View: Line Chart.
If the data source isn't an Excel file, but instead a database or comma-separated values (CSV) file, for example, you only need to replace the Excel Reader module.
Figure 1.1 Loading an Excel File and Plotting the Contents
Figure 1.2 Plotting the Contents
1.4.4 ChatGPT and GPT-4
Let's just ask ChatGPT (or its successor GPT-4) itself who or what it is:
User: Who or what are you? Explain it to me as if I were 12 years old.
Answer: Of course! Imagine I'm like an extremely advanced computer program that can answer questions. You can think of me a bit like an interactive encyclopedia or a digital interlocutor who knows a lot of information.
I am not really a person and have no thoughts or feelings of my own. I am a tool created by humans to answer questions and provide information based on what was known until 2021.
You can try out this chatbot from OpenAI at https://chat.openai.com. We'll take a closer look at this impressive tool later on in this book.
1.4.5 DALL-E 2 or DALL-E 3
DALL-E 2 and its successor DALL-E 3 are based on the ChatGPT model, which has been adapted for text-to-image synthesis. The name is derived from Salvador Dali (important surreal artist) and WALL-E (Pixar film robot).
You can use this tool (https://labs.openai.com) to generate images from textual descriptions (see Figure 1.3).
User: The image of a programmer sitting on an airplane and programming on a laptop.
Figure 1.3 Image Generated by DALL-E 3
...System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.