facebook
analogicx 2

Deep Learning, Python for data science and NumPy Library

 

  Deep Learning will generate their features in which the outcome will depend on our time. Deep Learning basically follows the human brain, it is implemented by the Neural network with multiple hidden layers. These hidden layers are present in between input and output and all the nodes are interconnected.

                  Deep Learning has Artificial Neural Networks (ANN) and Convolution Neural Networks (CNN)

Artificial Neural Networks (ANN): Artificial Neural network (ANN) is inspired from biological neural networks. In ANN the network is interconnected of neurons which send messages to each other. The three main parts of ANN are input layer, hidden layers and output layer.

Convolution Neural Networks (CNN): Convolution Neural Networks (CNN) is maz only used for the recognition, detection and classifications of images. CNN performs with the Convolution Layer, it is the first layer to extract features from an input image and then it connects to the Pooling Layer which reduces the number of parameters when the images are too large.

PYTHON FOR DATA SCIENCE:

              Python is a high level, Object-Oriented, and interpreted programming language. In Data Science we use Python because it is easy to learn, readable, simple and productive. Python Basics are Data Structures, Data objects, comparison operators, condition statements, loops. Python contains libraries used for the storing, manipulating and gaining insight from the data. The NumPy library includes arrays for effective and manipulation of the array data, it is also used for slicing, splitting of arrays. The Pandas library features the DataFrame for effective storage and manipulation of labelled data in Python. The Matplotlib library includes capabilities for a flexible range of data visualisations in Python. The Scikit Learn library for effective and clean Python implementations of most important Machine Learning Algorithms.

           Python Programming is mostly used in Exploratory Data Analysis which includes Data cleaning, Data Wrangling and Study of Data.

Deep learning is a subset of Machine Learning, which is a neural network with three or more layers (input layer, hidden layers and output layer or multiple hidden layers). These neural networks mimic the behaviour of the human brain in matching machine ability by allowing it to learn from large amounts of data. A Neural Network with a single layer can still make approximate predictions, additional hidden layers can help to get a good accuracy. The idea followed by Neural Network is the biological neurons, which is nothing but a brain cell. Deep learning is capable enough to focus on the accurate features themselves by requiring a little guidance from the programmer and is very helpful in solving the problem of dimensionality. Deep learning consists of a series of levels and each level learns how to translate its input data into an output data. It improves automation performing analytical and physical tasks without human intervention. Deep learning technology is used in everyday products and services (such as image recognizing, voice-controlled assistants, self-driving, and automatic machine translation).

analogicx 1                  

                 Deep Learning has Artificial Neural Networks (ANN) and Convolution Neural Networks (CNN) 

Artificial Neural Networks (ANN): Artificial Neural network (ANN) is inspired from biological neural networks. In ANN the network is interconnected of neurons which send messages to each other. The three main parts of ANN are input layer, hidden layers and output layer.

                      analogicx 2

Convolution Neural Networks (CNN): Convolution Neural Networks (CNN) is mainly used for the recognition, detection and classifications of images. CNN  performs with the Convolution layer it is the first layer to extract features from an input image and then it connects to Pooling Layer which reduce the number of parameters when the images are too large.

  analogicx 3                     

NumPy Library:

                 NumPy is a general array processing package. It provides a high-performance Multidimensional array Objects. It is also used for slicing, splitting of arrays.

                 NumPy is also called Numerical Python.

Array: An Array is a data structure that stores the same data type values.

Importing NumPy Package:

                 : import numpy as np

There are types of Arrays we have in NumPy are,

  1. Single dimensional Array
  2. Multi-dimensional Array

Single dimensional Array: It is a one-dimensional array in which it has the values in a list form.

  • Example:

                             Input import numpy  as np

        list= [1,2,3,4,5,6,7,8]

       array= np.array(list)

                                       array

                          Output array([1,2,3,4,5,6,7,8])

Multi-dimensional Array: It is a two-dimensional array consisting of Rows and Columns.

  • Example:

             Input import numpy as np

                           list1= [1,2,3,4,5]

                           list2= [6,7,8,9,10]

                           list3= [11,12,13,14,15]

                           array=np.array([list1,list2,list3])

                           array

              Output array([[1,2,3,4,5]

                                 [6,7,8,9,10]

                                      [11,12,13,14,15]])

Indexing:

Index is the position of the element in the array it starts with [0,1,2,3,…..] and ends with (n-1).

 Accessing the elements in a one-dimensional array.

        Input array=np.array([1,2,3,4,5,6,7,8])

                                   array[5]

                      Output 6

 Accessing the elements in a two-dimensional array.

      Input list1= [1,2,3,4,5]

                list2= [6,7,8,9,10]

                list3= [11,12,13,14,15]

                 array=np.array([list1,list2,list3])

                 array

            array([[1,2,3,4,5]

                         [6,7,8,9,10]

                             [11,12,13,14,15]])

                  array[0:2,0:3]

     Output ([[1,2,3]

                     [6,7,8]])

Shape and Reshape the array

                     Shape

                              Input list= [1,2,3,4,5,6,7,8]

                                            list.shape

                           Output (8,)

                 Reshape

                            Input list=[1,2,3,4,5,6,7,8]

                                    list.reshape(4,2)

                          Output  array([[1, 2],

                                                  [3, 4],

                                                 [5, 6],

                                                       [7, 8]])

Arange Function

                     Arange function – Returns evenly spaced values within a specified interval. In the Arange function it starts with a starting interval and ends with n-1 (ending interval -1).

    Example1:

               Input np.arange(0,10)

           Output array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

From the above example the Arange function is used from 0 to 10, here the starting interval is 0 and the ending interval is 10(10-1=9).

    Example2:

               Input np.arange(0,10,2)

            Output array([0,2,4,6,8])

From the above example the Arange function is used from 0 to 10, here 0 is the starting interval, 10(10-1=9) is the ending interval and 2 is the difference between each interval.

 

Zero Function

                    Generate an array of zeros in a shape format. It is used to fill missing values as 0.

              Example:

                           Input np.zeros(5)

                             Output array([0., 0., 0., 0., 0.])

 

Ones Function

               Generate an array of zeros in a shape format. It is used to fill missing values as 1.

             Example:

                           Input np.zeros(5)

                            Output array([1., 1., 1., 1., 1.])

 

Eye Function

                 Eye function is used as an identity matrix. It has 1s on the main diagonal and 0s everywhere else.

              Example:

                           Input np.eye(3)

                            Output array([[1,0,0],

                                                     [0,1,0],

                                                [0,0,1]])

 

Random Values

                   In Random values we create the values in the array randomly. There are three types of functions in which we create random values.

1.rand

2.randn

3.randint

 

1.rand: In the rand function the random values will be from 0 to 1.

          Example:

                        Input np.random.rand(3,3)

                    Output           array([[0.71544634,0.9854276,0.1245647],

     [0.74444068, 0.32485052, 0.129093],

     [0.6132502 , 0.73053308, 0.13096518]])

 

2.randn: In the randn function the random values will be from -3 to +3.

         Example:

                        Input np.random.randn(3,3)

 

 

                      Output 

array([[ 2.03213373,0.79684743,-2.045678],

      [-0.3553177 ,0.24102131,0.5383766],

      [ 1.80663228,0.89103173,2.6657473]])

 

3.randint: In the randint function the random values will be from specified intervals.

         Example1:

                      Input np.random.randint(4,100)

                  Output  56

         Example2:

                      Input np.random.randint(3,16,3)

                  Output array([3,6,9,12,15])

 

Min and Max

              To find the minimum and maximum values in the array.

         Example for min:

                     Input c=[1,2,3,4,5,6,7,8]

                                c.min()

                  Output 1

        Example for max:

                     Input c=[1,2,3,4,5,6,7,8]

                                c.max()

                  Output 8

 

                    

Leave a Comment

Your email address will not be published. Required fields are marked *

Analogicx

FREE
VIEW