# AI - Guild :::info [TOC] ::: ![image](https://hackmd.io/_uploads/S1c3a7jvge.png) <br/> ## What's AI? **Artificial Intellogence (AI)** is a branch of Computer Science that is concerned with building **smart & intelligent** Machines. - **Non-Intelligent Machines**: Machines that cannot make decisions or try things on their own. They work only on strict instructions. e.g: watch、bike ... - **Intelligent Machines**: Like ChatGPT、Google Assistant、autonomous cars... They make people feel as if it is a human being and perform tasks with smarter decisions. <br/> ### A. Machine Learning **Machine Learning (ML)** is a technique to implement AI that can learn from experiences (data) by themselves ++without being explicitly programmed++. - ![Machine-Learning-Techniques](https://hackmd.io/_uploads/rJ0NbNjwge.png) - **Types of ML** | Supervised Learning | Unsupervised Learning | Reinforcement Learning | |-|-|-| | ML algorithm learns from **Labelled Data**. | ML algorithm learns from **Unabelled Data**. | Iintelligent agents take actions in an environment to **maximize its rewards**. | | e.g: Use labelled fruit pictures to train ML to distinguish them. | e.g: Use fruit pictures to train ML to group the pictures itself without prerequisites. | Main Aspects:<br/>1. Environment<br/>2.Agent<br/>3. Action<br/>4. Reward | - **Supervised Learning**: 1. ++Classification++: Predicting a class or **discrete values**. - Eg: Male/Female; Apple/Orange; True/False a. ==Decision Tree Classification== b. ==Random Forest Classification== c. ==K-nearest Neighbor== 2. ++Regression++: Predicting a quantity or **continuous values**. - Eg: Salary; Age; Price; Temperature. a. ==Logistic Regression== b. ==Polynomial Regression== c. ==Support Vector Machines== > - **Semi-Supervised Learning** - **Unsupervised Learning**: 1. ++Clustering++: Grouping the similar data points. a. ==K-Means Clustering== b. ==Hierarchical Clustering== 2. ++Association++: Find important relationship between data points. a. ==Apriori== b. ==Eclat== 4. ++Dimensionality Reduction++: ==Principal Component Analysis (PCA)== <br/> ### B. Deep Learning **Deep Learning (DL)** is a ++subfield of Machine Learning++ that uses **Artificial Neural Networks** to learn hierarchical representations from data (from low-level to high-level features). - ![image](https://hackmd.io/_uploads/SyPgZ4svel.png) - **Common Architectures**: | Type | Description | Example Use Case | |-|-|-| | ==**Feedforward Neural Network (FNN)**== | Basic ANN with input → hidden → output layers. | Simple classification tasks. | | ==**Convolutional Neural Network (CNN)**== | Extracts spatial features using convolution layers. | Image recognition, object detection. | | ==**Recurrent Neural Network (RNN)**== | Processes sequential data, remembers previous states. | Time-series forecasting, language modeling. | | ==**Long Short-Term Memory (LSTM)**== | Specialized RNN for long-term dependencies. | Speech recognition, translation. | | ==**Generative Adversarial Network (GAN)**== | Two networks compete: generator vs discriminator. | Image generation, data augmentation. | | ==**Transformer**== | Attention-based architecture, replaces RNNs in NLP. | Machine translation, Chatbots, LLMs. | - **Applications**: 1. **++Computer Vision (CV)++**: image classification, object detection, medical plots. 2. **++Natural Language Processing (NLP)++**: sentiment analysis, chatbots/translation. 3. **++Speech & Audio++**: speech recognition, voice synthesis. 4. **++Autonomous Systems++**: self-driving cars, robotics. 5. **++Generative AI++**: image synthesis, text-to-image, music generation. <br/> ## Conclusion ![image](https://hackmd.io/_uploads/rJkYYSiwxl.png) <br/> ### 🤖 Machine Learning (ML) - Features require **manual design and selection**, depending on the expertise of engineers or data scientists. - **Heavily relies on domain knowledge**. - Allows **explicit control over the number and type of features**. - ++Example++: Image recognition, features like colors, shapes must be manually extracted. - **Advantages**: - Transparent feature process with high interpretability. - Suitable for small datasets and low computational resources. - **Disadvantages**: - **May miss important or subtle features**. - Performance depends on the quality of manually crafted features. <br/> ### 🧠 Deep Learning (DL) - Features are **automatically learned and extracted by the model** (end-to-end). - **Minimal need for manual feature engineering**; just provide raw data. - Feature dimensionality and complexity are **automatically determined by the NN**. - ++Example++: CNN automatically learns edges → textures → high-level semantic features. - **Advantages**: - Can directly handle raw inputs such as images, speech, and text. - Highly effective, especially for complex tasks and large datasets. - **Disadvantages**: - Training requires more time, **large data**, and **high computational power**. - Feature learning is not transparent; **interpretability is low**. <br/> ### 📝 Tabulate Comparison #### A. Definition | Category | Machine Learning (ML) | Deep Learning (DL) | |-|-|-| | Core | Algorithms learn from data to make predictions | Neural networks with multiple layers learn features automatically | | Relationship | A subset of AI | A subset of ML | | Data Amount | Less data needed (thousands) | Requires large datasets (millions) | | Feature Engineering | Manual feature extraction needed | Learns features automatically (e.g., CNN for images) | <br/> #### B. Training and Model | Category | Machine Learning (ML) | Deep Learning (DL) | |-|-|-| | Examples | SVM, Decision Trees, KNN, Random Forest | CNN, RNN, Transformer, GAN | | Training | Usually faster | Slower (needs GPU) | | Model Depth | Shallow or moderate depth | Deep (nonlinear layers) | | Interpretability | Easier to explain | Hard to interpret (black box) | | Complexity | Lower | Higher | <br/> #### C. Application Areas | Use Case | ML Preferred ✅ | DL Preferred ✅ | |-|-|-| | Tabular data (finance, health) | ✅ | ⚠️ (mostly overkill) | | Image/speech recognition | ⚠️ (needs feature design) | ✅ (e.g., CNN, RNN) | | Natural Language Processing | ⚠️ (BoW, TF-IDF) | ✅ (e.g., BERT, GPT) | | Small datasets | ✅ | ⚠️ (prone to overfitting) | :::success - **ML** is better when data is limited, interpretability matters, or for structured data. - **DL** excels in complex tasks like vision and NLP, but needs more compute and data. ::: <br/> ## Related Modules ### 1️⃣ [Python 基礎語法系列](/rirdIkdWRh6Thlx93gJ6YQ) ### 2️⃣ [Python - Numpy](/ckWTq6gBQR6xJovnlF5ZVg) ### 3️⃣ [Python - Pandas](/AhWjfIcIReqHAQcfSe1Qcw) ### 4️⃣ [Python - Pyplot](/Q4zQ9_z1TjuyyvqsEY7p_g) > - ++**[📊 Python - Plotly Official Website](https://plotly.com/python/)**++ > - ++**[🐟 Python - Seaborn Official Website](https://seaborn.pydata.org/)**++ <!-- 🧩 Python - Scikit-learn 🔬 Python - Scipy 📒 Jupyter Notebook Guild 📦 Python Env Management (conda/venv) 🌐 Streamlit / Dash Guild --> <br/> ## Continue Reading :::info ⏭️ Next Chapter: &nbsp; **[AI - Collecting Data](/Rb_Yvhh0Rdq3SADF6z7APA)** ::: <br/> :::spoiler Relevant Resource [Machine Learning Course With Python](https://www.youtube.com/watch?v=bY__YW-xknU&list=PLfFghEzKVmjsNtIRwErklMAN8nJmebB0I) [Deep Learning Tutorial Videos](https://www.youtube.com/watch?v=6M5VXKLf4D4&list=PLEiEAq2VkUUIYQ-mMRAGilfOKyWKpHSip) :::