11.04.2024 Views

Thinking-data-science-a-data-science-practitioners-guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16 1 Data Science Process

Fig. 1.12 Hyper-parameter

tuning process

Model Building Using ANN

As you know, the design of ANN comes from the structure of a human brain. Like

our brain, the ANN comprises several layers, each layer containing several nodes

(neurons in our brain). We show a typical ANN architecture in Fig. 1.13.

Your job while designing an ANN architecture is to decide on the number of

layers, the type of connections between the layers, and the number of nodes in each

layer. We show the complete workflow for ANN development in Fig. 1.14.

After you define the architecture, feed the data to the network; let it propagate

through the network and produce some results. Based on these results, the network

will do the back propagation to fine-tune the hyper parameters (the weights assigned

to each link). This is again an iterative process and after several training iterations,

so-called epochs in ML terms, the network will provide you with a good level of

accuracy. If the accuracy scores are not acceptable, try feeding in more data for

training so that the network understands your data better. If this does not work, go

back to the drawing board and adjust the number of layers, number of nodes in each

layer, the optimization algorithms and the error functions that you have previously

set for network learning, and so on. I will describe this entire process when I discuss

the model development based on ANN in later chapters.

Though you may design your own ANN architecture for small applications and

medium-sized datasets, creating a huge architecture is not simple. Such architectures

are resource intensive and require training times spanning over several weeks. Image

recognition and object detection models like R-CNN and YOLO were developed on

complex architectures requiring enormous resources and training times. Such networks

are called deep neural networks. Can we use their pre-trained models for our

own purpose? The answer to this question is a big yes.

Models Based on Transfer Learning

To understand the term transfer learning, let me take an example. We have

pre-trained image classification models that can detect a dog in an image. What if

I want to know about the dog’s breed? Such models, as they detect hundreds of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!