Module 1 DAP
Module 1 DAP
Data Analysis
Computer science gives you the tools for data analysis, so you can say
that the statistics provide the concepts that form the basis of data
analysis.
Among the most commonly used statistical techniques in data analysis
are
• Bayesian methods
• Regression
• Clustering
Example:Machine Learning and Artificial Intelligence
● One of the most advanced tools that falls in the data analysis
camp is machine learning.
● Machine learning is a discipline that uses a whole series of
procedures and algorithms that analyze the data in order to
recognize patterns, clusters.
● Then extracts useful information for data analysis in an
automated way.
Understanding the Nature of the Data
Data are the events recorded in the world. Anything that can be
measured or categorized can be converted into data.
• Model validation/test
• Predictive modeling
• Deploy - Visualization and interpretation of results
• •Model validation/test
Deploy - Deployment of the solution
● Generally, you will refer to the data as the training set when
you are using them for building the model, and as the
validation set when you are using them for validating the
model.
Deployment
Deployment
Qu
● Data analysis is completely focused on data,depending on the
nature of the data.
● When the analyzed data have a strictly numerical or
categorical structure, then you are talking about quantitative
analysis,
● when you are dealing with values that are expressed through
descriptions in natural language, then you are talking about
qualitative analysis.
Cont..
Figure 1-2. Shows the differences between the two types of analysis.
Chapter-2
Introduction to the Python
● Each time you press the Enter key, the interpreter begins to
scan the code (either a row or a full file of code) token by
token (called tokenization).
Cont..
● These tokens are fragments of text that the interpreter arranges
in a tree structure.
● The process chain ends with the bytecode that will be executed
by a Python virtual machine (PVM). See Figure 2-1.
• The Cython project is based on creating a compiler that
translates Python code into C.
Python 2 Python 3
Example Code
• Example code
def main():
def main():
print "Hi! This is Python 2"
print ("Hi! This is Python 3")
if __name__== "__main__":
if __name__== "__main__":
main()
main()
Installing Python
Make Calculations
• You have already seen that the print() function is useful for
printing almost anything.
Cont..
• Start a session on the Python shell and begin to perform these
mathematical operations:
>>> 1 + 2
3
>>> (1.045 * 3)/4
0.78375
>>> 4 ** 2 16
Import New Libraries and Functions
Cont..
• You saw that Python is characterized by the ability to extend its
functionality by importing numerous packages and modules.
Data Structure
Indentation
Example:
IPython
• The IPython shell, which is a powerful interactive shell
resulting in a greatly enhanced Python terminal.
• The IPython Notebook, which is a web interface that allows
you to mix text, executable code, graphics, and formulas in a
single representation.
• As you can see, a particular prompt appears with the value In
[1]. This means that it is the first line of input.
EX:In [1]: print("Hello World!")
Hello World!
In [2]: 3/2
Out[2]: 1.5
Cont..
Jupyter Notebook
● Ndarray
● Element-wise computation
● Reading-writing datasets
● Integration with other languages
Cont..
Pandas
● This package provides complex data structures and functions