zero_to_hero_ML / pages /Machine learning VS Deep Learning.py
ankithpatel's picture
Update pages/Machine learning VS Deep Learning.py
46ffc42 verified
raw
history blame
2.7 kB
import streamlit as st
# HTML code for a differences table
html_code = """
<table style="width: 100%; border-collapse: collapse; border: 1px solid black;">
<tr style="background-color: #f2f2f2;">
<th style="border: 1px solid black; padding: 10px; text-align: center;">Aspect</th>
<th style="border: 1px solid black; padding: 10px; text-align: center;">Machine Learning (ML)</th>
<th style="border: 1px solid black; padding: 10px; text-align: center;">Deep Learning (DL)</th>
</tr>
<tr>
<td style="border: 1px solid black; padding: 10px;">Definition</td>
<td style="border: 1px solid black; padding: 10px;">A subset of AI focused on enabling systems to learn from data.</td>
<td style="border: 1px solid black; padding: 10px;">A subset of ML that uses neural networks to process data.</td>
</tr>
<tr style="background-color: #f9f9f9;">
<td style="border: 1px solid black; padding: 10px;">Data Dependency</td>
<td style="border: 1px solid black; padding: 10px;">Performs well on small to medium-sized datasets.</td>
<td style="border: 1px solid black; padding: 10px;">Requires large datasets to perform effectively.</td>
</tr>
<tr>
<td style="border: 1px solid black; padding: 10px;">Model Complexity</td>
<td style="border: 1px solid black; padding: 10px;">Uses simple algorithms like linear regression or decision trees.</td>
<td style="border: 1px solid black; padding: 10px;">Utilizes complex architectures like CNNs and RNNs.</td>
</tr>
<tr style="background-color: #f9f9f9;">
<td style="border: 1px solid black; padding: 10px;">Computation Power</td>
<td style="border: 1px solid black; padding: 10px;">Less computationally intensive.</td>
<td style="border: 1px solid black; padding: 10px;">Highly computationally intensive, often requires GPUs.</td>
</tr>
<tr>
<td style="border: 1px solid black; padding: 10px;">Feature Engineering</td>
<td style="border: 1px solid black; padding: 10px;">Feature engineering is essential for performance.</td>
<td style="border: 1px solid black; padding: 10px;">Automatically learns features from data.</td>
</tr>
<tr style="background-color: #f9f9f9;">
<td style="border: 1px solid black; padding: 10px;">Applications</td>
<td style="border: 1px solid black; padding: 10px;">Fraud detection, recommendation systems, etc.</td>
<td style="border: 1px solid black; padding: 10px;">Image recognition, natural language processing, etc.</td>
</tr>
</table>
"""
# Render the HTML in Streamlit
st.markdown(html_code, unsafe_allow_html=True)