Day 1-Assignment
Day 1-Assignment
CRISP-ML(Q) Session-1
1) What are the 4 stages of analytics? Define them.
ANS: - The 4 levels of analytics, additionally known as stages or types, can be understood as a sequential procedure
that enables extract insights from information. They are:
Descriptive Analytics: This is the most primary stage and answers the question "What came about?". It specializes in
summarizing and describing beyond activities the usage of information aggregation and visualization techniques like
charts, graphs, and primary reports. For instance, a sales file displaying total sales by way of location could be
descriptive analytics.
Diagnostic Analytics: Once you recognize "what befell," you may delve deeper into "why" it took place. This is the
role of diagnostic analytics. It includes analyzing the records to pick out the root causes and reasons in the back of
the patterns observed inside the descriptive level. Techniques like records mining and drill-downs are used to find
those reasons.
Predictive Analytics: This degree is going beyond the past and gift to predict destiny results. It uses ancient data,
statistical fashions, and device studying algorithms to forecast tendencies and count on what would possibly
manifest. Businesses can use this to predict patron churn, product call for, or marketplace fluctuations.
Prescriptive Analytics: This is the maximum advanced stage and takes analytics a step similarly by means of no longer
only predicting the future but additionally suggesting movements to optimize it. It leverages the insights from
preceding ranges to advocate the first-rate path of motion based at the expected outcomes. This allows corporations
make information-driven decisions and acquire their dreams.
2. Data Preparation
3. Modeling
4. Evaluation
5. Deployment
1. Store Data: Efficiently store large amounts of structured and unstructured data.
2. Retrieve Data: Allow for quick and precise retrieval of data using queries.
3. Manage Data: Provide tools for data management, including updates, deletions, and insertions.
4. Ensure Data Integrity: Maintain data accuracy, consistency, and integrity through constraints and validation rules.
5. Support Transactions: Enable transaction management to ensure that operations are completed successfully and
maintain data consistency.
7. Backup and Recovery: Provide mechanisms for data backup and recovery to prevent data loss.
8. Facilitate Data Sharing: Enable multiple users and applications to access and share data concurrently.
9. Support Analytics: Provide support for data analysis, reporting, and business intelligence operations.
10. Scale: Handle increasing amounts of data and user loads efficiently.
#Creating a Table
USE my_database;
#Then, create a table within that database. For example, creating a table called ‘employees’:
• Variable names:
Python
message = "Hello, world!" # This is valid
MESSAGE = "Hello, world!" # This would cause an error
In the first example, message and MESSAGE are considered different variables. Assigning a value to message
doesn't affect MESSAGE.
• Keywords:
Python
if age > 18: # This is valid
If age > 18: # This would cause an error (If is not a keyword)
Python has reserved keywords that have specific meanings in the language. These keywords are also case-sensitive.
Using an uppercase version of a keyword would be interpreted as a variable name, leading to an error.
• Functions:
Python
def greet(name): # This is a function definition
Greet(name) # This would cause an error (Greet is not defined)
Function names are also case-sensitive. You need to call the function using the exact name it was defined
with.
• Built-in functions:
Python
print("This is printed") # This is valid
Print("This is printed") # This would cause an error (Print is not a function)
Built-in functions in Python are also case-sensitive. Using an uppercase version of a built-in function would result in
an error.
Here are some additional tips for creating good variable names:
• Use lowercase with underscores for separation: This is the most common convention in Python
(PEP 8 style guide). For example, customer_name, total_amount.
• Avoid single-letter variable names: Unless the variable is used in a very specific context (like loop
counters), it's better to use more descriptive names.
• Don't use variable names that might be confused with built-in functions: For example, avoid using
len as a variable name because it's already a built-in function that calculates length.