[Paper Review] What are the Machine Learning best practices reported by practitioners on Stack Exchange?
This study identifies and validates 127 machine learning best practices by mining 242 high-scoring posts from 14 Stack Exchange communities, then rigorously evaluated by four ML experts. The practices are organized across the ML lifecycle stages, with concrete examples focused on software engineering tasks, offering a practical, empirically grounded guide for practitioners and researchers to avoid common pitfalls and improve ML implementation quality.
Machine Learning (ML) is being used in multiple disciplines due to its powerful capability to infer relationships within data. In particular, Software Engineering (SE) is one of those disciplines in which ML has been used for multiple tasks, like software categorization, bugs prediction, and testing. In addition to the multiple ML applications, some studies have been conducted to detect and understand possible pitfalls and issues when using ML. However, to the best of our knowledge, only a few studies have focused on presenting ML best practices or guidelines for the application of ML in different domains. In addition, the practices and literature presented in previous literature (i) are domain-specific (e.g., concrete practices in biomechanics), (ii) describe few practices, or (iii) the practices lack rigorous validation and are presented in gray literature. In this paper, we present a study listing 127 ML best practices systematically mining 242 posts of 14 different Stack Exchange (STE) websites and validated by four independent ML experts. The list of practices is presented in a set of categories related to different stages of the implementation process of an ML-enabled system; for each practice, we include explanations and examples. In all the practices, the provided examples focus on SE tasks. We expect this list of practices could help practitioners to understand better the practices and use ML in a more informed way, in particular newcomers to this new area that sits at the intersection of software engineering and machine learning.
Motivation & Objective
- To identify and systematize machine learning best practices reported by practitioners in real-world software engineering contexts.
- To address the lack of comprehensive, validated, and domain-specific ML best practice guidelines in software engineering.
- To create a structured, evidence-based handbook of ML practices derived from community-driven discussions on Stack Exchange.
- To validate the identified practices through expert review, ensuring credibility and practical relevance.
- To support software engineering practitioners and researchers in avoiding common ML pitfalls through actionable, context-specific guidance.
Proposed method
- Systematically mined 242 high-scoring Stack Exchange posts from 14 specialized communities related to machine learning and software engineering.
- Applied a multi-stage qualitative analysis process involving manual selection, tagging, and categorization of practices using an open-coding scheme.
- Involved three independent taggers with consensus meetings to reduce subjectivity in post tagging and practice classification.
- Classified practices into 10 categories across the ML pipeline, including data preparation, model selection, training, evaluation, and deployment.
- Validated all 127 practices through expert review by four ML experts with diverse backgrounds, allowing for objections and iterative refinement of categorization.
- Used a mixed-methods approach combining community knowledge extraction with expert validation to ensure reliability and practical relevance.
Experimental results
Research questions
- RQ1What machine learning best practices are commonly reported by practitioners on Stack Exchange communities?
- RQ2How can these practices be systematically categorized across the stages of the machine learning lifecycle?
- RQ3To what extent do expert-validated practices align with real-world community discussions on ML implementation?
- RQ4What are the most frequent pitfalls and challenges highlighted by practitioners in software engineering contexts?
- RQ5How can community-sourced ML practices be transformed into a reliable, actionable handbook for practitioners?
Key findings
- The study identified a total of 127 machine learning best practices, systematically organized across 10 categories spanning the entire ML lifecycle, including an additional 'implementation' stage not covered in prior frameworks.
- The practices were derived from real-world discussions on Stack Exchange, reflecting actual challenges and solutions encountered by practitioners in software engineering contexts.
- Expert validation confirmed the credibility of the practices, with only minor reclassification needed after expert objections, indicating strong consensus and reliability.
- The most frequently reported best practices focused on data preprocessing, model evaluation, and hyperparameter tuning, highlighting common pain points in ML development.
- The study revealed recurring issues such as data leakage, overfitting, and poor generalization, which were consistently addressed through community-proposed practices.
- The final handbook provides concrete, example-driven guidance tailored to software engineering tasks, such as bug prediction and code summarization, enhancing practical applicability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.