글

3.2.4 Feature Engineering and Selection

이미지
Feature engineering is the process of transforming raw data into meaningful inputs for machine learning models. It often involves creating, encoding, and scaling features so that models can learn effectively. Good features can significantly improve model accuracy and reduce training time. Feature selection, by contrast, is choosing a subset of those features that are most relevant. This reduces dimensionality, avoids overfitting, and simplifies models. In practice, feature engineering and selection are iterative and domain-specific; they combine automated transforms with human insight. Both traditional machine learning (ML) and deep learning (DL) benefit from careful feature handling, but their emphasis differs. Classical ML usually requires substantial manual feature design (e.g. creating aggregated statistics, one-hot encodings, or engineered combinations). Deep learning models can often learn feature representations from raw data (e.g. convolutional filters that detect edge...

3.2.3 Overfitting and Underfitting

이미지
One of the core challenges in machine learning is building models that generalize well to new, unseen data. If a model is too simplistic, it may underfit the data, failing to capture important patterns. Conversely, if a model is too complex, it may overfit the training data, learning noise or spurious details that don’t generalize. Achieving the right balance between underfitting and overfitting is crucial for predictive performance on test data. In this post, we’ll explain what overfitting and underfitting mean, explore their mathematical underpinnings (including training/validation loss curves and the bias–variance decomposition), and illustrate examples ranging from simple polynomial regression to deep neural networks. We’ll also discuss real-world cases in finance, healthcare, and NLP, and outline strategies to mitigate these issues based on evidence and best practices. What Are Overfitting and Underfitting? Overfitting occurs when a model learns the training data too well –...

3.2.2 Model Training and Evaluation

이미지
Model training and evaluation are fundamental steps in the machine learning (ML) pipeline. In the training phase, an algorithm learns from data by adjusting its internal parameters to minimize errors, ultimately producing a trained model that can make predictions. In the evaluation phase, the model's performance is assessed on unseen data using quantitative metrics. This process applies to both classical ML models (e.g. linear regression, decision trees) and deep learning models (e.g. convolutional neural networks, recurrent neural networks). A solid understanding of training algorithms (such as gradient descent and backpropagation), optimization techniques (SGD, Adam, etc.), and evaluation methods (accuracy, precision, recall, F1-score, train-test splits, cross-validation) is crucial for ML practitioners. In this post, we will explore the theory and practice of model training and evaluation, with examples using popular tools like scikit-learn, TensorFlow, and PyTorch, and we wi...

3.2.1 Types of Machine Learning

이미지
Machine learning (ML) is a field of artificial intelligence that enables computers to learn from data and improve over time without being explicitly programmed. ML algorithms are typically categorized into four main types – supervised , unsupervised , semi-supervised , and reinforcement learning . Each type represents a different learning paradigm, with distinct approaches to how models are trained and the kinds of problems they can solve. Below, we explore each type in detail, discussing their definitions, core theoretical principles, common algorithms, and real-world applications in domains such as finance, healthcare, and natural language processing (NLP). Supervised Learning Definition: Supervised learning is the most widely used ML approach. In supervised learning, the model is trained on a labeled dataset – which means each training example comes with an input (features) and an expected output (label). The goal is for the algorithm to learn a general mapping from inputs to o...