Skip to content

Expand "Model Architecture and Training" section with implementation details - #4

Merged
kjappelbaum merged 3 commits into
mainfrom
copilot/make-model-training-section-more-detailed
Apr 12, 2026
Merged

Expand "Model Architecture and Training" section with implementation details#4
kjappelbaum merged 3 commits into
mainfrom
copilot/make-model-training-section-more-detailed

Conversation

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

The methods section lacked specifics on how models were configured and evaluated, making it hard to reproduce or critically assess the experimental setup.

Changes to src/tex/ms.tex

  • Task type & model class: Explicitly states all four tasks are regression problems using LGBMRegressor
  • Hyperparameters: Lists the LightGBM defaults in use — 100 boosting rounds, lr=0.1, 31 leaves, min 20 samples per leaf — plus fixed random seed (42); explains why no tuning was done
  • Indirect pipeline: Describes the three-stage proxy architecture — MultiOutputClassifier (authors) → MultiOutputClassifier (journals) → LGBMRegressor (year) — with outputs concatenated as the meta-feature vector for the final indirect model
  • Metrics & baseline: Names the regression metrics (MAE, MAPE, R²) and the DummyRegressor (mean) baseline

Summary by Sourcery

Clarify the model architecture and training description for LightGBM-based experiments, detailing the proxy pipeline components and evaluation setup.

Documentation:

  • Document the sequential proxy prediction pipeline using multi-output LightGBM classifiers and a regressor, including how their outputs form meta-features for the final model.
  • Specify that LightGBM models use default hyperparameters without tuning to ensure comparable, untuned conditions across tasks.
  • Describe the regression evaluation metrics (MAE, MAPE, R²) and the DummyRegressor mean baseline used for performance comparison.

Copilot AI linked an issue Apr 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update model architecture and training section with more details Expand "Model Architecture and Training" section with implementation details Apr 2, 2026
Copilot AI requested a review from kjappelbaum April 2, 2026 08:28
Comment thread src/tex/ms.tex Outdated
@kjappelbaum
kjappelbaum marked this pull request as ready for review April 12, 2026 06:40
@kjappelbaum
kjappelbaum merged commit 0b6943c into main Apr 12, 2026
0 of 2 checks passed
@kjappelbaum
kjappelbaum deleted the copilot/make-model-training-section-more-detailed branch April 12, 2026 06:41
@sourcery-ai

sourcery-ai Bot commented Apr 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the manuscript’s “Model Architecture and Training” section to fully document the LightGBM setup, the indirect proxy pipeline, and the evaluation metrics/baseline for the regression tasks.

Sequence diagram for the indirect proxy prediction pipeline

sequenceDiagram
    participant X as Input_features
    participant A as AuthorProxyMultiOutputClassifier
    participant J as JournalProxyMultiOutputClassifier
    participant Y as YearLGBMRegressor
    participant F as FinalIndirectRegressor

    X->>A: fit(X, author_presence_labels)
    A-->>X: trained_author_proxy

    X->>J: fit(X, journal_presence_labels)
    J-->>X: trained_journal_proxy

    X->>Y: fit(X, publication_year_labels)
    Y-->>X: trained_year_regressor

    X->>A: predict(X)
    A-->>F: author_presence_predictions

    X->>J: predict(X)
    J-->>F: journal_presence_predictions

    X->>Y: predict(X)
    Y-->>F: year_predictions

    F->>F: concatenate_author_journal_year_outputs
    F-->>X: meta_feature_vector_for_indirect_model

    F->>F: predict_target_property(meta_feature_vector)
Loading

Class diagram for the indirect LightGBM-based proxy architecture

classDiagram
    class LGBMClassifier {
        +fit(X, y)
        +predict(X)
    }

    class LGBMRegressor {
        +fit(X, y)
        +predict(X)
    }

    class MultiOutputClassifier {
        +base_estimator
        +fit(X, Y_multi)
        +predict(X)
    }

    class AuthorProxyMultiOutputClassifier {
        +fit(X, author_presence_labels)
        +predict(X)
    }

    class JournalProxyMultiOutputClassifier {
        +fit(X, journal_presence_labels)
        +predict(X)
    }

    class YearLGBMRegressor {
        +fit(X, publication_year_labels)
        +predict(X)
    }

    class FinalIndirectRegressor {
        +fit(meta_features, target)
        +predict(meta_features)
    }

    MultiOutputClassifier *-- LGBMClassifier
    AuthorProxyMultiOutputClassifier --|> MultiOutputClassifier
    JournalProxyMultiOutputClassifier --|> MultiOutputClassifier

    YearLGBMRegressor --|> LGBMRegressor
    FinalIndirectRegressor --|> LGBMRegressor

    FinalIndirectRegressor o-- AuthorProxyMultiOutputClassifier
    FinalIndirectRegressor o-- JournalProxyMultiOutputClassifier
    FinalIndirectRegressor o-- YearLGBMRegressor
Loading

Flow diagram for regression evaluation metrics and baseline

flowchart TD
    A[Trained_task_regressor_LGBMRegressor] --> B[Predict_on_validation_folds]
    B --> C[Predicted_targets]
    C --> D[Compute_MAE]
    C --> E[Compute_MAPE]
    C --> F[Compute_R2]

    G[Ground_truth_targets] --> D
    G --> E
    G --> F

    H[DummyRegressor_mean_baseline] --> I[Predict_training_set_mean]
    I --> J[Baseline_predictions]
    J --> K[Baseline_MAE_MAPE_R2]

    D --> L[Compare_model_vs_baseline]
    E --> L
    F --> L
    K --> L
Loading

File-Level Changes

Change Details Files
Document LightGBM configuration and rationale for no hyperparameter tuning.
  • Clarifies that all models use LightGBM with default hyperparameters.
  • States explicitly that no hyperparameter search was performed.
  • Explains the methodological motivation: comparing model types under equal, untuned conditions rather than optimising per-task performance.
src/tex/ms.tex
Describe the architecture of the indirect (proxy) prediction pipeline.
  • Introduces a three-stage proxy pipeline using two MultiOutputClassifier models followed by an LGBMRegressor.
  • Specifies that the first MultiOutputClassifier predicts binary author-presence features using LGBMClassifier.
  • Specifies that the second MultiOutputClassifier predicts binary journal-presence features using LGBMClassifier.
  • States that an LGBMRegressor predicts publication year in the third stage.
  • Notes that the outputs of all three proxy sub-models are concatenated into a meta-feature vector used by the final indirect model.
src/tex/ms.tex
Detail regression evaluation metrics and baseline model.
  • Specifies MAE, MAPE, and R² as the regression evaluation metrics.
  • Documents the DummyRegressor baseline that predicts the training-set mean.
  • Clarifies that the baseline is used for comparison against the main regression models.
src/tex/ms.tex

Assessment against linked issues

Issue Objective Addressed Explanation
#2 Expand the 'Model Architecture and Training' section with more detailed description of model configurations, training setup, and evaluation to make the methods clearer and more reproducible.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues, and left some high level feedback:

  • The PR description mentions listing specific LightGBM hyperparameters, but the LaTeX change currently only says defaults were used; consider explicitly listing the key default values you rely on to avoid version-dependent ambiguity.
  • If relevant for reproducibility, you may want to note the random seed and LightGBM (and scikit-learn) library versions used, since default behavior and results can differ across versions.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The PR description mentions listing specific LightGBM hyperparameters, but the LaTeX change currently only says defaults were used; consider explicitly listing the key default values you rely on to avoid version-dependent ambiguity.
- If relevant for reproducibility, you may want to note the random seed and LightGBM (and scikit-learn) library versions used, since default behavior and results can differ across versions.

## Individual Comments

### Comment 1
<location path="src/tex/ms.tex" line_range="253" />
<code_context>
 \subsection{Model Architecture and Training}

-All models used gradient boosting, implemented with \texttt{LightGBM}\autocite{lightgbm} with default hyperparameters. 
+All models used gradient boosting, implemented with \texttt{LightGBM}\autocite{lightgbm}. All LightGBM hyperparameters were kept at their defaults. No hyperparameter search was performed; the goal was to compare model types under equivalent, untuned conditions rather than to maximise individual task performance.
+
+The indirect (proxy) prediction pipeline comprises three sequential sub-models. First, a \texttt{MultiOutputClassifier} wrapping \texttt{LGBMClassifier} predicts binary author-presence features; second, an analogous \texttt{MultiOutputClassifier} predicts binary journal-presence features; and third, an \texttt{LGBMRegressor} predicts publication year. The outputs of all three sub-models are concatenated to form the meta-feature vector that the final indirect model uses to estimate the target property.
</code_context>
<issue_to_address>
**question:** Clarify what "equivalent, untuned conditions" means across different model roles.

Since LightGBM appears as base models, proxy sub-models, and the final indirect model, please specify whether the same default settings (e.g., learning rate, num_boost_round, early-stopping configuration) were used for all classifier and regressor instances, or note any systematic differences. Otherwise, readers may infer that some roles benefit from different implicit defaults or training behaviours.
</issue_to_address>

### Comment 2
<location path="src/tex/ms.tex" line_range="257" />
<code_context>
+
+The indirect (proxy) prediction pipeline comprises three sequential sub-models. First, a \texttt{MultiOutputClassifier} wrapping \texttt{LGBMClassifier} predicts binary author-presence features; second, an analogous \texttt{MultiOutputClassifier} predicts binary journal-presence features; and third, an \texttt{LGBMRegressor} predicts publication year. The outputs of all three sub-models are concatenated to form the meta-feature vector that the final indirect model uses to estimate the target property.
+
+Model performance on regression tasks was evaluated using mean absolute error (MAE), mean absolute percentage error (MAPE), and the coefficient of determination ($R^2$). As a baseline, a \texttt{DummyRegressor} predicting the training-set mean was used.

 \subsection{Cross-Validation Protocol}
</code_context>
<issue_to_address>
**issue:** Address how MAPE is handled for zero or near-zero targets.

Please briefly state how zero or near-zero target values are handled when computing MAPE (e.g., exclusion, adding an epsilon to the denominator, or a masked/modified MAPE), so readers can correctly interpret the reported values.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/tex/ms.tex
\subsection{Model Architecture and Training}

All models used gradient boosting, implemented with \texttt{LightGBM}\autocite{lightgbm} with default hyperparameters.
All models used gradient boosting, implemented with \texttt{LightGBM}\autocite{lightgbm}. All LightGBM hyperparameters were kept at their defaults. No hyperparameter search was performed; the goal was to compare model types under equivalent, untuned conditions rather than to maximise individual task performance.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Clarify what "equivalent, untuned conditions" means across different model roles.

Since LightGBM appears as base models, proxy sub-models, and the final indirect model, please specify whether the same default settings (e.g., learning rate, num_boost_round, early-stopping configuration) were used for all classifier and regressor instances, or note any systematic differences. Otherwise, readers may infer that some roles benefit from different implicit defaults or training behaviours.

Comment thread src/tex/ms.tex

The indirect (proxy) prediction pipeline comprises three sequential sub-models. First, a \texttt{MultiOutputClassifier} wrapping \texttt{LGBMClassifier} predicts binary author-presence features; second, an analogous \texttt{MultiOutputClassifier} predicts binary journal-presence features; and third, an \texttt{LGBMRegressor} predicts publication year. The outputs of all three sub-models are concatenated to form the meta-feature vector that the final indirect model uses to estimate the target property.

Model performance on regression tasks was evaluated using mean absolute error (MAE), mean absolute percentage error (MAPE), and the coefficient of determination ($R^2$). As a baseline, a \texttt{DummyRegressor} predicting the training-set mean was used.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Address how MAPE is handled for zero or near-zero targets.

Please briefly state how zero or near-zero target values are handled when computing MAPE (e.g., exclusion, adding an epsilon to the denominator, or a masked/modified MAPE), so readers can correctly interpret the reported values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make model training section more detailed

2 participants