/**
* Twenty Twenty-Four functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Twenty Twenty-Four
* @since Twenty Twenty-Four 1.0
*/
/**
* Register block styles.
*/
if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) :
/**
* Registers custom block styles.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_block_styles() {
register_block_style(
'core/details',
array(
'name' => 'arrow-icon-details',
'label' => __( 'Arrow icon', 'twentytwentyfour' ),
/*
* Styles for the custom Arrow icon style of the Details block
*/
'inline_style' => '
.is-style-arrow-icon-details {
padding-top: var(--wp--preset--spacing--10);
padding-bottom: var(--wp--preset--spacing--10);
}
.is-style-arrow-icon-details summary {
list-style-type: "\2193\00a0\00a0\00a0";
}
.is-style-arrow-icon-details[open]>summary {
list-style-type: "\2192\00a0\00a0\00a0";
}',
)
);
register_block_style(
'core/post-terms',
array(
'name' => 'pill',
'label' => __( 'Pill', 'twentytwentyfour' ),
/*
* Styles variation for post terms
* https://github.com/WordPress/gutenberg/issues/24956
*/
'inline_style' => '
.is-style-pill a,
.is-style-pill span:not([class], [data-rich-text-placeholder]) {
display: inline-block;
background-color: var(--wp--preset--color--base-2);
padding: 0.375rem 0.875rem;
border-radius: var(--wp--preset--spacing--20);
}
.is-style-pill a:hover {
background-color: var(--wp--preset--color--contrast-3);
}',
)
);
register_block_style(
'core/list',
array(
'name' => 'checkmark-list',
'label' => __( 'Checkmark', 'twentytwentyfour' ),
/*
* Styles for the custom checkmark list block style
* https://github.com/WordPress/gutenberg/issues/51480
*/
'inline_style' => '
ul.is-style-checkmark-list {
list-style-type: "\2713";
}
ul.is-style-checkmark-list li {
padding-inline-start: 1ch;
}',
)
);
register_block_style(
'core/navigation-link',
array(
'name' => 'arrow-link',
'label' => __( 'With arrow', 'twentytwentyfour' ),
/*
* Styles for the custom arrow nav link block style
*/
'inline_style' => '
.is-style-arrow-link .wp-block-navigation-item__label:after {
content: "\2197";
padding-inline-start: 0.25rem;
vertical-align: middle;
text-decoration: none;
display: inline-block;
}',
)
);
register_block_style(
'core/heading',
array(
'name' => 'asterisk',
'label' => __( 'With asterisk', 'twentytwentyfour' ),
'inline_style' => "
.is-style-asterisk:before {
content: '';
width: 1.5rem;
height: 3rem;
background: var(--wp--preset--color--contrast-2, currentColor);
clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z');
display: block;
}
/* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */
.is-style-asterisk:empty:before {
content: none;
}
.is-style-asterisk:-moz-only-whitespace:before {
content: none;
}
.is-style-asterisk.has-text-align-center:before {
margin: 0 auto;
}
.is-style-asterisk.has-text-align-right:before {
margin-left: auto;
}
.rtl .is-style-asterisk.has-text-align-left:before {
margin-right: auto;
}",
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_block_styles' );
/**
* Enqueue block stylesheets.
*/
if ( ! function_exists( 'twentytwentyfour_block_stylesheets' ) ) :
/**
* Enqueues custom block stylesheets.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_block_stylesheets() {
/**
* The wp_enqueue_block_style() function allows us to enqueue a stylesheet
* for a specific block. These will only get loaded when the block is rendered
* (both in the editor and on the front end), improving performance
* and reducing the amount of data requested by visitors.
*
* See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info.
*/
wp_enqueue_block_style(
'core/button',
array(
'handle' => 'twentytwentyfour-button-style-outline',
'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ),
'ver' => wp_get_theme( get_template() )->get( 'Version' ),
'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ),
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_block_stylesheets' );
/**
* Register pattern categories.
*/
if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
/**
* Registers pattern categories.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_pattern_categories() {
register_block_pattern_category(
'twentytwentyfour_page',
array(
'label' => _x( 'Pages', 'Block pattern category', 'twentytwentyfour' ),
'description' => __( 'A collection of full page layouts.', 'twentytwentyfour' ),
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_pattern_categories' );
<p>The post Unit 3 Feature Generation & Feature Selection first appeared on SANDIP KUMAR SINGH.</p>
]]>What Is Data Science?
Data science is an interdisciplinary field that combines statistics, computer science, and
domain knowledge to analyze data and generate actionable insights. It involves collecting,
cleaning, processing, analyzing, and visualizing data to answer questions or solve problems.
Think of it as a modern-day detective work—finding hidden clues in massive piles of
information to uncover the story behind the numbers.
How Data Science Extracts Meaning from Data
Let’s break down how data science turns data into knowledge:
<p>The post Unit 3 Feature Generation & Feature Selection first appeared on SANDIP KUMAR SINGH.</p>
]]><p>The post Unit 2 Data Analysis Process first appeared on SANDIP KUMAR SINGH.</p>
]]>The Data Analytics Process is a structured method to explore, analyze, and interpret data to make better decisions.
1. Define the Problem / Objective
Clearly understand what question you are trying to answer.
Example: Why are sales dropping in the last 3 months?
2. Collect the Data
Gather data from various sources like databases, websites, sensors, or surveys.
Example: Collect sales reports, customer feedback, and market trends.
3. Clean and Prepare the Data
Remove duplicates, fix missing values, and organize data for analysis.
Example: Remove entries with no price or incorrect dates.
4. Analyze the Data
Use statistical tools and programming (like Python, Excel, or R) to find patterns and insights.
Example: Find which product categories have low sales and in which regions.
5. Interpret and Visualize Results
Create charts, graphs, and dashboards to explain findings in a clear way.
Example: Use a bar chart to show the drop in sales per region.
6. Make Decisions / Take Action
Use the insights to improve business strategies, operations, or performance.
Example: Increase marketing in low-performing areas or offer discounts on slow-selling items.
Notes: Data Analytics = Ask → Gather → Clean → Analyze → Visualize → Act
It’s all about turning raw data into smart decisions
“knowledge check in data science”
To check your knowledge in data analytics, you can evaluate your understanding and skills through the following methods:
1. Concept Understanding
Test your knowledge of key topics like:
Example Question:
What is the difference between descriptive and predictive analytics?
2. Tools and Skills
Check your practical knowledge of tools like:
Example Task:
Use Excel to create a dashboard showing sales trends by region.
3. Hands-on Projects
Practice with small datasets to solve real-world problems.
Example Activity:
Analyze a CSV file to find which product had the highest returns.
Exploratory Data Analysis (EDA) – In Brief
Exploratory Data Analysis (EDA) is the process of examining and visualizing data to understand its structure, patterns, and key features before applying any models or making decisions.
Purpose of EDA:
Common EDA Techniques:
| Technique | Purpose | Example Tool |
| Summary Statistics | Mean, Median, Mode, Standard Deviation | Pandas.describe() in Python |
| Data Visualization | Plot graphs for insights | Matplotlib, Seaborn |
| Correlation Analysis | Find relationships between variables | corr() function |
| Value Counts | Frequency of categorical values | value_counts() in Pandas |
You have a dataset of student marks.
Notes: EDA helps you understand your data deeply before applying any machine learning or business decisions.
Type of Exploratory Data Analysis
A Quantitative Analysis Technique
B Graphical Analysis Technique
Quantitative Data Analysis
Quantitative Data Analysis is the process of analyzing numerical data (data that can be measured or counted) using statistical techniques to uncover patterns, relationships, and trends.
Key Features of Quantitative Data:
Example Use-Case:
Suppose we have data on students’ hours studied and exam scores. We want to analyze the relationship between them.
Python Program for Quantitative Data Analysis
# Import necessary libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# Sample dataset
data = {
‘Hours_Studied’: [1, 2, 3, 4, 5, 6, 7, 8, 9],
‘Exam_Score’: [35, 40, 45, 50, 55, 65, 70, 75, 80]
}
# Create DataFrame
df = pd.DataFrame(data)
# 1. View basic statistics
print(“Summary Statistics:\n”, df.describe())
# 2. Calculate correlation
correlation = df[‘Hours_Studied’].corr(df[‘Exam_Score’])
print(“\nCorrelation between hours studied and score:”, correlation)
# 3. Plot the data
plt.figure(figsize=(8,5))
sns.scatterplot(x=’Hours_Studied’, y=’Exam_Score’, data=df)
plt.title(‘Hours Studied vs Exam Score’)
plt.xlabel(‘Hours Studied’)
plt.ylabel(‘Exam Score’)
plt.grid(True)
plt.show()
Graphical Analysis is a method of visualizing data using charts and graphs to identify trends, patterns, outliers, and relationships.
Below are the most commonly used graphical techniques
Python examples:
Histogram
Shows the distribution of a single numeric variable.
import seaborn as sns
import matplotlib.pyplot as plt
data = [55, 60, 61, 62, 65, 65, 66, 68, 70, 75, 80, 85, 90, 95]
sns.histplot(data, bins=5, kde=True)
plt.title(“Histogram of Test Scores”)
plt.xlabel(“Score”)
plt.ylabel(“Frequency”)
plt.show()
Shows the relationship between two numeric variables
import seaborn as sns
df = sns.load_dataset(“iris”)
sns.scatterplot(x=’sepal_length’, y=’sepal_width’, hue=’species’, data=df)
plt.title(“Sepal Length vs Width”)
plt.show()
Compares categorical variables or grouped data.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({
‘Department’: [‘IT’, ‘HR’, ‘Sales’, ‘Marketing’],
‘Employees’: [40, 15, 25, 30]
})
df.plot(kind=’bar’, x=’Department’, y=’Employees’, legend=False)
plt.title(“Number of Employees by Department”)
plt.ylabel(“Employees”)
plt.show()
Displays the percentage or proportion of parts to a whole.
labels = [‘Python’, ‘Java’, ‘C++’, ‘JavaScript’]
sizes = [40, 25, 20, 15]
plt.pie(sizes, labels=labels, autopct=’%1.1f%%’)
plt.title(“Programming Language Usage”)
plt.show()
Shows trends over time.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({
‘Month’: [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’],
‘Revenue’: [1000, 1500, 1300, 1700]
})
plt.plot(df[‘Month’], df[‘Revenue’], marker=’o’)
plt.title(“Monthly Revenue”)
plt.xlabel(“Month”)
plt.ylabel(“Revenue in USD”)
plt.grid(True)
plt.show()
Summary Table:
| Technique | Best For | Python Tool |
| Histogram | Data distribution | seaborn, matplotlib |
| Box Plot | Outliers, spread, quartiles | seaborn |
| Scatter Plot | Relationship between variables | seaborn, matplotlib |
| Bar Chart | Categorical comparison | pandas, matplotlib |
| Pie Chart | Part-to-whole visualization | matplotlib |
| Line Chart | Trend over time | matplotlib, pandas |
In data analytics, the final goal is to extract meaningful insights from data that can help in making informed decisions. Two important outcomes are:
A conclusion summarizes what the data tells us after analysis. It answers:
“What happened?” or “What is happening?”
After analyzing sales data for 12 months:
“Sales increased by 20% in the second half of the year, with the highest revenue in December.”
A prediction uses past data and mathematical models to forecast future outcomes. It answers:
“What is likely to happen next?”
Using student attendance and study hours to predict:
“This student has a 90% chance of scoring above 75% in the exam.”
scikit-learn| Feature | Conclusion | Prediction |
| Based on | Existing data | Existing + future (inference) data |
| Answers | What happened | What will happen |
| Examples | “Most sales happened in June” | “Sales will rise 10% next quarter” |
| Tools | Summary stats, EDA, visuals | Regression, ML models, forecasting |
Unit 3Feature Generation and
<p>The post Unit 2 Data Analysis Process first appeared on SANDIP KUMAR SINGH.</p>
]]><p>The post Unit 1 Introduction to Data Science first appeared on SANDIP KUMAR SINGH.</p>
]]>The Data Science Lifecycle Data science’s lifecycle consists of five distinct stages, each with its own tasks:
Capture: Data Acquisition, Data Entry, Signal Reception, Data Extraction. This stage involves gathering raw structured and unstructured data.
Maintain: Data Warehousing, Data Cleansing, Data Staging, Data Processing, Data Architecture. This stage covers taking the raw data and putting it in a form that can be used.
Process: Data Mining, Clustering/Classification, Data Modeling, Data Summarization. Data scientists take the prepared data and examine its patterns, ranges, and biases to determine how useful it will be in predictive analysis.
Analyze: Exploratory/Confirmatory, Predictive Analysis, Regression, Text Mining, Qualitative Analysis. Here is the real meat of the lifecycle. This stage involves performing the various analyses on the data.
Communicate: Data Reporting, Data Visualization, Business Intelligence, Decision Making. In this final step, analysts prepare the analyses in easily readable forms such as charts, graphs, and reports.
Data Science is the process of collecting, analyzing, and using data to make decisions or predictions. It combines math, statistics, programming, and domain knowledge.
Example:
Key Steps in Data Science
Where is Data Science Used?
Healthcare
Finance
Marketing
Transport
Education
Why Should You Learn It?
Purpose of Data Science
The main purpose of Data Science is to extract useful knowledge and insights from data to help individuals and organizations make better decisions.
Key Purposes of Data Science:
Example: Netflix recommends shows based on your watch history.
Python is a popular programming language used in data science because of its simplicity, readability, and powerful libraries.
Used to store and handle different types of data.
python
CopyEdit
age =25# Integer
price =99.99# Float
name ="Alice"# String
is_valid =True# Boolean
Used to make decisions and repeat tasks.
python
CopyEdit
# If statement
ifage >18:
("Adult")
# Loop
foriinrange(5):
(i)
Reusable blocks of code.
python
CopyEdit
defgreet(name):
return"Hello "+ name
| Library | Purpose |
NumPy | Numerical operations (arrays, math) |
Pandas | Data manipulation (tables, CSVs) |
Matplotlib | Data visualization (charts/graphs) |
Seaborn | Advanced data visualization |
Scikit-learn | Machine learning models |
Used to store and manipulate data in table format (like Excel).
python
CopyEdit
importpandasaspd
data = {"Name": ["John","Alice"],"Age": [28,24]}
df = pd.DataFrame(data)
print(df)
Used to see data trends using charts and graphs.
python
CopyEdit
importmatplotlib.pyplotasplt
x = [1,2,3]
y = [2,4,6]
plt.plot(x, y)
plt.show()
Use libraries like Scikit-learn to train models on data.
python
CopyEdit
fromsklearn.linear_modelimportLinearRegression
model = LinearRegression()
# model.fit(X, y) # Fit model to data
Note : Python is the foundation of modern data science, and knowing its basics — variables, control structures, functions, libraries — is key to starting a successful journey in data analysis and machine learning.
<p>The post Unit 1 Introduction to Data Science first appeared on SANDIP KUMAR SINGH.</p>
]]>