-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDatascience Intro
106 lines (92 loc) · 5.74 KB
/
Datascience Intro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
WEEK1, DAY1
Q1: What are transformers?
Transformers are a type of deep learning model architecture that has revolutionized the field of natural language processing (NLP) and other domains like computer vision.
Q2: List all the subsets of artificial intelligence and provide examples.
1. Machine learning: Supervised Learning, Unsupervised Learning, Reinforced Learning.
2. Natural Language Processing: Chatbots, Sentiment Analysis, Text Summarization.
3. Vision: Object Detection, Facial Recognition
4. Robotics: Industrial Robots, Autonomous Drones
5. Speech Recognition
6. Expert system: Medical Diagnosis Systems, Financial Advisory Systems.
Q3: What Is an IDE?
Integrated Development Environment (IDE) is a software application that provides comprehensive facilities to programmers for software development. It combines several tools into a single graphical user interface (GUI) to streamline the coding process. IDEs are designed to increase productivity by offering features like code editing, debugging, and project management in one place.
WEEK1, DAY2
Q1: What is a while loop
A while loop is a control flow statement in programming that allows you to repeatedly execute a block of code as long as a specified condition is True. The purpose of a while loop is to automate repetitive tasks and iterate over a block of code until a certain condition is met.
Key Characteristics of a While Loop:
1: Condition-based iteration.
2: Pre-condition check.
3: Flexibility.
Q2: What is the difference between Return statement and print statement
The return statement is used within a function to exit the function and return a value to the caller. This value can be assigned to a variable or used in further expressions. The return statement is essential for functions that need to provide a result to the calling code.
The print statement is a built-in function in Python that outputs data to the console. It is primarily used for displaying information to the user or for debugging purposes. Unlike the return statement, print does not affect the flow of the program or return any value
In Python, we may use the print statements to display the final output of a code on the console, whereas the return statement returns a final value of a function execution which may be used further in the code
WEEK 1, DAY3
Q1: List all python operators.
Arithmetic Operators:
• + : Addition
• - : Subtraction
• * : Multiplication
• / : Division
• % : Modulus
• ** : Exponentiation
• // : Floor Division
Comparison Operators:
• == : Equal to
• != : Not equal to
• > : Greater than
• < : Less than
• >= : Greater than or equal to
• <= : Less than or equal to
Assignment Operators:
• = : Assign
• += : Add and assign
• -= : Subtract and assign
• *= : Multiply and assign
• /= : Divide and assign
• %= : Modulus and assign
• **= : Exponentiation and assign
• //= : Floor division and assign
Logical Operators:
• and : Logical AND
• or : Logical OR
• not : Logical NOT
Bitwise Operators:
• & : Bitwise AND
• | : Bitwise OR
• ^ : Bitwise XOR
• ~ : Bitwise NOT
• << : Bitwise left shift
• >> : Bitwise right shift
Membership Operators:
• in : Evaluates to True if it finds a variable in the specified sequence
• not in : Evaluates to True if it does not find a variable in the specified sequence
Identity Operators:
• is : Evaluates to True if the variables on either side of the operator point to the same object
• is not : Evaluates to True if the variables on either side of the operator do not point to the same object
WEEK 1, DAY 4
Q1: Define homoscedasticity and why it's important in analysis.
Homoscedasticity is a pivotal concept in regression analysis that plays a substantial role in evaluating the trustworthiness of regression models. It denotes the assumption that the variance of the errors (residuals) remains constant across all levels of the independent variable(s). Put simply, it signifies that the dispersion of residuals stays consistent, enhancing the accuracy and legitimacy of regression predictions.
Q2: What is the difference between a boxplot and a countplot?
Purpose of a boxplot: Used to display the distribution of numerical data based on quartiles. It is particularly useful for identifying outliers and understanding the spread and skewness of the data.
Purpose of a countplot: Used to display the count of observations in each categorical bin using bars. It is essentially a bar plot for categorical data.
Key Differences
Feature Boxplot Countplot
Data Type Numerical data Categorical data
Purpose Shows distribution, spread, and outliers Shows count of observations per category
Visualization Boxes, whiskers, and outliers Bars representing counts
X-Axis Can be categorical or numerical Categorical
Y-Axis Numerical (represents data values) Numerical (represents counts)
Use Case Analyzing spread, skewness, and outliers Counting occurrences in categories
• Use a Boxplot when:
You want to analyze the distribution of numerical data.
You need to identify outliers or compare distributions across categories.
• Use a Countplot when:
You want to visualize the frequency of observations in categorical data.
You need to compare the number of occurrences across different categories.
Q3: What distribution usually has the same mean, median, and mode?
A distribution where the mean, median, and mode are all the same is typically a perfectly symmetrical distribution. The most common example of such a distribution is the normal distribution (also known as the Gaussian distribution or bell curve).
Normal Distribution
• Shape: Symmetrical and bell-shaped.
• Mean, Median, and Mode: All three measures of central tendency are equal and located at the center of the distribution.
• Example: Heights or weights of a large population often follow a normal distribution.