import streamlit as st import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots def show(): st.title("Week 8: Research Paper Writing and LaTeX") # Introduction st.header("Learning Objectives") st.markdown(""" By the end of this week, you will be able to: **Remember (Knowledge):** - Recall LaTeX syntax for document structure, figures, citations, and spacing - Identify components of ML research papers (introduction, methods, results, conclusion, limitations) - Recognize standard formatting requirements for academic conferences and journals **Understand (Comprehension):** - Describe the purpose and audience for each section of a research paper **Apply (Application):** - Format complete research papers in LaTeX with proper figures, tables, and citations - Write clear methodology sections with sufficient detail for reproducibility - Present experimental results using appropriate visualizations and statistical analysis **Analyze (Analysis):** - Diagnose LaTeX formatting issues and resolve compilation errors - Examine related work to identify research gaps and position their contributions - Compare methodology approaches with existing methods **Evaluate (Evaluation):** - Critically assess the validity and reliability of experimental design - Evaluate the clarity and persuasiveness of written arguments **Create (Synthesis):** - Produce research papers - Develop compelling visualizations that effectively communicate complex ML concepts - Synthesize technical knowledge into coherent research narratives """) # Module 1: Research Paper Architecture st.header("Module 1: Research Paper Architecture") st.markdown(""" Every section of your paper must answer specific questions that reviewers ask. Think of your paper as a conversation with skeptical experts who need convincing. """) # Paper Structure Table st.subheader("Research Paper Structure") paper_structure = { "Section": ["🔥 Introduction", "🔬 Methods", "📊 Results", "🎯 Conclusion", "⚠️ Limitations"], "Key Problems/Focus": [ "What problem are you solving? Why does it matter? How is your approach different?", "How did you collect data? What analysis techniques? Can others replicate this?", "What concrete findings emerged? How do they address your research questions?", "What's the key takeaway? How does this advance the field? What are practical implications?", "What are honest constraints? What biases might exist? What couldn't you address?" ], "Aim For": [ "Compelling motivation", "Rigorous reproducibility", "Clear evidence", "Lasting impact", "Honest transparency" ] } st.dataframe(pd.DataFrame(paper_structure)) # Detailed Section Guidelines st.subheader("Detailed Section Guidelines") # Introduction Section with st.expander("🔥 Introduction: Building Compelling Motivation"): st.markdown(""" **What is it:** The introduction is your paper's first impression and often determines whether reviewers continue reading. **Why this matters:** A weak introduction leads to immediate rejection, regardless of how brilliant your technical contribution might be. **What to do:** 1. Use the "inverted pyramid" approach 2. Start with broad context, then narrow to specific problem 3. Clearly articulate the gap in existing solutions 4. Present your approach as a logical response 5. Conclude with explicit contributions (3-4 bullet points) **Example Structure:** ``` 1. Broad context about the field 2. Specific problem you're addressing 3. Gap in existing solutions 4. Your approach as response to gap 5. Explicit contributions ``` """) # Methods Section with st.expander("🔬 Methods: Ensuring Rigorous Reproducibility"): st.markdown(""" **What is it:** The methods section has evolved from simple description to detailed documentation that enables complete replication. **Why this matters:** Irreproducible research wastes community resources and undermines scientific credibility. **What to document:** - Dataset specifics (exact version, preprocessing steps, train/validation/test splits) - Model architecture details (layer sizes, activation functions, initialization schemes) - Training procedures (optimization algorithm, learning rate schedules, batch sizes) - Computational environment (hardware specifications, software versions, random seeds) **Write as if creating a recipe** that a competent colleague could follow to recreate your exact results. """) # Results Section with st.expander("📊 Results: Presenting Clear Evidence"): st.markdown(""" **What is it:** The results section synthesizes your raw findings into compelling evidence for your claims. **Why this matters:** This section proves whether your methodology actually works and answers your research questions. **What to do:** 1. Organize results logically (general performance to specific analyses) 2. Start with overall model performance using standard metrics 3. Include detailed comparisons, ablation studies, and error analysis 4. Use clear visualizations with appropriate error bars 5. Report negative results honestly 6. Connect each finding back to your original research questions """) # Conclusion Section with st.expander("🎯 Conclusion: Creating Lasting Impact"): st.markdown(""" **What is it:** The conclusion shapes how the research community understands and remembers your contribution. **Why this matters:** Your technical contribution only matters if others can understand its significance and apply it. **What to do:** 1. Begin with concise summary of key findings (2-3 sentences) 2. State how findings advance theoretical understanding or practical applications 3. Discuss broader implications beyond your specific problem domain 4. Suggest concrete directions for future research 5. Balance confidence with humility about scope """) # Limitations Section with st.expander("⚠️ Limitations: Demonstrating Honest Transparency"): st.markdown(""" **What is it:** Acknowledging limitations shows scientific maturity and helps readers appropriately interpret your findings. **Why this matters:** Every study has constraints, and attempting to hide them makes reviewers suspicious. **Three types of limitations to address:** 1. **Scope limitations:** What populations, contexts, or problem types might your results not apply to? 2. **Methodological constraints:** Sample size issues, measurement limitations, or experimental design trade-offs 3. **Potential biases:** Dataset bias, researcher bias, or systematic errors in your approach **For each limitation:** Explain potential impact and suggest how future work could address it. """) # Quick Reference Framework st.subheader("Quick Reference Framework") st.markdown(""" **Title → Problem → Gap → Method → Findings → Impact → Limitations** This progression ensures logical flow and helps readers follow your research narrative from motivation through contribution to appropriate interpretation. """) # Module 2: LaTeX Introduction st.header("Module 2: Introduction to LaTeX") st.markdown(""" **What is LaTeX?** Think of LaTeX as a sophisticated word processor that works differently from Microsoft Word or Google Docs. Instead of clicking buttons to format text, you write commands that tell the computer how to format your document. """) # Why LaTeX st.subheader("Why Learn LaTeX for Academic Writing?") latex_benefits = { "Benefit": [ "Professional appearance", "Mathematical notation", "Reference management", "Industry standard" ], "Description": [ "LaTeX automatically handles spacing, fonts, and layout to meet academic standards", "Essential for ML papers with equations and formulas", "Automatically formats citations and bibliographies", "Most computer science conferences and journals expect LaTeX submissions" ] } st.dataframe(pd.DataFrame(latex_benefits)) # LaTeX Code Examples st.subheader("LaTeX Code Examples") # Basic Structure with st.expander("Basic Document Structure"): st.markdown("**LaTeX Code:**") st.code(""" \\documentclass{article} \\usepackage[utf8]{inputenc} \\usepackage{graphicx} \\title{Your Research Paper Title} \\author{Your Name} \\date{\\today} \\begin{document} \\maketitle \\section{Introduction} Your introduction text goes here. \\section{Methods} Your methods section goes here. \\section{Results} Your results section goes here. \\section{Conclusion} Your conclusion goes here. \\end{document} """, language="latex") st.markdown("**Rendered Output:**") st.markdown("""
Your Name
Today's Date
Your introduction text goes here.
Your methods section goes here.
Your results section goes here.
Your conclusion goes here.
Tip: Overleaf shows section structure in the left panel for easy navigation
Figure 1 shows the relationship between problems, questions, and answers.
Our approach builds on recent work [1] and extends it by...
[1] A. Einstein, "On the electrodynamics of moving bodies," Annalen der Physik, vol. 322, no. 10, pp. 891–921, 1905.
The loss function L(θ) is defined as...
As shown in Equation (1), the loss function...
Method | Accuracy | Time (s) |
---|---|---|
Baseline | 85.2% | 120 |
Our Method | 89.7% | 95 |
Table 1: Performance comparison of different methods
Table 1 shows the performance comparison...