Hands-On Artificial Intelligence with Java for Beginners
eBook - ePub

Hands-On Artificial Intelligence with Java for Beginners

Build intelligent apps using machine learning and deep learning with Deeplearning4j

Nisheeth Joshi

  1. 144 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Hands-On Artificial Intelligence with Java for Beginners

Build intelligent apps using machine learning and deep learning with Deeplearning4j

Nisheeth Joshi

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Build, train, and deploy intelligent applications using Java libraries

Key Features

  • Leverage the power of Java libraries to build smart applications
  • Build and train deep learning models for implementing artificial intelligence
  • Learn various algorithms to automate complex tasks

Book Description

Artificial intelligence (AI) is increasingly in demand as well as relevant in the modern world, where everything is driven by technology and data. AI can be used for automating systems or processes to carry out complex tasks and functions in order to achieve optimal performance and productivity.

Hands-On Artificial Intelligence with Java for Beginners begins by introducing you to AI concepts and algorithms. You will learn about various Java-based libraries and frameworks that can be used in implementing AI to build smart applications.

In addition to this, the book teaches you how to implement easy to complex AI tasks, such as genetic programming, heuristic searches, reinforcement learning, neural networks, and segmentation, all with a practical approach.

By the end of this book, you will not only have a solid grasp of AI concepts, but you'll also be able to build your own smart applications for multiple domains.

What you will learn

  • Leverage different Java packages and tools such as Weka, RapidMiner, and Deeplearning4j, among others
  • Build machine learning models using supervised and unsupervised machine learning techniques
  • Implement different deep learning algorithms in Deeplearning4j and build applications based on them
  • Study the basics of heuristic searching and genetic programming
  • Differentiate between syntactic and semantic similarity among texts
  • Perform sentiment analysis for effective decision making with LingPipe

Who this book is for

Hands-On Artificial Intelligence with Java for Beginners is for Java developers who want to learn the fundamentals of artificial intelligence and extend their programming knowledge to build smarter applications.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Hands-On Artificial Intelligence with Java for Beginners è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Hands-On Artificial Intelligence with Java for Beginners di Nisheeth Joshi in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Artificial Intelligence (AI) & Semantics. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781789531022

Exploring Search Algorithms

In this chapter, we'll look at how to perform a search, and we will cover the basic requirements of implementing a search algorithm. We'll then practice by implementing Dijkstra's algorithm, before moving on to heuristics, showing how they can be used in search algorithms to improve the accuracy of search results.
In particular, we'll be focusing on the following topics:
  • An introduction to searching
  • Implementing Dijkstra's search
  • Understanding the notion of heuristics
  • A brief introduction to the A* algorithm
  • Implementing an A* algorithm

An introduction to searching

Let's look at what it means to search. If we want to apply a search to any problem, we will need four pieces of input, which are referred to as the state space, and are as follows:
[S, s, O, G]
The preceding types of input can be described as follows:
  • S: A set of implicitly given states—all of the states that might be explored in a search process.
  • s: The start symbol—the starting point of the search.
  • O: The state transition operators, which indicate how a search should proceed from one node to the next and what transitions are available to the search. This is an exhaustive list. Therefore, the state transition operator keeps track of these exhaustive lists.
  • G: The goal node, pointing to where the search should end.
With the preceding information, we can find the following values:
  • The minimum cost transaction for a goal state
  • A sequence of transitions to a minimum cost goal
  • A minimum cost transaction for a minimum cost goal
Let's consider the following algorithm, which assumes that all operators have a cost:
  1. Initialize: Set OPEN = {s},
CLOSE = {}, Set C(s) = 0
  1. Fail: If OPEN = {}, Terminate with Failure
  2. Select: Select the minimum cost state, n, form OPEN, and Save n in CLOSE
  3. Terminate: If n ∈ G, Terminate with Success
  4. Expand: Generate the successors of n using 0
For each successor, m, insert m in OPEN only if m ∉ [OPEN ∪ CLOSE]
Set C(m) = C(n) + C(n,m)
and insert m in OPEN
if m ∈ [OPEN ∪ CLOSE]
Set C(m) = min{ C(m), C(n) + C(m,n)}
If C(m) has decreased and m ∈ CLOSE move it to OPEN
  1. Loop: Go to Step 2
Each state of the preceding algorithm can be described as follows:
  1. Initialize: We initialize the algorithm and create a data structure called OPEN. We put our start state, s, into this data structure, and create one more data structure, CLOSE, which is empty. All of the states that we'll be exploring will be taken from OPEN and put into CLOSE. We set the cost of the initial start state to 0. This will calculate the cost incurred when traveling from the start state to the current state. The cost of traveling from the start state to the start state is 0; that's why we have set it to 0.
  2. Fail: In this step, if OPEN is empty, we will terminate with a failure. However, our OPEN is not empty, because we have s in our start state. Therefore, we will not terminate with a failure.
  1. Select state: Here, we will select the minimum cost successor, n, and we'll take it from OPEN and save it in CLOSE.
  2. Terminate: In this step, we'll check whether n belongs to the G. If yes, we'll terminate with a success.
  3. Expand: If our n does not belong to G, then we need to expand G by using our state transition operator, as follows:
    • If it is a new node, m, and we have not explored it, it means that it is not available in either OPEN or CLOSE, and we'll simply calculate the cost of the new successor (m) by calculating the cost of its predecessor plus the cost of traveling from n to m, and we'll put the value into OPEN
    • If it is a part of both OPEN and CLOSE, we'll check which one is the minimum cost—the current cost or the previous cost (the actual cost that we had in the previous iteration)—and we'll keep that cost
    • If our m gets decreased and it belongs to CLOSE, then we will bring it back to OPEN
  4. Loop: We will keep on doing this until our OPEN is not empty, or until our m does not belong to G.
Consider the example illustrated in the following diagram:
Initially, we have the following algorithm:
n(S) = 12 | s = 1 | G = {12}
In the preceding algorithm, the following applies:
  • n(S) is the number of states/nodes
  • s is the start node
  • G is the goal node
The arrows are the state transition operators. Let's try running this, in order to check that our algorithm is working.
Iteration 1 of the algorithm is as follows:
Step 1: OPEN = {1}, C(1) = 0 | CLOSE = { }; here C(1) is cost of node 1
Step 2: OPEN ≠ { }; go to Step 3
Step 3: n = 1 | OPEN = { } | CLOSE = {1}
Step 4: Since n ∉ G; Expand n=1
We get m = {2, 5}
{2} ∉ [OPEN ∪ CLOSE] | {5} ∉ [OPEN ∪ CLOSE]
C(2) = 0 + 2 = 2 | C(5) = 0 + 1 = 1 | OPEN = {2,5}
Loop to Step 2
Iteration 2 is as follows:
Step 2: OPEN ≠ { } so Step 3
Step 3: n = 5 since min{C(2),C(5)}...

Indice dei contenuti

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Introduction to Artificial Intelligence and Java
  7. Exploring Search Algorithms
  8. AI Games and the Rule-Based System
  9. Interfacing with Weka
  10. Handling Attributes
  11. Supervised Learning
  12. Semi-Supervised and Unsupervised Learning
  13. Other Books You May Enjoy
Stili delle citazioni per Hands-On Artificial Intelligence with Java for Beginners

APA 6 Citation

Joshi, N. (2018). Hands-On Artificial Intelligence with Java for Beginners (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/800671/handson-artificial-intelligence-with-java-for-beginners-build-intelligent-apps-using-machine-learning-and-deep-learning-with-deeplearning4j-pdf (Original work published 2018)

Chicago Citation

Joshi, Nisheeth. (2018) 2018. Hands-On Artificial Intelligence with Java for Beginners. 1st ed. Packt Publishing. https://www.perlego.com/book/800671/handson-artificial-intelligence-with-java-for-beginners-build-intelligent-apps-using-machine-learning-and-deep-learning-with-deeplearning4j-pdf.

Harvard Citation

Joshi, N. (2018) Hands-On Artificial Intelligence with Java for Beginners. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/800671/handson-artificial-intelligence-with-java-for-beginners-build-intelligent-apps-using-machine-learning-and-deep-learning-with-deeplearning4j-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Joshi, Nisheeth. Hands-On Artificial Intelligence with Java for Beginners. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.