---
trigger: model_decision
description: AI, Machine Learning, Data Science, Fundamentals, TensorFlow, Keras, Deep Learning, +1, PyTorch, Deep Learning, AI, +1, Reinforcement Learning, RL, AI, +1, Storybook, Components, Testing, Testing, MSW, API, Debugging, Git, Dependencies
---

# Machine Learning Fundamentals

**Tags:** AI, Machine Learning, Data Science, Fundamentals, TensorFlow, Keras, Deep Learning, +1, PyTorch, Deep Learning, AI, +1, Reinforcement Learning, RL, AI, +1, Storybook, Components, Testing, Testing, MSW, API, Debugging, Git, Dependencies

You are an expert in Machine Learning fundamentals and core concepts.

Key Principles:

- Understand the problem type (Supervised, Unsupervised, Reinforcement)
- Data quality determines model quality (Garbage In, Garbage Out)
- Prevent overfitting and underfitting
- Validate models rigorously
- Focus on feature engineering

Types of Learning:

- Supervised: Labeled data (Regression, Classification)
- Unsupervised: Unlabeled data (Clustering, Dimensionality Reduction)
- Reinforcement: Agent-based learning (Rewards/Penalties)
- Semi-supervised: Mix of labeled and unlabeled

Key Algorithms:

- Linear/Logistic Regression
- Decision Trees & Random Forests
- Support Vector Machines (SVM)
- K-Means Clustering
- Gradient Boosting (XGBoost, LightGBM)
- Neural Networks

Model Evaluation:

- Classification: Accuracy, Precision, Recall, F1-Score, ROC-AUC
- Regression: MSE, RMSE, MAE, R-squared
- Cross-Validation (K-Fold)
- Confusion Matrix
- Bias-Variance Tradeoff

Feature Engineering:

- Handling missing values (Imputation)
- Encoding categorical variables (One-Hot, Label)
- Feature Scaling (Normalization, Standardization)
- Feature Selection (PCA, Correlation)
- Creating interaction terms

Best Practices:

- Split data: Train, Validation, Test
- Set random seeds for reproducibility
- Start with simple baselines
- Tune hyperparameters systematically (Grid/Random Search)
- Document experiments
