From 0f10a43706b61a288d9a84bee626f2dac1cde04b Mon Sep 17 00:00:00 2001 From: nakul-krishnakumar Date: Wed, 8 Jul 2026 20:44:47 +0530 Subject: [PATCH 1/3] refactor: update enum naming to follow convention --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: passed - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../loss-functions/README.md | 20 +++++++++---------- .../base/sgd-classification/loss_functions.h | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md index 56de67b9e878..ef29473f695f 100644 --- a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md +++ b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md @@ -127,19 +127,19 @@ bool = isLossFunction( 'beep' ); #include "stdlib/ml/base/sgd-classification/loss_functions.h" ``` -#### STDLIB_ML_SGD_CLASSIFICATION +#### STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTIONS An enumeration of SGD classification loss functions with the following fields: -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_EPSILON_INSENSITIVE**: penalty is the absolute value of the error whenever the absolute error exceeds epsilon and zero otherwise. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_HINGE**: corresponds to a soft-margin linear Support Vector Machine (SVM), which can handle non-linearly separable data. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_HUBER**: squared-error loss for observations with error smaller than epsilon in magnitude, linear loss otherwise. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_LOG**: corresponds to Logistic Regression. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_MODIFIED_HUBER**: Huber loss function variant for classification. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_PERCEPTRON**: corresponds to the original perceptron by Rosenblatt (1957). -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_EPSILON_INSENSITIVE**: squared epsilon insensitive loss function. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_ERROR**: squared difference of the observed and fitted values. -- **STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_HINGE**: squared hinge loss function SVM (L2-SVM). +- **STDLIB_ML_SGD_CLASSIFICATION_EPSILON_INSENSITIVE**: penalty is the absolute value of the error whenever the absolute error exceeds epsilon and zero otherwise. +- **STDLIB_ML_SGD_CLASSIFICATION_HINGE**: corresponds to a soft-margin linear Support Vector Machine (SVM), which can handle non-linearly separable data. +- **STDLIB_ML_SGD_CLASSIFICATION_HUBER**: squared-error loss for observations with error smaller than epsilon in magnitude, linear loss otherwise. +- **STDLIB_ML_SGD_CLASSIFICATION_LOG**: corresponds to Logistic Regression. +- **STDLIB_ML_SGD_CLASSIFICATION_MODIFIED_HUBER**: Huber loss function variant for classification. +- **STDLIB_ML_SGD_CLASSIFICATION_PERCEPTRON**: corresponds to the original perceptron by Rosenblatt (1957). +- **STDLIB_ML_SGD_CLASSIFICATION_SQUARED_EPSILON_INSENSITIVE**: squared epsilon insensitive loss function. +- **STDLIB_ML_SGD_CLASSIFICATION_SQUARED_ERROR**: squared difference of the observed and fitted values. +- **STDLIB_ML_SGD_CLASSIFICATION_SQUARED_HINGE**: squared hinge loss function SVM (L2-SVM). ```c #include "stdlib/ml/base/sgd-classification/loss_functions.h" diff --git a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h index 2fb7b3fc33ef..6a16bb6da622 100644 --- a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h +++ b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h @@ -22,33 +22,33 @@ /** * Enumeration of SGD classification loss functions. */ -enum STDLIB_ML_BASE_SGD_CLASSIFICATION_LOSS_FUNCTIONS { +enum STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTIONS { // Penalty is the absolute value of the error whenever the absolute error exceeds epsilon and zero otherwise: - STDLIB_ML_BASE_SGD_CLASSIFICATION_EPSILON_INSENSITIVE = 0, + STDLIB_ML_SGD_CLASSIFICATION_EPSILON_INSENSITIVE = 0, // Corresponds to a soft-margin linear Support Vector Machine (SVM), which can handle non-linearly separable data: - STDLIB_ML_BASE_SGD_CLASSIFICATION_HINGE, + STDLIB_ML_SGD_CLASSIFICATION_HINGE, // Squared-error loss for observations with error smaller than epsilon in magnitude, linear loss otherwise: - STDLIB_ML_BASE_SGD_CLASSIFICATION_HUBER, + STDLIB_ML_SGD_CLASSIFICATION_HUBER, // Corresponds to Logistic Regression: - STDLIB_ML_BASE_SGD_CLASSIFICATION_LOG, + STDLIB_ML_SGD_CLASSIFICATION_LOG, // Huber loss function variant for classification: - STDLIB_ML_BASE_SGD_CLASSIFICATION_MODIFIED_HUBER, + STDLIB_ML_SGD_CLASSIFICATION_MODIFIED_HUBER, // Corresponds to the original perceptron by Rosenblatt (1957): - STDLIB_ML_BASE_SGD_CLASSIFICATION_PERCEPTRON, + STDLIB_ML_SGD_CLASSIFICATION_PERCEPTRON, // Squared epsilon insensitive loss function: - STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_EPSILON_INSENSITIVE, + STDLIB_ML_SGD_CLASSIFICATION_SQUARED_EPSILON_INSENSITIVE, // Squared difference of the observed and fitted values: - STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_ERROR, + STDLIB_ML_SGD_CLASSIFICATION_SQUARED_ERROR, // Squared hinge loss function SVM (L2-SVM): - STDLIB_ML_BASE_SGD_CLASSIFICATION_SQUARED_HINGE + STDLIB_ML_SGD_CLASSIFICATION_SQUARED_HINGE }; #endif // !STDLIB_ML_BASE_SGD_CLASSIFICATION_LOSS_FUNCTIONS_H From e95ce4dd007567d610d0579225b13e4d81e0216a Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 8 Jul 2026 16:08:26 -0700 Subject: [PATCH 2/3] fix: rename enum to match conventions Signed-off-by: Athan --- .../include/stdlib/ml/base/sgd-classification/loss_functions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h index 6a16bb6da622..fe1820bcc94f 100644 --- a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h +++ b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/include/stdlib/ml/base/sgd-classification/loss_functions.h @@ -22,7 +22,7 @@ /** * Enumeration of SGD classification loss functions. */ -enum STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTIONS { +enum STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTION { // Penalty is the absolute value of the error whenever the absolute error exceeds epsilon and zero otherwise: STDLIB_ML_SGD_CLASSIFICATION_EPSILON_INSENSITIVE = 0, From f81b052abb852d8f6ab73f490bf203435c717bfa Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 8 Jul 2026 16:09:04 -0700 Subject: [PATCH 3/3] docs: fix enum name Signed-off-by: Athan --- .../ml/base/sgd-classification/loss-functions/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md index ef29473f695f..010419e81e15 100644 --- a/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md +++ b/lib/node_modules/@stdlib/ml/base/sgd-classification/loss-functions/README.md @@ -127,7 +127,7 @@ bool = isLossFunction( 'beep' ); #include "stdlib/ml/base/sgd-classification/loss_functions.h" ``` -#### STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTIONS +#### STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTION An enumeration of SGD classification loss functions with the following fields: @@ -144,7 +144,7 @@ An enumeration of SGD classification loss functions with the following fields: ```c #include "stdlib/ml/base/sgd-classification/loss_functions.h" -const enum STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTIONS v = STDLIB_ML_SGD_CLASSIFICATION_HINGE; +const enum STDLIB_ML_SGD_CLASSIFICATION_LOSS_FUNCTION v = STDLIB_ML_SGD_CLASSIFICATION_HINGE; ```