Expand "Model Architecture and Training" section with implementation details - #4
Conversation
Agent-Logs-Url: https://github.com/lamalab-org/clever-materials-hans/sessions/f1d12553-3bf2-4e6c-8a5c-1c882478fbcd Co-authored-by: kjappelbaum <32935233+kjappelbaum@users.noreply.github.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates 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 pipelinesequenceDiagram
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)
Class diagram for the indirect LightGBM-based proxy architectureclassDiagram
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
Flow diagram for regression evaluation metrics and baselineflowchart 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
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| \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. |
There was a problem hiding this comment.
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.
|
|
||
| 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. |
There was a problem hiding this comment.
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.
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.texLGBMRegressorMultiOutputClassifier(authors) →MultiOutputClassifier(journals) →LGBMRegressor(year) — with outputs concatenated as the meta-feature vector for the final indirect modelDummyRegressor(mean) baselineSummary by Sourcery
Clarify the model architecture and training description for LightGBM-based experiments, detailing the proxy pipeline components and evaluation setup.
Documentation: