Module-6
Module-6
Financial dataset:
Let’s explain this with a simple financial dataset example — imagine we have a dataset
containing monthly financial information for a group of customers:
sns.histplot(data['Monthly_Income'], bins=10)
plt.title("Distribution of Monthly Income")
plt.xlabel("Monthly Income")
plt.ylabel("Number of Customers")
plt.show()
2. Box Plot
4. Pair Plot
5. Correlation Heatmap
2.Bankruptcy Analysis:
Debt Ratio
Current Ratio
Net Profit
Total Assets
Bankrupt Status (Yes/No)
plt.xlabel("Debt Ratio")
plt.ylabel("Number of Companies")
plt.show()
4. Correlation Heatmap
sns.countplot(x='Bankrupt', data=data)
plt.title("Count of Bankrupt vs. Non-Bankrupt Companies")
plt.show()
3.E-bay:
functional Data refers to information collected over a continuum, usually time. Instead of
individual data points, we think of curves — e.g., the price of a product over time during an
auction.
Suppose we track the price evolution over 7 days for 3 items in eBay auctions.
import pandas as pd
import matplotlib.pyplot as plt
# Sample data
days = [1, 2, 3, 4, 5, 6, 7]
item_a = [10, 12, 15, 18, 21, 25, 30]
item_b = [15, 16, 20, 22, 25, 28, 32]
item_c = [5, 7, 10, 15, 17, 18, 20]
# Plot
plt.plot(days, item_a, label='Item A', marker='o')
plt.plot(days, item_b, label='Item B', marker='o')
plt.plot(days, item_c, label='Item C', marker='o')
X-axis: Time
Y-axis: Items
Color intensity: Bid amount or frequency
Visualization tools for insurance risk processes help actuaries and analysts understand and
communicate how risks (like claims, losses, or premiums) behave over time, across
categories, or under uncertainty.
python
CopyEdit
data['Age_Group'] = pd.cut(data['Age'], bins=[20, 40, 60, 80], labels=['20–40', '40–60', '60–
80'])
avg_claim = data.groupby('Age_Group')['Claim_Amount'].mean().reset_index()
If you have time data (e.g., monthly claims), show trends over time.
5.Medical Images:
Visualization and analysis of medical images is a crucial area in medical diagnostics,
research, and treatment planning. It involves the use of software tools and algorithms to
interpret data from imaging modalities such as MRI, CT, X-ray, ultrasound, and PET scans.
Here’s a breakdown of key elements and concepts in this domain.
2. Visualization Techniques
3. Image Analysis
5. Applications
6. Emerging Trends
plt.tight_layout()
plt.show()
Genetic Network Reconstruction is the process of building a network (graph) that shows
relationships or interactions between genes. Each gene is a node, and each interaction
(like co-expression or regulation) is an edge connecting two nodes.
Helps you see relationships between genes that might be hard to spot in raw data
(like correlation matrices or tables).
Makes it easier to identify gene hubs, clusters, or isolated genes.
Some genes regulate many others. These appear as central nodes (hubs).
Hub genes are often critical and can be targets for drugs or therapies.
4. Compare Healthy vs. Diseased Networks
You can build separate networks for healthy and diseased samples, and compare
their structures.
Helps identify dysregulated pathways in diseases like cancer, diabetes, etc.
7. Publication-Ready Visuals
print("Correlation Matrix:")
print(corr_matrix)
threshold = 0.8
# Draw network
plt.figure(figsize=(8, 6))
pos = nx.spring_layout(G, seed=42)
nx.draw(G, pos, with_labels=True, node_color='lightgreen', edge_color='gray',
node_size=1500, font_size=10, font_weight='bold')
plt.title("Genetic Co-expression Network (Threshold > 0.8)")
plt.show()