0% found this document useful (0 votes)
2 views3 pages

05_Data_Science_Introduction

Data science integrates statistics, programming, and domain knowledge to derive insights from data through a structured workflow including data collection, cleaning, analysis, modeling, evaluation, and communication. Key statistical concepts and tools such as Python libraries and SQL are essential for data manipulation and visualization. Machine learning techniques, including supervised and unsupervised learning, enhance the ability to predict outcomes and recognize patterns in data.

Uploaded by

shelinmuthoni38
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

05_Data_Science_Introduction

Data science integrates statistics, programming, and domain knowledge to derive insights from data through a structured workflow including data collection, cleaning, analysis, modeling, evaluation, and communication. Key statistical concepts and tools such as Python libraries and SQL are essential for data manipulation and visualization. Machine learning techniques, including supervised and unsupervised learning, enhance the ability to predict outcomes and recognize patterns in data.

Uploaded by

shelinmuthoni38
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Data Science

An overview of core concepts, tools, and workflows in data science.

1. What Is Data Science?

Data science combines statistics, programming, and domain expertise to extract insights and build
predictive models from data. The typical workflow follows these stages:

1. Data Collection – gathering raw data (databases, APIs, files, sensors)


2. Data Cleaning – handling missing values, duplicates, and errors
3. Exploratory Data Analysis (EDA) – understanding patterns and relationships
4. Modeling – applying statistical or machine learning methods
5. Evaluation – measuring model performance
6. Communication – presenting insights via visualizations and reports

2. Key Statistical Concepts

Concept Description

Mean Average of values

Median Middle value when sorted

Mode Most frequent value

Standard Deviation Measure of spread around the mean

Correlation Strength of relationship between two variables (-1 to 1)

Distribution How values are spread (e.g., normal/bell curve)

3. Common Tools

Python with libraries:


pandas – data manipulation
numpy – numerical computing
matplotlib / seaborn – visualization
scikit-learn – machine learning
SQL – querying structured databases
Jupyter Notebooks – interactive coding and documentation

4. Working with Data (Pandas Example)

import pandas as pd

df = pd.read_csv("[Link]")
[Link]() # preview first rows
[Link]().sum() # check missing values
[Link](inplace=True) # remove missing rows
df["revenue"].mean() # compute average
[Link]("region")["sales"].sum() # aggregate by category
5. Data Visualization

Visualization helps identify patterns and communicate findings: - Bar chart – comparing
categories - Line chart – trends over time - Scatter plot – relationship between two variables -
Histogram – distribution of a single variable - Box plot – spread and outliers

import [Link] as plt


[Link](df["age"], bins=20)
[Link]("Age")
[Link]("Frequency")
[Link]()

6. Introduction to Machine Learning

Machine learning enables computers to learn patterns from data rather than being explicitly
programmed.

Types: - Supervised Learning: model learns from labeled data (e.g., predicting house prices
from features → regression; classifying emails as spam/not spam → classification) - Unsupervised
Learning: model finds patterns in unlabeled data (e.g., customer segmentation via clustering) -
Reinforcement Learning: model learns via trial and error with rewards (e.g., game-playing
agents)

Simple example — Linear Regression:

from sklearn.linear_model import LinearRegression

model = LinearRegression()
[Link](X_train, y_train) # train on features X, target y
predictions = [Link](X_test)

7. Model Evaluation

Task Common Metrics

Regression Mean Squared Error (MSE), R² score

Classification Accuracy, Precision, Recall, F1-score

Clustering Silhouette score

Overfitting occurs when a model performs well on training data but poorly on new data. Mitigate
with more data, simpler models, regularization, or cross-validation.

8. Practice Exercise

Given a dataset of student study hours and exam scores, outline the steps to build a model
predicting scores: 1. Load and clean the data (check for missing values/outliers). 2. Visualize the
relationship (scatter plot of hours vs. score). 3. Split data into training and test sets. 4. Train a
linear regression model. 5. Evaluate using MSE and R² on the test set.

Summary

Data science blends statistics, programming, and visualization to turn raw data into actionable
insight, with machine learning extending this into predictive and pattern-recognition capabilities.

You might also like