{"accepted_status": [false, false], "candidate_answers": [{"answer_html": "

Performing LASSO on standard principal components or following LASSO with PCA might still end up with all retained predictors contributing to each component.

\n

An alternative is sparse principal component analysis (SPCA). It uses a LASSO-type penalty to cut down on the number of original variables contributing to each component. Quoting:

\n
\n

A particular disadvantage of ordinary PCA is that the principal components are usually linear combinations of all input variables. SPCA overcomes this disadvantage by finding components that are linear combinations of just a few input variables (SPCs).

\n
\n

Frank Harrell recommends it as one way to perform "data reduction" on predictors without using the outcome. See Section 8.6.1 of his Regression Modeling Strategies. Both the above references have links to implementations in R. For example, the R elasticnet package has one implementation in its spca() function.

\n", "answer_id": 676880, "answer_text": "Performing LASSO on standard principal components or following LASSO with PCA might still end up with all retained predictors contributing to each component.\n\n\n\n\nAn alternative is sparse principal component analysis (https://en.wikipedia.org/wiki/Sparse_PCA) (SPCA). It uses a LASSO-type penalty to cut down on the number of original variables contributing to each component. Quoting:\n\n\n\n\n\n\n\nA particular disadvantage of ordinary PCA is that the principal components are usually linear combinations of all input variables. SPCA overcomes this disadvantage by finding components that are linear combinations of just a few input variables (SPCs).\n\n\n\n\n\n\n\nFrank Harrell recommends it as one way to perform \"data reduction\" on predictors without using the outcome. See Section 8.6.1 of his Regression Modeling Strategies (https://hbiostat.org/rmsc/impred.html#sec-impred-sparsepc). Both the above references have links to implementations in R. For example, the R elasticnet package (https://cran.r-project.org/package=elasticnet) has one implementation in its spca() function.", "answer_url": "https://stats.stackexchange.com/a/676880", "author": "EdM", "author_url": "https://stats.stackexchange.com/users/28500/edm", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T13:34:16+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676873, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "EdM", "profile_url": "https://stats.stackexchange.com/users/28500/edm", "user_type": "registered"}, "created_at": "2026-08-15T13:34:16+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "2DE20E9C-6EC1-4527-BC84-458EE2BCF893", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/2DE20E9C-6EC1-4527-BC84-458EE2BCF893/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "EdM", "profile_url": "https://stats.stackexchange.com/users/28500/edm", "user_type": "registered"}, "created_at": "2026-08-15T13:44:54+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "F6AC7515-6D89-427A-BA3B-ACAE39221913", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/F6AC7515-6D89-427A-BA3B-ACAE39221913/view-source"}], "score": 7, "updated_at": "2026-08-15T13:44:54+00:00"}, {"answer_html": "

EdM’s answer is very good but a couple of additional points:

\n
    \n
  1. LASSO and ElasticNet can be thought of as a kind of feature selection, but it is better to think of them as forms of regularization. It just so happens that when you constrain optimization using the $L^1$ norm, that you will get a sparse solution. This is only true of LASSO since ElasticNet allows for constraints using $L^1$ and $L^2$ norms. The latter norm, by itself, will not generally lead to a sparse coefficient vector.
  2. \n
  3. You might use both PCA and a regularized optimization routine if, for example, you have a large number of numeric features (say pixel intensities) that you’d first like to project onto a lower dimensional space (e.g. using the first $k$ principal components). Some might call that feature engineering. Then, you might also have, for each example, some number of other features / variables about the image that help with whatever your problem is (e.g. classification). So you’d first use PCA on the subset of features that need to be projected down to a manageable / useful set, and then use those together with the remaining features in the actual learning process.
  4. \n
  5. As Dave mentions in his comment, there aren’t really any standards here other than thinking about what might work best for your problem. Having hundreds or thousands of pixel intensities might not be as optimal when using LASSO as having the first $k$ principal components plus the remaining, possibly categorical variables.
  6. \n
\n", "answer_id": 676882, "answer_text": "EdM’s answer is very good but a couple of additional points:\n\n\n\n\n\nLASSO and ElasticNet can be thought of as a kind of feature selection, but it is better to think of them as forms of regularization. It just so happens that when you constrain optimization using the $L^1$ norm, that you will get a sparse solution. This is only true of LASSO since ElasticNet allows for constraints using $L^1$ and $L^2$ norms. The latter norm, by itself, will not generally lead to a sparse coefficient vector.\n\n\n\n\nYou might use both PCA and a regularized optimization routine if, for example, you have a large number of numeric features (say pixel intensities) that you’d first like to project onto a lower dimensional space (e.g. using the first $k$ principal components). Some might call that feature engineering. Then, you might also have, for each example, some number of other features / variables about the image that help with whatever your problem is (e.g. classification). So you’d first use PCA on the subset of features that need to be projected down to a manageable / useful set, and then use those together with the remaining features in the actual learning process.\n\n\n\n\nAs Dave mentions in his comment, there aren’t really any standards here other than thinking about what might work best for your problem. Having hundreds or thousands of pixel intensities might not be as optimal when using LASSO as having the first $k$ principal components plus the remaining, possibly categorical variables.", "answer_url": "https://stats.stackexchange.com/a/676882", "author": "Rick Hass", "author_url": "https://stats.stackexchange.com/users/97844/rick-hass", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T18:50:47+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676873, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rick Hass", "profile_url": "https://stats.stackexchange.com/users/97844/rick-hass", "user_type": "registered"}, "created_at": "2026-08-15T18:50:47+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "20D33DFC-5C33-4102-8CB3-EEFE63F27B52", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/20D33DFC-5C33-4102-8CB3-EEFE63F27B52/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rick Hass", "profile_url": "https://stats.stackexchange.com/users/97844/rick-hass", "user_type": "registered"}, "created_at": "2026-08-16T00:28:16+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "15E83EAD-6155-4905-A2FC-ED94BFB7DC67", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/15E83EAD-6155-4905-A2FC-ED94BFB7DC67/view-source"}], "score": 3, "updated_at": "2026-08-16T00:28:16+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I understand that PCA is for eliminating collinearity and reducing dimensions while the other is used for feature selection. I was wondering if there is any way to use these two methods together for an example if you wanted do feature selection but also wanted to get rid of collinearity which elastic net/lasso does poorly.\n\n\n\n\nIn what cases would you use these two methods together and what cases would you use them separately? What is the general standard of practice is it to do it together or separate?", "record_id": "Scientific-Answer-Ranking:stats:676873", "scores": [7, 3], "split": "validation", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "

Performing LASSO on standard principal components or following LASSO with PCA might still end up with all retained predictors contributing to each component.

\n

An alternative is sparse principal component analysis (SPCA). It uses a LASSO-type penalty to cut down on the number of original variables contributing to each component. Quoting:

\n
\n

A particular disadvantage of ordinary PCA is that the principal components are usually linear combinations of all input variables. SPCA overcomes this disadvantage by finding components that are linear combinations of just a few input variables (SPCs).

\n
\n

Frank Harrell recommends it as one way to perform "data reduction" on predictors without using the outcome. See Section 8.6.1 of his Regression Modeling Strategies. Both the above references have links to implementations in R. For example, the R elasticnet package has one implementation in its spca() function.

\n", "answer_id": 676880, "answer_text": "Performing LASSO on standard principal components or following LASSO with PCA might still end up with all retained predictors contributing to each component.\n\n\n\n\nAn alternative is sparse principal component analysis (https://en.wikipedia.org/wiki/Sparse_PCA) (SPCA). It uses a LASSO-type penalty to cut down on the number of original variables contributing to each component. Quoting:\n\n\n\n\n\n\n\nA particular disadvantage of ordinary PCA is that the principal components are usually linear combinations of all input variables. SPCA overcomes this disadvantage by finding components that are linear combinations of just a few input variables (SPCs).\n\n\n\n\n\n\n\nFrank Harrell recommends it as one way to perform \"data reduction\" on predictors without using the outcome. See Section 8.6.1 of his Regression Modeling Strategies (https://hbiostat.org/rmsc/impred.html#sec-impred-sparsepc). Both the above references have links to implementations in R. For example, the R elasticnet package (https://cran.r-project.org/package=elasticnet) has one implementation in its spca() function.", "answer_url": "https://stats.stackexchange.com/a/676880", "author": "EdM", "author_url": "https://stats.stackexchange.com/users/28500/edm", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T13:34:16+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676873, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "EdM", "profile_url": "https://stats.stackexchange.com/users/28500/edm", "user_type": "registered"}, "created_at": "2026-08-15T13:34:16+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "2DE20E9C-6EC1-4527-BC84-458EE2BCF893", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/2DE20E9C-6EC1-4527-BC84-458EE2BCF893/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "EdM", "profile_url": "https://stats.stackexchange.com/users/28500/edm", "user_type": "registered"}, "created_at": "2026-08-15T13:44:54+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "F6AC7515-6D89-427A-BA3B-ACAE39221913", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/F6AC7515-6D89-427A-BA3B-ACAE39221913/view-source"}], "score": 7, "updated_at": "2026-08-15T13:44:54+00:00"}, {"answer_html": "

EdM’s answer is very good but a couple of additional points:

\n
    \n
  1. LASSO and ElasticNet can be thought of as a kind of feature selection, but it is better to think of them as forms of regularization. It just so happens that when you constrain optimization using the $L^1$ norm, that you will get a sparse solution. This is only true of LASSO since ElasticNet allows for constraints using $L^1$ and $L^2$ norms. The latter norm, by itself, will not generally lead to a sparse coefficient vector.
  2. \n
  3. You might use both PCA and a regularized optimization routine if, for example, you have a large number of numeric features (say pixel intensities) that you’d first like to project onto a lower dimensional space (e.g. using the first $k$ principal components). Some might call that feature engineering. Then, you might also have, for each example, some number of other features / variables about the image that help with whatever your problem is (e.g. classification). So you’d first use PCA on the subset of features that need to be projected down to a manageable / useful set, and then use those together with the remaining features in the actual learning process.
  4. \n
  5. As Dave mentions in his comment, there aren’t really any standards here other than thinking about what might work best for your problem. Having hundreds or thousands of pixel intensities might not be as optimal when using LASSO as having the first $k$ principal components plus the remaining, possibly categorical variables.
  6. \n
\n", "answer_id": 676882, "answer_text": "EdM’s answer is very good but a couple of additional points:\n\n\n\n\n\nLASSO and ElasticNet can be thought of as a kind of feature selection, but it is better to think of them as forms of regularization. It just so happens that when you constrain optimization using the $L^1$ norm, that you will get a sparse solution. This is only true of LASSO since ElasticNet allows for constraints using $L^1$ and $L^2$ norms. The latter norm, by itself, will not generally lead to a sparse coefficient vector.\n\n\n\n\nYou might use both PCA and a regularized optimization routine if, for example, you have a large number of numeric features (say pixel intensities) that you’d first like to project onto a lower dimensional space (e.g. using the first $k$ principal components). Some might call that feature engineering. Then, you might also have, for each example, some number of other features / variables about the image that help with whatever your problem is (e.g. classification). So you’d first use PCA on the subset of features that need to be projected down to a manageable / useful set, and then use those together with the remaining features in the actual learning process.\n\n\n\n\nAs Dave mentions in his comment, there aren’t really any standards here other than thinking about what might work best for your problem. Having hundreds or thousands of pixel intensities might not be as optimal when using LASSO as having the first $k$ principal components plus the remaining, possibly categorical variables.", "answer_url": "https://stats.stackexchange.com/a/676882", "author": "Rick Hass", "author_url": "https://stats.stackexchange.com/users/97844/rick-hass", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T18:50:47+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676873, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rick Hass", "profile_url": "https://stats.stackexchange.com/users/97844/rick-hass", "user_type": "registered"}, "created_at": "2026-08-15T18:50:47+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "20D33DFC-5C33-4102-8CB3-EEFE63F27B52", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/20D33DFC-5C33-4102-8CB3-EEFE63F27B52/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rick Hass", "profile_url": "https://stats.stackexchange.com/users/97844/rick-hass", "user_type": "registered"}, "created_at": "2026-08-16T00:28:16+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "15E83EAD-6155-4905-A2FC-ED94BFB7DC67", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/15E83EAD-6155-4905-A2FC-ED94BFB7DC67/view-source"}], "score": 3, "updated_at": "2026-08-16T00:28:16+00:00"}], "domain": "statistics", "external_links": ["https://cran.r-project.org/package=elasticnet", "https://en.wikipedia.org/wiki/Sparse_PCA", "https://hbiostat.org/rmsc/impred.html#sec-impred-sparsepc"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Karl Suh", "question_author_url": "https://stats.stackexchange.com/users/513622/karl-suh", "question_author_user_type": "registered", "question_created_at": "2026-08-15T03:42:38+00:00", "question_html": "

I understand that PCA is for eliminating collinearity and reducing dimensions while the other is used for feature selection. I was wondering if there is any way to use these two methods together for an example if you wanted do feature selection but also wanted to get rid of collinearity which elastic net/lasso does poorly.

\n

In what cases would you use these two methods together and what cases would you use them separately? What is the general standard of practice is it to do it together or separate?

\n", "question_id": 676873, "question_license": "CC BY-SA 4.0", "question_score": 5, "question_text": "I understand that PCA is for eliminating collinearity and reducing dimensions while the other is used for feature selection. I was wondering if there is any way to use these two methods together for an example if you wanted do feature selection but also wanted to get rid of collinearity which elastic net/lasso does poorly.\n\n\n\n\nIn what cases would you use these two methods together and what cases would you use them separately? What is the general standard of practice is it to do it together or separate?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Karl Suh", "profile_url": "https://stats.stackexchange.com/users/513622/karl-suh", "user_type": "registered"}, "created_at": "2026-08-15T03:42:38+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "C888628D-3C97-4B17-86E4-AF7475A3C710", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/C888628D-3C97-4B17-86E4-AF7475A3C710/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-08-15T13:55:27+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "1513EDD5-94FC-4B55-A64B-81770DFE0CB8", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://stats.stackexchange.com/revisions/1513EDD5-94FC-4B55-A64B-81770DFE0CB8/view-source"}], "source_site": "stats", "source_url": "https://stats.stackexchange.com/questions/676873/can-you-use-pca-and-elastic-net-lasso-together-or-do-you-have-to-use-one-or-the", "split": "validation", "split_group": "b0befa11d334e3ea0cb0f6c32cda5c87da78493a28ed637e497c3e4ae2e250e6", "tags": ["pca", "lasso", "elastic-net"], "thread_id": "stats:676873", "title": "Can you use PCA and Elastic Net/Lasso together or do you have to use one or the other? Are there any use cases for using these two methods together?"}} {"accepted_status": [false, true], "candidate_answers": [{"answer_html": "

One big advantage of the Cox PH model is that it does not make assumptions about the baseline hazard function, where parametric models do, with the Weibull model assuming the baseline hazard follows a Weibull distribution. Unfortunately, that is an assumption and, if violated, the results can be very misleading.

\n

If you go the parametric route and do not have good substantive reasons to choose one distribution, it is common to try several and choose based on such criteria as AIC.

\n

Other ways of dealing with violation of the PH assumption (including some discussion of when the violation may not matter) are covered in this thread and its subthreads and probably other threads on CV.

\n", "answer_id": 677100, "answer_text": "One big advantage of the Cox PH model is that it does not make assumptions about the baseline hazard function, where parametric models do, with the Weibull model assuming the baseline hazard follows a Weibull distribution. Unfortunately, that is an assumption and, if violated, the results can be very misleading.\n\n\n\n\nIf you go the parametric route and do not have good substantive reasons to choose one distribution, it is common to try several and choose based on such criteria as AIC.\n\n\n\n\nOther ways of dealing with violation of the PH assumption (including some discussion of when the violation may not matter) are covered in this thread (https://stats.stackexchange.com/questions/631309/violation-of-cox-proportional-hazard-assumption) and its subthreads and probably other threads on CV.", "answer_url": "https://stats.stackexchange.com/a/677100", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-08T10:43:47+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677099, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-09-08T10:43:47+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "7A56B279-E283-4665-B1AD-FBECCC69008E", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7A56B279-E283-4665-B1AD-FBECCC69008E/view-source"}], "score": 8, "updated_at": "2026-09-08T10:43:47+00:00"}, {"answer_html": "

Using a Weibull model will not help: as you say, the Weibull model is a proportional hazards model.

\n

It could help to use other accelerated failure models, eg, lognormal. Whether this works will depend on what the failure in proportional hazards looks like.

\n

At one extreme: if all the hazard ratios show a similar pattern of increase or decrease over time then a different underlying model might fix the problem

\n

At the other: if the hazard ratio for some covariates is roughly constant over time but the hazard ratio for other covariates decreases strongly, changing the underlying model won't help -- you need to model time-dependent effects. This sort of thing happens fairly frequently in medical data: some measurements get 'stale', so that a year-old measurement of (say) clotting time doesn't tell you much about current risk. Others don't: if someone was old or low-income or had a history of smoking a year ago, the measurement is still just as valid as it was.

\n

You can look at changes in the hazard ratio over time with smoothed Schoenfeld residuals -- in R, this is survival::plot.cox.zph

\n", "answer_id": 677106, "answer_text": "Using a Weibull model will not help: as you say, the Weibull model is a proportional hazards model.\n\n\n\n\nIt could help to use other accelerated failure models, eg, lognormal. Whether this works will depend on what the failure in proportional hazards looks like.\n\n\n\n\nAt one extreme: if all the hazard ratios show a similar pattern of increase or decrease over time then a different underlying model might fix the problem\n\n\n\n\nAt the other: if the hazard ratio for some covariates is roughly constant over time but the hazard ratio for other covariates decreases strongly, changing the underlying model won't help -- you need to model time-dependent effects. This sort of thing happens fairly frequently in medical data: some measurements get 'stale', so that a year-old measurement of (say) clotting time doesn't tell you much about current risk. Others don't: if someone was old or low-income or had a history of smoking a year ago, the measurement is still just as valid as it was.\n\n\n\n\nYou can look at changes in the hazard ratio over time with smoothed Schoenfeld residuals -- in R, this is survival::plot.cox.zph", "answer_url": "https://stats.stackexchange.com/a/677106", "author": "Thomas Lumley", "author_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-08T21:28:29+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677099, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-09-08T21:28:29+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "084444E7-448C-4715-9B8D-97651E34E425", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/084444E7-448C-4715-9B8D-97651E34E425/view-source"}], "score": 8, "updated_at": "2026-09-08T21:28:29+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I am using survival analysis to analyze unemployment duration from a panel dataset. I would like to control for covariates, and hence I decided to use a Cox PH Model. However, after fitting model, I run the PH test using cox.zph() in R. All my covariates have corresponding p-value of $< 2 \\times 10^{-16}$. I tried stratifying using various variables, but that only marginally improves the p-value for some covariates.\n\n\n\n\nI am considering using different models now. I was suggested to use the Weibull model, but I am not sure if this will work as Weibull model also follows the PH assumption. So my questions is:\n\n\n\n\ni) Is there any point trying to use a Weibull model?\n\n\n\n\nii) What other models should I consider using?", "record_id": "Scientific-Answer-Ranking:stats:677099", "scores": [8, 8], "split": "validation", "thread": {"accepted_answer_id": 677106, "answers": [{"answer_html": "

One big advantage of the Cox PH model is that it does not make assumptions about the baseline hazard function, where parametric models do, with the Weibull model assuming the baseline hazard follows a Weibull distribution. Unfortunately, that is an assumption and, if violated, the results can be very misleading.

\n

If you go the parametric route and do not have good substantive reasons to choose one distribution, it is common to try several and choose based on such criteria as AIC.

\n

Other ways of dealing with violation of the PH assumption (including some discussion of when the violation may not matter) are covered in this thread and its subthreads and probably other threads on CV.

\n", "answer_id": 677100, "answer_text": "One big advantage of the Cox PH model is that it does not make assumptions about the baseline hazard function, where parametric models do, with the Weibull model assuming the baseline hazard follows a Weibull distribution. Unfortunately, that is an assumption and, if violated, the results can be very misleading.\n\n\n\n\nIf you go the parametric route and do not have good substantive reasons to choose one distribution, it is common to try several and choose based on such criteria as AIC.\n\n\n\n\nOther ways of dealing with violation of the PH assumption (including some discussion of when the violation may not matter) are covered in this thread (https://stats.stackexchange.com/questions/631309/violation-of-cox-proportional-hazard-assumption) and its subthreads and probably other threads on CV.", "answer_url": "https://stats.stackexchange.com/a/677100", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-08T10:43:47+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677099, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-09-08T10:43:47+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "7A56B279-E283-4665-B1AD-FBECCC69008E", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7A56B279-E283-4665-B1AD-FBECCC69008E/view-source"}], "score": 8, "updated_at": "2026-09-08T10:43:47+00:00"}, {"answer_html": "

Using a Weibull model will not help: as you say, the Weibull model is a proportional hazards model.

\n

It could help to use other accelerated failure models, eg, lognormal. Whether this works will depend on what the failure in proportional hazards looks like.

\n

At one extreme: if all the hazard ratios show a similar pattern of increase or decrease over time then a different underlying model might fix the problem

\n

At the other: if the hazard ratio for some covariates is roughly constant over time but the hazard ratio for other covariates decreases strongly, changing the underlying model won't help -- you need to model time-dependent effects. This sort of thing happens fairly frequently in medical data: some measurements get 'stale', so that a year-old measurement of (say) clotting time doesn't tell you much about current risk. Others don't: if someone was old or low-income or had a history of smoking a year ago, the measurement is still just as valid as it was.

\n

You can look at changes in the hazard ratio over time with smoothed Schoenfeld residuals -- in R, this is survival::plot.cox.zph

\n", "answer_id": 677106, "answer_text": "Using a Weibull model will not help: as you say, the Weibull model is a proportional hazards model.\n\n\n\n\nIt could help to use other accelerated failure models, eg, lognormal. Whether this works will depend on what the failure in proportional hazards looks like.\n\n\n\n\nAt one extreme: if all the hazard ratios show a similar pattern of increase or decrease over time then a different underlying model might fix the problem\n\n\n\n\nAt the other: if the hazard ratio for some covariates is roughly constant over time but the hazard ratio for other covariates decreases strongly, changing the underlying model won't help -- you need to model time-dependent effects. This sort of thing happens fairly frequently in medical data: some measurements get 'stale', so that a year-old measurement of (say) clotting time doesn't tell you much about current risk. Others don't: if someone was old or low-income or had a history of smoking a year ago, the measurement is still just as valid as it was.\n\n\n\n\nYou can look at changes in the hazard ratio over time with smoothed Schoenfeld residuals -- in R, this is survival::plot.cox.zph", "answer_url": "https://stats.stackexchange.com/a/677106", "author": "Thomas Lumley", "author_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-08T21:28:29+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677099, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-09-08T21:28:29+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "084444E7-448C-4715-9B8D-97651E34E425", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/084444E7-448C-4715-9B8D-97651E34E425/view-source"}], "score": 8, "updated_at": "2026-09-08T21:28:29+00:00"}], "domain": "statistics", "external_links": [], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Jyotiraditya Pradhan", "question_author_url": "https://stats.stackexchange.com/users/516391/jyotiraditya-pradhan", "question_author_user_type": "registered", "question_created_at": "2026-09-08T09:32:39+00:00", "question_html": "

I am using survival analysis to analyze unemployment duration from a panel dataset. I would like to control for covariates, and hence I decided to use a Cox PH Model. However, after fitting model, I run the PH test using cox.zph() in R. All my covariates have corresponding p-value of $< 2 \\times 10^{-16}$. I tried stratifying using various variables, but that only marginally improves the p-value for some covariates.

\n

I am considering using different models now. I was suggested to use the Weibull model, but I am not sure if this will work as Weibull model also follows the PH assumption. So my questions is:

\n

i) Is there any point trying to use a Weibull model?

\n

ii) What other models should I consider using?

\n", "question_id": 677099, "question_license": "CC BY-SA 4.0", "question_score": 4, "question_text": "I am using survival analysis to analyze unemployment duration from a panel dataset. I would like to control for covariates, and hence I decided to use a Cox PH Model. However, after fitting model, I run the PH test using cox.zph() in R. All my covariates have corresponding p-value of $< 2 \\times 10^{-16}$. I tried stratifying using various variables, but that only marginally improves the p-value for some covariates.\n\n\n\n\nI am considering using different models now. I was suggested to use the Weibull model, but I am not sure if this will work as Weibull model also follows the PH assumption. So my questions is:\n\n\n\n\ni) Is there any point trying to use a Weibull model?\n\n\n\n\nii) What other models should I consider using?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Jyotiraditya Pradhan", "profile_url": "https://stats.stackexchange.com/users/516391/jyotiraditya-pradhan", "user_type": "registered"}, "created_at": "2026-09-08T09:32:39+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "CB9BCE6F-95A0-421A-95ED-573B1B48D672", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/CB9BCE6F-95A0-421A-95ED-573B1B48D672/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-09-08T17:46:34+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "526A8939-CD1A-4CBE-9348-A46579D30E48", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://stats.stackexchange.com/revisions/526A8939-CD1A-4CBE-9348-A46579D30E48/view-source"}], "source_site": "stats", "source_url": "https://stats.stackexchange.com/questions/677099/if-ph-assumption-is-failing-when-using-cox-ph-model-is-using-weibull-helpful", "split": "validation", "split_group": "6da6bb4e3c33593ced4d29574089843aded6ada336baf0e13fea5ac0dd464d18", "tags": ["survival", "cox-model", "weibull-distribution"], "thread_id": "stats:677099", "title": "If PH assumption is failing when using Cox-PH model, is using Weibull helpful?"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "

Yes.

\n

This is shown in Nekouei et al 2019 that a very similar result holds:

\n

$$N_d[X]+N_d[Y] \\leq 2 N_d[X+Y]$$

\n

where

\n

$$N_d[X] \\triangleq \\frac{1}{2\\pi e}e^{2H[X]}$$

\n

$$H[X] \\triangleq - \\sum_{i} \\Pr[X=x_i]\\log \\Pr[X=x_i]$$

\n", "answer_id": 677276, "answer_text": "Yes.\n\n\n\n\nThis is shown in Nekouei et al 2019 (https://arxiv.org/html/1905.03015v1) that a very similar result holds:\n\n\n\n\n$$N_d[X]+N_d[Y] \\leq 2 N_d[X+Y]$$\n\n\n\n\nwhere\n\n\n\n\n$$N_d[X] \\triangleq \\frac{1}{2\\pi e}e^{2H[X]}$$\n\n\n\n\n$$H[X] \\triangleq - \\sum_{i} \\Pr[X=x_i]\\log \\Pr[X=x_i]$$", "answer_url": "https://stats.stackexchange.com/a/677276", "author": "Galen", "author_url": "https://stats.stackexchange.com/users/69508/galen", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-27T03:19:11+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:08.569053+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/ba8a114171cbec551f0a7f4b9f04e95c559131a62357d51e159434d4acc7183d_1790825228829630100_0.json", "raw_sha256": "a03822ca860dd0b0fb0cc402754ae4cdbaad51d18873dfd19aed56ffe1cf7ec8", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=2&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677275, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Galen", "profile_url": "https://stats.stackexchange.com/users/69508/galen", "user_type": "registered"}, "created_at": "2026-09-27T03:19:11+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "88C57361-C89B-4371-BA6D-A50C945B5C2D", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/88C57361-C89B-4371-BA6D-A50C945B5C2D/view-source"}], "score": 0, "updated_at": "2026-09-27T03:19:11+00:00"}, {"answer_html": "

Yes, but not as a direct analogue of the continuous EPI.

\n

Simply replacing differential entropy $h$ by discrete Shannon entropy $H$ does not make

\n

$$N(X+Y)\\geq N(X)+N(Y)$$

\n

valid in general.

\n

However, discrete EPI-type results do exist. For example, for i.i.d. integer-valued random variables $X,X'$, Haghighatshoar, Abbe and Telatar proved that

\n

$$H(X+X')-H(X)\\geq g(H(X)),$$

\n

where $g$ is a universal function, positive whenever $H(X)>0$.

\n

So there is no exact universal discrete counterpart obtained merely by replacing $h$ with $H$, but there are meaningful discrete analogues under appropriate assumptions.

\n

Reference: S. Haghighatshoar, E. Abbe & E. Telatar, A New Entropy Power Inequality for Integer-Valued Random Variables, IEEE Transactions on Information Theory, 60(7), 2014.

\n", "answer_id": 677277, "answer_text": "Yes, but not as a direct analogue of the continuous EPI.\n\n\n\n\nSimply replacing differential entropy $h$ by discrete Shannon entropy $H$ does not make\n\n\n\n\n$$N(X+Y)\\geq N(X)+N(Y)$$\n\n\n\n\nvalid in general.\n\n\n\n\nHowever, discrete EPI-type results do exist. For example, for i.i.d. integer-valued random variables $X,X'$, Haghighatshoar, Abbe and Telatar proved that\n\n\n\n\n$$H(X+X')-H(X)\\geq g(H(X)),$$\n\n\n\n\nwhere $g$ is a universal function, positive whenever $H(X)>0$.\n\n\n\n\nSo there is no exact universal discrete counterpart obtained merely by replacing $h$ with $H$, but there are meaningful discrete analogues under appropriate assumptions.\n\n\n\n\nReference: S. Haghighatshoar, E. Abbe & E. Telatar, A New Entropy Power Inequality for Integer-Valued Random Variables, IEEE Transactions on Information Theory, 60(7), 2014.", "answer_url": "https://stats.stackexchange.com/a/677277", "author": "Ghislain TSHALWE", "author_url": "https://stats.stackexchange.com/users/517102/ghislain-tshalwe", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-27T07:47:52+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:08.569053+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/ba8a114171cbec551f0a7f4b9f04e95c559131a62357d51e159434d4acc7183d_1790825228829630100_0.json", "raw_sha256": "a03822ca860dd0b0fb0cc402754ae4cdbaad51d18873dfd19aed56ffe1cf7ec8", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=2&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677275, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Ghislain TSHALWE", "profile_url": "https://stats.stackexchange.com/users/517102/ghislain-tshalwe", "user_type": "registered"}, "created_at": "2026-09-27T07:47:52+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "84D476DD-675E-499A-A6C7-A248DC56C8DA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/84D476DD-675E-499A-A6C7-A248DC56C8DA/view-source"}], "score": 0, "updated_at": "2026-09-27T07:47:52+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "The entropy power inequality (https://en.wikipedia.org/wiki/Entropy_power_inequality) is defined on continuous random variables.\n\n\n\n\n$$N[X+Y] \\geq N[X] + N[Y]$$\n\n\n\n\nwhere\n\n\n\n\n$$N[X] \\triangleq \\frac{1}{2\\pi e}e^{\\frac{2}{n}h(X)}$$\n$$h(X) \\triangleq -\\int_{\\mathbb{R}^n}f(x)\\log f(x) dx$$\n\n\n\n\nIs there an analogous result for discrete random variables?", "record_id": "Scientific-Answer-Ranking:stats:677275", "scores": [0, 0], "split": "validation", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "

Yes.

\n

This is shown in Nekouei et al 2019 that a very similar result holds:

\n

$$N_d[X]+N_d[Y] \\leq 2 N_d[X+Y]$$

\n

where

\n

$$N_d[X] \\triangleq \\frac{1}{2\\pi e}e^{2H[X]}$$

\n

$$H[X] \\triangleq - \\sum_{i} \\Pr[X=x_i]\\log \\Pr[X=x_i]$$

\n", "answer_id": 677276, "answer_text": "Yes.\n\n\n\n\nThis is shown in Nekouei et al 2019 (https://arxiv.org/html/1905.03015v1) that a very similar result holds:\n\n\n\n\n$$N_d[X]+N_d[Y] \\leq 2 N_d[X+Y]$$\n\n\n\n\nwhere\n\n\n\n\n$$N_d[X] \\triangleq \\frac{1}{2\\pi e}e^{2H[X]}$$\n\n\n\n\n$$H[X] \\triangleq - \\sum_{i} \\Pr[X=x_i]\\log \\Pr[X=x_i]$$", "answer_url": "https://stats.stackexchange.com/a/677276", "author": "Galen", "author_url": "https://stats.stackexchange.com/users/69508/galen", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-27T03:19:11+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:08.569053+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/ba8a114171cbec551f0a7f4b9f04e95c559131a62357d51e159434d4acc7183d_1790825228829630100_0.json", "raw_sha256": "a03822ca860dd0b0fb0cc402754ae4cdbaad51d18873dfd19aed56ffe1cf7ec8", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=2&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677275, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Galen", "profile_url": "https://stats.stackexchange.com/users/69508/galen", "user_type": "registered"}, "created_at": "2026-09-27T03:19:11+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "88C57361-C89B-4371-BA6D-A50C945B5C2D", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/88C57361-C89B-4371-BA6D-A50C945B5C2D/view-source"}], "score": 0, "updated_at": "2026-09-27T03:19:11+00:00"}, {"answer_html": "

Yes, but not as a direct analogue of the continuous EPI.

\n

Simply replacing differential entropy $h$ by discrete Shannon entropy $H$ does not make

\n

$$N(X+Y)\\geq N(X)+N(Y)$$

\n

valid in general.

\n

However, discrete EPI-type results do exist. For example, for i.i.d. integer-valued random variables $X,X'$, Haghighatshoar, Abbe and Telatar proved that

\n

$$H(X+X')-H(X)\\geq g(H(X)),$$

\n

where $g$ is a universal function, positive whenever $H(X)>0$.

\n

So there is no exact universal discrete counterpart obtained merely by replacing $h$ with $H$, but there are meaningful discrete analogues under appropriate assumptions.

\n

Reference: S. Haghighatshoar, E. Abbe & E. Telatar, A New Entropy Power Inequality for Integer-Valued Random Variables, IEEE Transactions on Information Theory, 60(7), 2014.

\n", "answer_id": 677277, "answer_text": "Yes, but not as a direct analogue of the continuous EPI.\n\n\n\n\nSimply replacing differential entropy $h$ by discrete Shannon entropy $H$ does not make\n\n\n\n\n$$N(X+Y)\\geq N(X)+N(Y)$$\n\n\n\n\nvalid in general.\n\n\n\n\nHowever, discrete EPI-type results do exist. For example, for i.i.d. integer-valued random variables $X,X'$, Haghighatshoar, Abbe and Telatar proved that\n\n\n\n\n$$H(X+X')-H(X)\\geq g(H(X)),$$\n\n\n\n\nwhere $g$ is a universal function, positive whenever $H(X)>0$.\n\n\n\n\nSo there is no exact universal discrete counterpart obtained merely by replacing $h$ with $H$, but there are meaningful discrete analogues under appropriate assumptions.\n\n\n\n\nReference: S. Haghighatshoar, E. Abbe & E. Telatar, A New Entropy Power Inequality for Integer-Valued Random Variables, IEEE Transactions on Information Theory, 60(7), 2014.", "answer_url": "https://stats.stackexchange.com/a/677277", "author": "Ghislain TSHALWE", "author_url": "https://stats.stackexchange.com/users/517102/ghislain-tshalwe", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-27T07:47:52+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:08.569053+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/ba8a114171cbec551f0a7f4b9f04e95c559131a62357d51e159434d4acc7183d_1790825228829630100_0.json", "raw_sha256": "a03822ca860dd0b0fb0cc402754ae4cdbaad51d18873dfd19aed56ffe1cf7ec8", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=2&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677275, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Ghislain TSHALWE", "profile_url": "https://stats.stackexchange.com/users/517102/ghislain-tshalwe", "user_type": "registered"}, "created_at": "2026-09-27T07:47:52+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "84D476DD-675E-499A-A6C7-A248DC56C8DA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/84D476DD-675E-499A-A6C7-A248DC56C8DA/view-source"}], "score": 0, "updated_at": "2026-09-27T07:47:52+00:00"}], "domain": "statistics", "external_links": ["https://arxiv.org/html/1905.03015v1", "https://en.wikipedia.org/wiki/Entropy_power_inequality"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Galen", "question_author_url": "https://stats.stackexchange.com/users/69508/galen", "question_author_user_type": "registered", "question_created_at": "2026-09-27T03:17:37+00:00", "question_html": "

The entropy power inequality is defined on continuous random variables.

\n

$$N[X+Y] \\geq N[X] + N[Y]$$

\n

where

\n

$$N[X] \\triangleq \\frac{1}{2\\pi e}e^{\\frac{2}{n}h(X)}$$\n$$h(X) \\triangleq -\\int_{\\mathbb{R}^n}f(x)\\log f(x) dx$$

\n

Is there an analogous result for discrete random variables?

\n", "question_id": 677275, "question_license": "CC BY-SA 4.0", "question_score": 0, "question_text": "The entropy power inequality (https://en.wikipedia.org/wiki/Entropy_power_inequality) is defined on continuous random variables.\n\n\n\n\n$$N[X+Y] \\geq N[X] + N[Y]$$\n\n\n\n\nwhere\n\n\n\n\n$$N[X] \\triangleq \\frac{1}{2\\pi e}e^{\\frac{2}{n}h(X)}$$\n$$h(X) \\triangleq -\\int_{\\mathbb{R}^n}f(x)\\log f(x) dx$$\n\n\n\n\nIs there an analogous result for discrete random variables?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Galen", "profile_url": "https://stats.stackexchange.com/users/69508/galen", "user_type": "registered"}, "created_at": "2026-09-27T03:17:37+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "3797B37E-74AE-4A2F-9573-37DD0EEB9DCD", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/3797B37E-74AE-4A2F-9573-37DD0EEB9DCD/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Galen", "profile_url": "https://stats.stackexchange.com/users/69508/galen", "user_type": "registered"}, "created_at": "2026-09-27T03:19:51+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "9D51A372-C029-4708-A501-704874A2B11C", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/9D51A372-C029-4708-A501-704874A2B11C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Galen", "profile_url": "https://stats.stackexchange.com/users/69508/galen", "user_type": "registered"}, "created_at": "2026-09-27T03:36:43+00:00", "raw_file": "raw/codex_api_v1/ab5f4cd7f0a10bde5970354a9b213efcc81e232042487437e8579705d4ca6a20_1790825258916612700_0.json", "raw_sha256": "4cf167c399d03b9ae013b65260fcb4e38139c42cfc70aba4807f070550c1768e", "revision_guid": "460F551E-BD45-4EBC-8A2A-5695BDBCFB47", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/460F551E-BD45-4EBC-8A2A-5695BDBCFB47/view-source"}], "source_site": "stats", "source_url": "https://stats.stackexchange.com/questions/677275/is-there-a-discrete-analog-of-the-entropy-power-inequality", "split": "validation", "split_group": "0838d62c0bf3ef8ac843c59ad66d008d2a79de2fb7411d0c3574ed0da8e12bde", "tags": ["information-theory", "inequality", "entropy-power"], "thread_id": "stats:677275", "title": "Is there a discrete analog of the entropy power inequality?"}} {"accepted_status": [false, false, false], "candidate_answers": [{"answer_html": "

The Dykstra Projection Algorithm is basically the ADMM Framework.
\nHence my idea is to use adaptive $\\rho$ parameter according to the different relative errors as in Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers in part 3.4.

\n", "answer_id": 45264, "answer_text": "The Dykstra Projection Algorithm (https://en.wikipedia.org/wiki/Dykstra%27s_projection_algorithm) is basically the ADMM Framework.\n\nHence my idea is to use adaptive $\\rho$ parameter according to the different relative errors as in Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers (https://web.stanford.edu/%7Eboyd/papers/admm_distr_stats.html) in part 3.4.", "answer_url": "https://scicomp.stackexchange.com/a/45264", "author": "Royi", "author_url": "https://scicomp.stackexchange.com/users/7951/royi", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T08:06:52+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T08:06:52+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "CB7599F6-93BC-4F4B-AEE5-1088862B4D12", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/CB7599F6-93BC-4F4B-AEE5-1088862B4D12/view-source"}], "score": 0, "updated_at": "2025-10-25T08:06:52+00:00"}, {"answer_html": "

Assuming the matrix $\\boldsymbol{A}$ is dense:

\n
function SolveDysktra( vY :: Vector{T}, mA :: Matrix{T}, vB :: Vector{T}, vL :: Vector{T}, vU :: Vector{T}; numIterations = 100 ) where {T <: AbstractFloat}\n\n    numElements = length(vY);\n    vX = copy(vY);\n    vZ = zeros(T, numElements);\n    vP = zeros(T, numElements);\n    vQ = zeros(T, numElements);\n    vT = zeros(T, numElements);\n\n    sSvd = svd(mA);\n    mVV = sSvd.V * sSvd.Vt;\n    # mVS⁺Uᵗ = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U';\n\n    vBB = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U' * vB;\n    \n    for _ in 1:numIterations\n\n        vZ .= vX .+ vP;\n        # Project `vZ` onto the Linear Equality\n        mul!(vT, mVV, vZ);\n        # vZ .= vZ .- vT .+ vBB;\n        vZ .+= vBB .- vT;\n\n        vP .+= vX .- vZ;\n\n        vX .= vZ .+ vQ;\n        # Project `vX` onto the Box Constraints\n        vX .= clamp.(vX, vL, vU);\n        vQ .+= vZ .- vX;\n\n    end\n\n    return vX;\n\nend\n
\n

Remark: I'd be happy to see an efficient case of the Sparse case.

\n", "answer_id": 45265, "answer_text": "Assuming the matrix $\\boldsymbol{A}$ is dense:\n\n\n\n\nfunction SolveDysktra( vY :: Vector{T}, mA :: Matrix{T}, vB :: Vector{T}, vL :: Vector{T}, vU :: Vector{T}; numIterations = 100 ) where {T <: AbstractFloat}\n\n numElements = length(vY);\n vX = copy(vY);\n vZ = zeros(T, numElements);\n vP = zeros(T, numElements);\n vQ = zeros(T, numElements);\n vT = zeros(T, numElements);\n\n sSvd = svd(mA);\n mVV = sSvd.V * sSvd.Vt;\n # mVS⁺Uᵗ = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U';\n\n vBB = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U' * vB;\n \n for _ in 1:numIterations\n\n vZ .= vX .+ vP;\n # Project `vZ` onto the Linear Equality\n mul!(vT, mVV, vZ);\n # vZ .= vZ .- vT .+ vBB;\n vZ .+= vBB .- vT;\n\n vP .+= vX .- vZ;\n\n vX .= vZ .+ vQ;\n # Project `vX` onto the Box Constraints\n vX .= clamp.(vX, vL, vU);\n vQ .+= vZ .- vX;\n\n end\n\n return vX;\n\nend\n\n\n\n\n\nRemark: I'd be happy to see an efficient case of the Sparse case.", "answer_url": "https://scicomp.stackexchange.com/a/45265", "author": "Royi", "author_url": "https://scicomp.stackexchange.com/users/7951/royi", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T12:41:28+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T12:41:28+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "DEFDA34D-10C0-48A1-B4C0-85196E02AF64", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/DEFDA34D-10C0-48A1-B4C0-85196E02AF64/view-source"}], "score": 1, "updated_at": "2025-10-25T12:41:28+00:00"}, {"answer_html": "

Read (if you're lucky, from your university's library)\nTrust Region Methods, Conn, Gould, and Toint [SIAM (2000)] and its associated implementation in scipy.optimize.minimize(method='trust-constr'). It will run for both the sparse and dense cases, though it may or may not be the most efficient approach in the dense case.

\n

Set:

\n\n

In my testing, this converges to an optimality of $2.7 \\times 10^{-5}$ within 14 calls to the cost function for a problem size of 15x200 and density 15%.

\n

\"convergence\"

\n", "answer_id": 45266, "answer_text": "Read (if you're lucky, from your university's library)\nTrust Region Methods, Conn, Gould, and Toint [SIAM (2000)] (https://epubs.siam.org/doi/book/10.1137/1.9780898719857) and its associated implementation in scipy.optimize.minimize(method='trust-constr') (https://docs.scipy.org/doc/scipy/reference/optimize.minimize-trustconstr.html). It will run for both the sparse and dense cases, though it may or may not be the most efficient approach in the dense case.\n\n\n\n\nSet:\n\n\n\n\n\nsparse_jacobian = True\n\n\n\n\nfactorization_method = 'AugmentedSystem'\n\n\n\n\nYour jac and hess to functions where you provide the analytic Jacobian and Hessian of the cost function. Very simply, the Jacobian is $x - y$, and the Hessian is the (sparse) identity matrix.\n\n\n\n\nIn the upper-level minimize (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html) interface, bounds by your $l$ and $u$\n\n\n\n\nconstraints to a LinearConstraint (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.LinearConstraint.html) by your $A$ and using a scipy sparse array\n\n\n\n\nx0 to a sensible initial estimate\n\n\n\n\n\nIn my testing, this converges to an optimality of $2.7 \\times 10^{-5}$ within 14 calls to the cost function for a problem size of 15x200 and density 15%.\n\n\n\n\n[image: convergence; source: https://i.sstatic.net/YJ8UEXx7.png] (https://i.sstatic.net/YJ8UEXx7.png)", "answer_url": "https://scicomp.stackexchange.com/a/45266", "author": "Reinderien", "author_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T13:17:14+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T13:17:14+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "77444703-E320-475F-B89E-303773BDEE64", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/77444703-E320-475F-B89E-303773BDEE64/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T19:40:38+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "C04032E9-FCDC-40CF-857D-605E6541C00E", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/C04032E9-FCDC-40CF-857D-605E6541C00E/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T19:54:56+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "09D74CCF-7C0C-4138-9B77-B959EBA73CBB", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/09D74CCF-7C0C-4138-9B77-B959EBA73CBB/view-source"}], "score": 2, "updated_at": "2025-10-25T19:54:56+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "Solve the following problem:\n\n\n\n\n$$\n\\begin{alignat*}{3}\n\\arg \\min_{ \\boldsymbol{x} } & \\quad & \\frac{1}{2} \\left\\| \\boldsymbol{x} - \\boldsymbol{y} \\right\\|_{2}^{2} \\\\\n\\text{subject to} & \\quad & \\boldsymbol{A} \\boldsymbol{x} = \\boldsymbol{b} \\\\\n& \\quad & \\boldsymbol{x} \\leq \\boldsymbol{u} \\\\\n& \\quad & \\boldsymbol{x} \\geq \\boldsymbol{l} \\\\\n\\end{alignat*}\n$$\n\n\n\n\nWhere $\\boldsymbol{A} \\in \\mathbb{R}^{m \\times n}, \\; n \\gg m$ with independent rows.\n\n\n\n\nI want to solve it for the cases:\n\n\n\n\n\nThe matrix $\\boldsymbol{A}$ is dense.\n\n\n\n\nThe matrix $\\boldsymbol{A}$ is sparse.\n\n\n\n\n\nIn most efficient way without using high level solvers.\n\nBut just Use MATLAB / Python / Julia with their own Linear Algebra / Sparse libraries.\n\n\n\n\nCurrently my approach is to use Dykstra Projection Algorithm (https://en.wikipedia.org/wiki/Dykstra%27s_projection_algorithm).\n\nI wonder if there are some acceleration tricks.", "record_id": "Scientific-Answer-Ranking:scicomp:45263", "scores": [0, 1, 2], "split": "validation", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "

The Dykstra Projection Algorithm is basically the ADMM Framework.
\nHence my idea is to use adaptive $\\rho$ parameter according to the different relative errors as in Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers in part 3.4.

\n", "answer_id": 45264, "answer_text": "The Dykstra Projection Algorithm (https://en.wikipedia.org/wiki/Dykstra%27s_projection_algorithm) is basically the ADMM Framework.\n\nHence my idea is to use adaptive $\\rho$ parameter according to the different relative errors as in Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers (https://web.stanford.edu/%7Eboyd/papers/admm_distr_stats.html) in part 3.4.", "answer_url": "https://scicomp.stackexchange.com/a/45264", "author": "Royi", "author_url": "https://scicomp.stackexchange.com/users/7951/royi", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T08:06:52+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T08:06:52+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "CB7599F6-93BC-4F4B-AEE5-1088862B4D12", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/CB7599F6-93BC-4F4B-AEE5-1088862B4D12/view-source"}], "score": 0, "updated_at": "2025-10-25T08:06:52+00:00"}, {"answer_html": "

Assuming the matrix $\\boldsymbol{A}$ is dense:

\n
function SolveDysktra( vY :: Vector{T}, mA :: Matrix{T}, vB :: Vector{T}, vL :: Vector{T}, vU :: Vector{T}; numIterations = 100 ) where {T <: AbstractFloat}\n\n    numElements = length(vY);\n    vX = copy(vY);\n    vZ = zeros(T, numElements);\n    vP = zeros(T, numElements);\n    vQ = zeros(T, numElements);\n    vT = zeros(T, numElements);\n\n    sSvd = svd(mA);\n    mVV = sSvd.V * sSvd.Vt;\n    # mVS⁺Uᵗ = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U';\n\n    vBB = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U' * vB;\n    \n    for _ in 1:numIterations\n\n        vZ .= vX .+ vP;\n        # Project `vZ` onto the Linear Equality\n        mul!(vT, mVV, vZ);\n        # vZ .= vZ .- vT .+ vBB;\n        vZ .+= vBB .- vT;\n\n        vP .+= vX .- vZ;\n\n        vX .= vZ .+ vQ;\n        # Project `vX` onto the Box Constraints\n        vX .= clamp.(vX, vL, vU);\n        vQ .+= vZ .- vX;\n\n    end\n\n    return vX;\n\nend\n
\n

Remark: I'd be happy to see an efficient case of the Sparse case.

\n", "answer_id": 45265, "answer_text": "Assuming the matrix $\\boldsymbol{A}$ is dense:\n\n\n\n\nfunction SolveDysktra( vY :: Vector{T}, mA :: Matrix{T}, vB :: Vector{T}, vL :: Vector{T}, vU :: Vector{T}; numIterations = 100 ) where {T <: AbstractFloat}\n\n numElements = length(vY);\n vX = copy(vY);\n vZ = zeros(T, numElements);\n vP = zeros(T, numElements);\n vQ = zeros(T, numElements);\n vT = zeros(T, numElements);\n\n sSvd = svd(mA);\n mVV = sSvd.V * sSvd.Vt;\n # mVS⁺Uᵗ = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U';\n\n vBB = sSvd.V * Diagonal(inv.(sSvd.S)) * sSvd.U' * vB;\n \n for _ in 1:numIterations\n\n vZ .= vX .+ vP;\n # Project `vZ` onto the Linear Equality\n mul!(vT, mVV, vZ);\n # vZ .= vZ .- vT .+ vBB;\n vZ .+= vBB .- vT;\n\n vP .+= vX .- vZ;\n\n vX .= vZ .+ vQ;\n # Project `vX` onto the Box Constraints\n vX .= clamp.(vX, vL, vU);\n vQ .+= vZ .- vX;\n\n end\n\n return vX;\n\nend\n\n\n\n\n\nRemark: I'd be happy to see an efficient case of the Sparse case.", "answer_url": "https://scicomp.stackexchange.com/a/45265", "author": "Royi", "author_url": "https://scicomp.stackexchange.com/users/7951/royi", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T12:41:28+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T12:41:28+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "DEFDA34D-10C0-48A1-B4C0-85196E02AF64", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/DEFDA34D-10C0-48A1-B4C0-85196E02AF64/view-source"}], "score": 1, "updated_at": "2025-10-25T12:41:28+00:00"}, {"answer_html": "

Read (if you're lucky, from your university's library)\nTrust Region Methods, Conn, Gould, and Toint [SIAM (2000)] and its associated implementation in scipy.optimize.minimize(method='trust-constr'). It will run for both the sparse and dense cases, though it may or may not be the most efficient approach in the dense case.

\n

Set:

\n\n

In my testing, this converges to an optimality of $2.7 \\times 10^{-5}$ within 14 calls to the cost function for a problem size of 15x200 and density 15%.

\n

\"convergence\"

\n", "answer_id": 45266, "answer_text": "Read (if you're lucky, from your university's library)\nTrust Region Methods, Conn, Gould, and Toint [SIAM (2000)] (https://epubs.siam.org/doi/book/10.1137/1.9780898719857) and its associated implementation in scipy.optimize.minimize(method='trust-constr') (https://docs.scipy.org/doc/scipy/reference/optimize.minimize-trustconstr.html). It will run for both the sparse and dense cases, though it may or may not be the most efficient approach in the dense case.\n\n\n\n\nSet:\n\n\n\n\n\nsparse_jacobian = True\n\n\n\n\nfactorization_method = 'AugmentedSystem'\n\n\n\n\nYour jac and hess to functions where you provide the analytic Jacobian and Hessian of the cost function. Very simply, the Jacobian is $x - y$, and the Hessian is the (sparse) identity matrix.\n\n\n\n\nIn the upper-level minimize (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html) interface, bounds by your $l$ and $u$\n\n\n\n\nconstraints to a LinearConstraint (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.LinearConstraint.html) by your $A$ and using a scipy sparse array\n\n\n\n\nx0 to a sensible initial estimate\n\n\n\n\n\nIn my testing, this converges to an optimality of $2.7 \\times 10^{-5}$ within 14 calls to the cost function for a problem size of 15x200 and density 15%.\n\n\n\n\n[image: convergence; source: https://i.sstatic.net/YJ8UEXx7.png] (https://i.sstatic.net/YJ8UEXx7.png)", "answer_url": "https://scicomp.stackexchange.com/a/45266", "author": "Reinderien", "author_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-25T13:17:14+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45263, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T13:17:14+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "77444703-E320-475F-B89E-303773BDEE64", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/77444703-E320-475F-B89E-303773BDEE64/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T19:40:38+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "C04032E9-FCDC-40CF-857D-605E6541C00E", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/C04032E9-FCDC-40CF-857D-605E6541C00E/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T19:54:56+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "09D74CCF-7C0C-4138-9B77-B959EBA73CBB", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/09D74CCF-7C0C-4138-9B77-B959EBA73CBB/view-source"}], "score": 2, "updated_at": "2025-10-25T19:54:56+00:00"}], "domain": "computational_science", "external_links": ["https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.LinearConstraint.html", "https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html", "https://docs.scipy.org/doc/scipy/reference/optimize.minimize-trustconstr.html", "https://en.wikipedia.org/wiki/Dykstra%27s_projection_algorithm", "https://epubs.siam.org/doi/book/10.1137/1.9780898719857", "https://i.sstatic.net/YJ8UEXx7.png", "https://web.stanford.edu/%7Eboyd/papers/admm_distr_stats.html"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:44.584971+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/272744bcc95b58699f7df6e6979b288bb8b00a80ab9c7982dbe170a6d0b63584_1790825325025901700_0.json", "raw_sha256": "27a81850a40920682c29ada76a2b55e80340a5c82764a3e9dde8a9c2ba23db4e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Royi", "question_author_url": "https://scicomp.stackexchange.com/users/7951/royi", "question_author_user_type": "registered", "question_created_at": "2025-10-25T07:56:29+00:00", "question_html": "

Solve the following problem:

\n

$$\n\\begin{alignat*}{3}\n\\arg \\min_{ \\boldsymbol{x} } & \\quad & \\frac{1}{2} \\left\\| \\boldsymbol{x} - \\boldsymbol{y} \\right\\|_{2}^{2} \\\\\n\\text{subject to} & \\quad & \\boldsymbol{A} \\boldsymbol{x} = \\boldsymbol{b} \\\\\n& \\quad & \\boldsymbol{x} \\leq \\boldsymbol{u} \\\\\n& \\quad & \\boldsymbol{x} \\geq \\boldsymbol{l} \\\\\n\\end{alignat*}\n$$

\n

Where $\\boldsymbol{A} \\in \\mathbb{R}^{m \\times n}, \\; n \\gg m$ with independent rows.

\n

I want to solve it for the cases:

\n\n

In most efficient way without using high level solvers.
\nBut just Use MATLAB / Python / Julia with their own Linear Algebra / Sparse libraries.

\n

Currently my approach is to use Dykstra Projection Algorithm.
\nI wonder if there are some acceleration tricks.

\n", "question_id": 45263, "question_license": "CC BY-SA 4.0", "question_score": 1, "question_text": "Solve the following problem:\n\n\n\n\n$$\n\\begin{alignat*}{3}\n\\arg \\min_{ \\boldsymbol{x} } & \\quad & \\frac{1}{2} \\left\\| \\boldsymbol{x} - \\boldsymbol{y} \\right\\|_{2}^{2} \\\\\n\\text{subject to} & \\quad & \\boldsymbol{A} \\boldsymbol{x} = \\boldsymbol{b} \\\\\n& \\quad & \\boldsymbol{x} \\leq \\boldsymbol{u} \\\\\n& \\quad & \\boldsymbol{x} \\geq \\boldsymbol{l} \\\\\n\\end{alignat*}\n$$\n\n\n\n\nWhere $\\boldsymbol{A} \\in \\mathbb{R}^{m \\times n}, \\; n \\gg m$ with independent rows.\n\n\n\n\nI want to solve it for the cases:\n\n\n\n\n\nThe matrix $\\boldsymbol{A}$ is dense.\n\n\n\n\nThe matrix $\\boldsymbol{A}$ is sparse.\n\n\n\n\n\nIn most efficient way without using high level solvers.\n\nBut just Use MATLAB / Python / Julia with their own Linear Algebra / Sparse libraries.\n\n\n\n\nCurrently my approach is to use Dykstra Projection Algorithm (https://en.wikipedia.org/wiki/Dykstra%27s_projection_algorithm).\n\nI wonder if there are some acceleration tricks.", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T07:56:29+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "DF5239D1-D290-4E4D-8617-75F92FF57C54", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/DF5239D1-D290-4E4D-8617-75F92FF57C54/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T08:26:46+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "2BF9CB7D-E76F-4860-A4F6-A56EC7531A4A", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/2BF9CB7D-E76F-4860-A4F6-A56EC7531A4A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Royi", "profile_url": "https://scicomp.stackexchange.com/users/7951/royi", "user_type": "registered"}, "created_at": "2025-10-25T13:00:20+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "2EBDE250-18A1-48AB-86D2-B3F738B95AF9", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/2EBDE250-18A1-48AB-86D2-B3F738B95AF9/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2025-10-25T14:18:00+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "A9C67614-2757-42FE-A099-DC88CD488EA4", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/A9C67614-2757-42FE-A099-DC88CD488EA4/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2025-10-25T16:07:18+00:00", "raw_file": "raw/codex_api_v1/932c57dde4e92dfe2af05c19643e98b6494a44cb31534e6703e92349c4e07eb4_1790825333093747000_0.json", "raw_sha256": "646e25c86dbb0c4df1ebe365442e733a253ac993340d2ed18168bbf783f75cac", "revision_guid": "317E066A-AF61-43AC-9D80-48169DD78101", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://scicomp.stackexchange.com/revisions/317E066A-AF61-43AC-9D80-48169DD78101/view-source"}], "source_site": "scicomp", "source_url": "https://scicomp.stackexchange.com/questions/45263/solve-projection-problem-with-linear-equality-and-box-constraints", "split": "validation", "split_group": "db5d84e70e2cb0351ad77431557fa05dcc2c5f563d95a98224a953d7fd1bf99c", "tags": ["linear-algebra", "convex-optimization", "projection"], "thread_id": "scicomp:45263", "title": "Solve Projection Problem with Linear Equality and Box Constraints"}} {"accepted_status": [false, false, true, false, false], "candidate_answers": [{"answer_html": "

One reason to do this is that a "synthetic data set" can be made available to other researchers while privacy considerations might prevent the sharing of the actual original data set.

\n

Of course, this leaves the problem of checking that the synthesis procedure didn't alter the data in undesirable ways. One option would be to ask the peer reviewers to examine the actual and synthetic data sets for problems.

\n", "answer_id": 45475, "answer_text": "One reason to do this is that a \"synthetic data set\" can be made available to other researchers while privacy considerations might prevent the sharing of the actual original data set.\n\n\n\n\nOf course, this leaves the problem of checking that the synthesis procedure didn't alter the data in undesirable ways. One option would be to ask the peer reviewers to examine the actual and synthetic data sets for problems.", "answer_url": "https://scicomp.stackexchange.com/a/45475", "author": "Brian Borchers", "author_url": "https://scicomp.stackexchange.com/users/2150/brian-borchers", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T03:32:57+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Brian Borchers", "profile_url": "https://scicomp.stackexchange.com/users/2150/brian-borchers", "user_type": "registered"}, "created_at": "2026-06-26T03:32:57+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "AE0F0142-479D-46CB-8BE0-BD8B4FB1EA03", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/AE0F0142-479D-46CB-8BE0-BD8B4FB1EA03/view-source"}], "score": 2, "updated_at": "2026-06-26T03:32:57+00:00"}, {"answer_html": "

I believe "synthetic data" is very often used to designate data that we can only characterize as the result of a process with certain characteristics. Thus we do not have a complete analytic characterization, like statistical distribution.

\n

For example, we often use synthetic seismic data, meaning seismic waves generated by a time integrator for the elastic wave equations through a model of the Earth. We measure the virtual output at seismometers, and compare that to actual data. The result of the integrator cannot be neatly summarized as you indicate above. We have also done a similar thing using data from the simulation of the combustion chamber of a hybrid rocket to look at turbulent correlations.

\n", "answer_id": 45476, "answer_text": "I believe \"synthetic data\" is very often used to designate data that we can only characterize as the result of a process with certain characteristics. Thus we do not have a complete analytic characterization, like statistical distribution.\n\n\n\n\nFor example, we often use synthetic seismic data, meaning seismic waves generated by a time integrator for the elastic wave equations through a model of the Earth. We measure the virtual output at seismometers, and compare that to actual data. The result of the integrator cannot be neatly summarized as you indicate above. We have also done a similar thing using data from the simulation of the combustion chamber of a hybrid rocket to look at turbulent correlations.", "answer_url": "https://scicomp.stackexchange.com/a/45476", "author": "Matt Knepley", "author_url": "https://scicomp.stackexchange.com/users/21/matt-knepley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T14:38:38+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Matt Knepley", "profile_url": "https://scicomp.stackexchange.com/users/21/matt-knepley", "user_type": "registered"}, "created_at": "2026-06-26T14:38:38+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "B6A66FA8-FB59-4295-8D07-5C149B6459ED", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B6A66FA8-FB59-4295-8D07-5C149B6459ED/view-source"}], "score": 5, "updated_at": "2026-06-26T14:38:38+00:00"}, {"answer_html": "

I used to work at a company that created the kind of synthetic medical data that you're talking about. In our case, we did it so that we could show a demonstration of the system without revealing private health information. A ML Algorithm might not care about an individual's record, but a doctor or administrator would want to see how the whole system works before buying it. We wouldn't include the doctor's notes (too much risk of personal identifiable information being inserted there) but we could create alternative patient and doctor names, change dates within a certain acceptable range (a few years for birthdays, a few weeks for visits), stuff like that. It was changed just enough that no one could look at our demo and figure out which real world person's medical record it was associated with, but not enough to mess up analytics on the dataset.

\n

Another use case for synthetic data is when you simply don't have a natural dataset that's up to the task, so you create one. A fun example was Corridor Digital creating a synthetic dataset of green screen footage to make a better green screen remover. (Their video on it here) They couldn't rely on previously shot green screen footage because they needed flawless examples of what that same footage would look like with the green screen perfectly removed, so they created a completely digital training set of fake green screen footage and rendered the same scene without the background as the ground truth. The resulting model was able to work just fine with real world green screen footage, even though it wasn't part of the training dataset at all.

\n", "answer_id": 45478, "answer_text": "I used to work at a company that created the kind of synthetic medical data that you're talking about. In our case, we did it so that we could show a demonstration of the system without revealing private health information. A ML Algorithm might not care about an individual's record, but a doctor or administrator would want to see how the whole system works before buying it. We wouldn't include the doctor's notes (too much risk of personal identifiable information being inserted there) but we could create alternative patient and doctor names, change dates within a certain acceptable range (a few years for birthdays, a few weeks for visits), stuff like that. It was changed just enough that no one could look at our demo and figure out which real world person's medical record it was associated with, but not enough to mess up analytics on the dataset.\n\n\n\n\nAnother use case for synthetic data is when you simply don't have a natural dataset that's up to the task, so you create one. A fun example was Corridor Digital creating a synthetic dataset of green screen footage to make a better green screen remover. (Their video on it here) (https://www.youtube.com/watch?v=3Ploi723hg4) They couldn't rely on previously shot green screen footage because they needed flawless examples of what that same footage would look like with the green screen perfectly removed, so they created a completely digital training set of fake green screen footage and rendered the same scene without the background as the ground truth. The resulting model was able to work just fine with real world green screen footage, even though it wasn't part of the training dataset at all.", "answer_url": "https://scicomp.stackexchange.com/a/45478", "author": "Dr. Cyanide", "author_url": "https://scicomp.stackexchange.com/users/56986/dr-cyanide", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T19:05:21+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dr. Cyanide", "profile_url": "https://scicomp.stackexchange.com/users/56986/dr-cyanide", "user_type": "registered"}, "created_at": "2026-06-26T19:05:21+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "58D1370C-30E1-48E0-85D3-61EF0F7449AA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/58D1370C-30E1-48E0-85D3-61EF0F7449AA/view-source"}], "score": 7, "updated_at": "2026-06-26T19:05:21+00:00"}, {"answer_html": "

Synthetic data in my area of machine learning just means using data generated by a model rather than "real" data collected from the environment. In my case, I often use synthetic data because you know what the true model is so you have "ground truth" you can use to judge the performance of your ML model. I use synthetic data in Monte Carlo simulations (where you perform the same analysis again and again with different data) as I can generate as much independent data as I like. This means I can detect biases in the ML models. Also because I can generate as much data as I like, I can get reliable performance estimates with a very low variance by having a very large test set. In those cases, I am usually investigating the properties of the learning algorithm, rather than the data or the process that generated the data (so there is no "over-interpretation").

\n

Another reason for using synthetic data is as a proof of concept, where there just isn't enough real data to meaningfully train a model.

\n

In other case, we can model the data in one direction very well, but want to do the prediction in the other direction. For instance, we might be able to work out what a magnetometer picks up when it runs over buried architectural remains, so we could use synthetic data to train a model to predict the depth of buried remains from magenetometer data, which archeologists could use to investigate historical sites without actually digging them up (save for a few test trenches used to validate the system). https://doi.org/10.1002/arp.236

\n

However it may mean other things in other fields.

\n", "answer_id": 45480, "answer_text": "Synthetic data in my area of machine learning just means using data generated by a model rather than \"real\" data collected from the environment. In my case, I often use synthetic data because you know what the true model is so you have \"ground truth\" you can use to judge the performance of your ML model. I use synthetic data in Monte Carlo simulations (where you perform the same analysis again and again with different data) as I can generate as much independent data as I like. This means I can detect biases in the ML models. Also because I can generate as much data as I like, I can get reliable performance estimates with a very low variance by having a very large test set. In those cases, I am usually investigating the properties of the learning algorithm, rather than the data or the process that generated the data (so there is no \"over-interpretation\").\n\n\n\n\nAnother reason for using synthetic data is as a proof of concept, where there just isn't enough real data to meaningfully train a model.\n\n\n\n\nIn other case, we can model the data in one direction very well, but want to do the prediction in the other direction. For instance, we might be able to work out what a magnetometer picks up when it runs over buried architectural remains, so we could use synthetic data to train a model to predict the depth of buried remains from magenetometer data, which archeologists could use to investigate historical sites without actually digging them up (save for a few test trenches used to validate the system). https://doi.org/10.1002/arp.236 (https://doi.org/10.1002/arp.236)\n\n\n\n\nHowever it may mean other things in other fields.", "answer_url": "https://scicomp.stackexchange.com/a/45480", "author": "Dikran Marsupial", "author_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-27T15:51:23+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-27T15:51:23+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "B3F429EC-FC98-4CEC-B864-39792D560780", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B3F429EC-FC98-4CEC-B864-39792D560780/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-27T15:56:36+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "5861285C-8F68-46CE-9D25-B14639ABD89C", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/5861285C-8F68-46CE-9D25-B14639ABD89C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-29T12:49:45+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "492BACCC-A8FD-4406-A28E-134F43DC4601", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/492BACCC-A8FD-4406-A28E-134F43DC4601/view-source"}], "score": 4, "updated_at": "2026-06-29T12:49:45+00:00"}, {"answer_html": "

Another instance when synthetic data is useful is when there is a very low probability event that you want to train on. In a completely natural sample (with our without aliased names) where an unlikely event is nonetheless important (think about a self-driving program where a person steps off the sidewalk in the dark pushing a bicycle). This event would be rare, if even existant in sampled data, but you can create enough instances of it, with some variations, in synthetic data.\nThe 15% of events that occur 85% of the time should not consume 85% of your training time, and important events that occur 0.1% of the time need much more than 0.1% of your training time if they are to be learned.

\n", "answer_id": 45483, "answer_text": "Another instance when synthetic data is useful is when there is a very low probability event that you want to train on. In a completely natural sample (with our without aliased names) where an unlikely event is nonetheless important (think about a self-driving program where a person steps off the sidewalk in the dark pushing a bicycle). This event would be rare, if even existant in sampled data, but you can create enough instances of it, with some variations, in synthetic data.\nThe 15% of events that occur 85% of the time should not consume 85% of your training time, and important events that occur 0.1% of the time need much more than 0.1% of your training time if they are to be learned.", "answer_url": "https://scicomp.stackexchange.com/a/45483", "author": "user2540850", "author_url": "https://scicomp.stackexchange.com/users/56990/user2540850", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-29T00:19:21+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "user2540850", "profile_url": "https://scicomp.stackexchange.com/users/56990/user2540850", "user_type": "registered"}, "created_at": "2026-06-29T00:19:21+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "EACE18B0-EE6C-4205-A703-1A9C528C32E8", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/EACE18B0-EE6C-4205-A703-1A9C528C32E8/view-source"}], "score": 1, "updated_at": "2026-06-29T00:19:21+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I recently see the term \"synthetic data\" bubbling up in funding calls and in my scientific context [e.g. 1 (https://www.sciencedirect.com/science/article/pii/S2001037024002393)]. My understanding of the term is that in cases where the actual dataset contains very sensitive information, it is possible to create a separate dataset which has the same statistical properties as the real one. Then people use and share the \"synthetic\" dataset either to feed it to a downstream algorithm or to test/validate software.\n\n\n\n\nOn the very first glance this approach sounds legitimate, because you strip all the privacy problems while retaining a dataset with the same statistical properties. My problem with this is, that by that very logic the only thing you are transporting/retaining from an information theory perspective is the statistical distribution. All which is downstream may only reasonable make use of that, - the distribution you used as input.\n\n\n\n\nThe odd thing is that that data is then used to train ML Algorithms, which in turn do regression to re-capture those same statistical properties. Overinterpretation beyond the statistics that generated the new distribution would be bad science. In a very strict sense you are not really creating actual data, you are generating a random distribution which has the desired statistical properties.\n\n\n\n\nIf that is the case, then there is no need to generate \"synthetic data\" in the first place. We could just use statistical properties from the original real-world dataset and say out loud that we only use aggregated information, which does not contain sensitive elements, - and be done with it.\n\n\n\n\nThe more I think about it, the less it makes sense to me. What am I missing about \"synthetic datasets\"?", "record_id": "Scientific-Answer-Ranking:scicomp:45474", "scores": [2, 5, 7, 4, 1], "split": "validation", "thread": {"accepted_answer_id": 45478, "answers": [{"answer_html": "

One reason to do this is that a "synthetic data set" can be made available to other researchers while privacy considerations might prevent the sharing of the actual original data set.

\n

Of course, this leaves the problem of checking that the synthesis procedure didn't alter the data in undesirable ways. One option would be to ask the peer reviewers to examine the actual and synthetic data sets for problems.

\n", "answer_id": 45475, "answer_text": "One reason to do this is that a \"synthetic data set\" can be made available to other researchers while privacy considerations might prevent the sharing of the actual original data set.\n\n\n\n\nOf course, this leaves the problem of checking that the synthesis procedure didn't alter the data in undesirable ways. One option would be to ask the peer reviewers to examine the actual and synthetic data sets for problems.", "answer_url": "https://scicomp.stackexchange.com/a/45475", "author": "Brian Borchers", "author_url": "https://scicomp.stackexchange.com/users/2150/brian-borchers", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T03:32:57+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Brian Borchers", "profile_url": "https://scicomp.stackexchange.com/users/2150/brian-borchers", "user_type": "registered"}, "created_at": "2026-06-26T03:32:57+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "AE0F0142-479D-46CB-8BE0-BD8B4FB1EA03", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/AE0F0142-479D-46CB-8BE0-BD8B4FB1EA03/view-source"}], "score": 2, "updated_at": "2026-06-26T03:32:57+00:00"}, {"answer_html": "

I believe "synthetic data" is very often used to designate data that we can only characterize as the result of a process with certain characteristics. Thus we do not have a complete analytic characterization, like statistical distribution.

\n

For example, we often use synthetic seismic data, meaning seismic waves generated by a time integrator for the elastic wave equations through a model of the Earth. We measure the virtual output at seismometers, and compare that to actual data. The result of the integrator cannot be neatly summarized as you indicate above. We have also done a similar thing using data from the simulation of the combustion chamber of a hybrid rocket to look at turbulent correlations.

\n", "answer_id": 45476, "answer_text": "I believe \"synthetic data\" is very often used to designate data that we can only characterize as the result of a process with certain characteristics. Thus we do not have a complete analytic characterization, like statistical distribution.\n\n\n\n\nFor example, we often use synthetic seismic data, meaning seismic waves generated by a time integrator for the elastic wave equations through a model of the Earth. We measure the virtual output at seismometers, and compare that to actual data. The result of the integrator cannot be neatly summarized as you indicate above. We have also done a similar thing using data from the simulation of the combustion chamber of a hybrid rocket to look at turbulent correlations.", "answer_url": "https://scicomp.stackexchange.com/a/45476", "author": "Matt Knepley", "author_url": "https://scicomp.stackexchange.com/users/21/matt-knepley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T14:38:38+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Matt Knepley", "profile_url": "https://scicomp.stackexchange.com/users/21/matt-knepley", "user_type": "registered"}, "created_at": "2026-06-26T14:38:38+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "B6A66FA8-FB59-4295-8D07-5C149B6459ED", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B6A66FA8-FB59-4295-8D07-5C149B6459ED/view-source"}], "score": 5, "updated_at": "2026-06-26T14:38:38+00:00"}, {"answer_html": "

I used to work at a company that created the kind of synthetic medical data that you're talking about. In our case, we did it so that we could show a demonstration of the system without revealing private health information. A ML Algorithm might not care about an individual's record, but a doctor or administrator would want to see how the whole system works before buying it. We wouldn't include the doctor's notes (too much risk of personal identifiable information being inserted there) but we could create alternative patient and doctor names, change dates within a certain acceptable range (a few years for birthdays, a few weeks for visits), stuff like that. It was changed just enough that no one could look at our demo and figure out which real world person's medical record it was associated with, but not enough to mess up analytics on the dataset.

\n

Another use case for synthetic data is when you simply don't have a natural dataset that's up to the task, so you create one. A fun example was Corridor Digital creating a synthetic dataset of green screen footage to make a better green screen remover. (Their video on it here) They couldn't rely on previously shot green screen footage because they needed flawless examples of what that same footage would look like with the green screen perfectly removed, so they created a completely digital training set of fake green screen footage and rendered the same scene without the background as the ground truth. The resulting model was able to work just fine with real world green screen footage, even though it wasn't part of the training dataset at all.

\n", "answer_id": 45478, "answer_text": "I used to work at a company that created the kind of synthetic medical data that you're talking about. In our case, we did it so that we could show a demonstration of the system without revealing private health information. A ML Algorithm might not care about an individual's record, but a doctor or administrator would want to see how the whole system works before buying it. We wouldn't include the doctor's notes (too much risk of personal identifiable information being inserted there) but we could create alternative patient and doctor names, change dates within a certain acceptable range (a few years for birthdays, a few weeks for visits), stuff like that. It was changed just enough that no one could look at our demo and figure out which real world person's medical record it was associated with, but not enough to mess up analytics on the dataset.\n\n\n\n\nAnother use case for synthetic data is when you simply don't have a natural dataset that's up to the task, so you create one. A fun example was Corridor Digital creating a synthetic dataset of green screen footage to make a better green screen remover. (Their video on it here) (https://www.youtube.com/watch?v=3Ploi723hg4) They couldn't rely on previously shot green screen footage because they needed flawless examples of what that same footage would look like with the green screen perfectly removed, so they created a completely digital training set of fake green screen footage and rendered the same scene without the background as the ground truth. The resulting model was able to work just fine with real world green screen footage, even though it wasn't part of the training dataset at all.", "answer_url": "https://scicomp.stackexchange.com/a/45478", "author": "Dr. Cyanide", "author_url": "https://scicomp.stackexchange.com/users/56986/dr-cyanide", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-26T19:05:21+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dr. Cyanide", "profile_url": "https://scicomp.stackexchange.com/users/56986/dr-cyanide", "user_type": "registered"}, "created_at": "2026-06-26T19:05:21+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "58D1370C-30E1-48E0-85D3-61EF0F7449AA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/58D1370C-30E1-48E0-85D3-61EF0F7449AA/view-source"}], "score": 7, "updated_at": "2026-06-26T19:05:21+00:00"}, {"answer_html": "

Synthetic data in my area of machine learning just means using data generated by a model rather than "real" data collected from the environment. In my case, I often use synthetic data because you know what the true model is so you have "ground truth" you can use to judge the performance of your ML model. I use synthetic data in Monte Carlo simulations (where you perform the same analysis again and again with different data) as I can generate as much independent data as I like. This means I can detect biases in the ML models. Also because I can generate as much data as I like, I can get reliable performance estimates with a very low variance by having a very large test set. In those cases, I am usually investigating the properties of the learning algorithm, rather than the data or the process that generated the data (so there is no "over-interpretation").

\n

Another reason for using synthetic data is as a proof of concept, where there just isn't enough real data to meaningfully train a model.

\n

In other case, we can model the data in one direction very well, but want to do the prediction in the other direction. For instance, we might be able to work out what a magnetometer picks up when it runs over buried architectural remains, so we could use synthetic data to train a model to predict the depth of buried remains from magenetometer data, which archeologists could use to investigate historical sites without actually digging them up (save for a few test trenches used to validate the system). https://doi.org/10.1002/arp.236

\n

However it may mean other things in other fields.

\n", "answer_id": 45480, "answer_text": "Synthetic data in my area of machine learning just means using data generated by a model rather than \"real\" data collected from the environment. In my case, I often use synthetic data because you know what the true model is so you have \"ground truth\" you can use to judge the performance of your ML model. I use synthetic data in Monte Carlo simulations (where you perform the same analysis again and again with different data) as I can generate as much independent data as I like. This means I can detect biases in the ML models. Also because I can generate as much data as I like, I can get reliable performance estimates with a very low variance by having a very large test set. In those cases, I am usually investigating the properties of the learning algorithm, rather than the data or the process that generated the data (so there is no \"over-interpretation\").\n\n\n\n\nAnother reason for using synthetic data is as a proof of concept, where there just isn't enough real data to meaningfully train a model.\n\n\n\n\nIn other case, we can model the data in one direction very well, but want to do the prediction in the other direction. For instance, we might be able to work out what a magnetometer picks up when it runs over buried architectural remains, so we could use synthetic data to train a model to predict the depth of buried remains from magenetometer data, which archeologists could use to investigate historical sites without actually digging them up (save for a few test trenches used to validate the system). https://doi.org/10.1002/arp.236 (https://doi.org/10.1002/arp.236)\n\n\n\n\nHowever it may mean other things in other fields.", "answer_url": "https://scicomp.stackexchange.com/a/45480", "author": "Dikran Marsupial", "author_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-27T15:51:23+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-27T15:51:23+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "B3F429EC-FC98-4CEC-B864-39792D560780", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B3F429EC-FC98-4CEC-B864-39792D560780/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-27T15:56:36+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "5861285C-8F68-46CE-9D25-B14639ABD89C", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/5861285C-8F68-46CE-9D25-B14639ABD89C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dikran Marsupial", "profile_url": "https://scicomp.stackexchange.com/users/56988/dikran-marsupial", "user_type": "registered"}, "created_at": "2026-06-29T12:49:45+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "492BACCC-A8FD-4406-A28E-134F43DC4601", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/492BACCC-A8FD-4406-A28E-134F43DC4601/view-source"}], "score": 4, "updated_at": "2026-06-29T12:49:45+00:00"}, {"answer_html": "

Another instance when synthetic data is useful is when there is a very low probability event that you want to train on. In a completely natural sample (with our without aliased names) where an unlikely event is nonetheless important (think about a self-driving program where a person steps off the sidewalk in the dark pushing a bicycle). This event would be rare, if even existant in sampled data, but you can create enough instances of it, with some variations, in synthetic data.\nThe 15% of events that occur 85% of the time should not consume 85% of your training time, and important events that occur 0.1% of the time need much more than 0.1% of your training time if they are to be learned.

\n", "answer_id": 45483, "answer_text": "Another instance when synthetic data is useful is when there is a very low probability event that you want to train on. In a completely natural sample (with our without aliased names) where an unlikely event is nonetheless important (think about a self-driving program where a person steps off the sidewalk in the dark pushing a bicycle). This event would be rare, if even existant in sampled data, but you can create enough instances of it, with some variations, in synthetic data.\nThe 15% of events that occur 85% of the time should not consume 85% of your training time, and important events that occur 0.1% of the time need much more than 0.1% of your training time if they are to be learned.", "answer_url": "https://scicomp.stackexchange.com/a/45483", "author": "user2540850", "author_url": "https://scicomp.stackexchange.com/users/56990/user2540850", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-06-29T00:19:21+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45474, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "user2540850", "profile_url": "https://scicomp.stackexchange.com/users/56990/user2540850", "user_type": "registered"}, "created_at": "2026-06-29T00:19:21+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "EACE18B0-EE6C-4205-A703-1A9C528C32E8", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/EACE18B0-EE6C-4205-A703-1A9C528C32E8/view-source"}], "score": 1, "updated_at": "2026-06-29T00:19:21+00:00"}], "domain": "computational_science", "external_links": ["https://doi.org/10.1002/arp.236", "https://www.sciencedirect.com/science/article/pii/S2001037024002393", "https://www.youtube.com/watch?v=3Ploi723hg4"], "medical_sensitive": true, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:44.584971+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/272744bcc95b58699f7df6e6979b288bb8b00a80ab9c7982dbe170a6d0b63584_1790825325025901700_0.json", "raw_sha256": "27a81850a40920682c29ada76a2b55e80340a5c82764a3e9dde8a9c2ba23db4e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "MPIchael", "question_author_url": "https://scicomp.stackexchange.com/users/28636/mpichael", "question_author_user_type": "registered", "question_created_at": "2026-06-25T05:45:16+00:00", "question_html": "

I recently see the term "synthetic data" bubbling up in funding calls and in my scientific context [e.g. 1]. My understanding of the term is that in cases where the actual dataset contains very sensitive information, it is possible to create a separate dataset which has the same statistical properties as the real one. Then people use and share the "synthetic" dataset either to feed it to a downstream algorithm or to test/validate software.

\n

On the very first glance this approach sounds legitimate, because you strip all the privacy problems while retaining a dataset with the same statistical properties. My problem with this is, that by that very logic the only thing you are transporting/retaining from an information theory perspective is the statistical distribution. All which is downstream may only reasonable make use of that, - the distribution you used as input.

\n

The odd thing is that that data is then used to train ML Algorithms, which in turn do regression to re-capture those same statistical properties. Overinterpretation beyond the statistics that generated the new distribution would be bad science. In a very strict sense you are not really creating actual data, you are generating a random distribution which has the desired statistical properties.

\n

If that is the case, then there is no need to generate "synthetic data" in the first place. We could just use statistical properties from the original real-world dataset and say out loud that we only use aggregated information, which does not contain sensitive elements, - and be done with it.

\n

The more I think about it, the less it makes sense to me. What am I missing about "synthetic datasets"?

\n", "question_id": 45474, "question_license": "CC BY-SA 4.0", "question_score": 6, "question_text": "I recently see the term \"synthetic data\" bubbling up in funding calls and in my scientific context [e.g. 1 (https://www.sciencedirect.com/science/article/pii/S2001037024002393)]. My understanding of the term is that in cases where the actual dataset contains very sensitive information, it is possible to create a separate dataset which has the same statistical properties as the real one. Then people use and share the \"synthetic\" dataset either to feed it to a downstream algorithm or to test/validate software.\n\n\n\n\nOn the very first glance this approach sounds legitimate, because you strip all the privacy problems while retaining a dataset with the same statistical properties. My problem with this is, that by that very logic the only thing you are transporting/retaining from an information theory perspective is the statistical distribution. All which is downstream may only reasonable make use of that, - the distribution you used as input.\n\n\n\n\nThe odd thing is that that data is then used to train ML Algorithms, which in turn do regression to re-capture those same statistical properties. Overinterpretation beyond the statistics that generated the new distribution would be bad science. In a very strict sense you are not really creating actual data, you are generating a random distribution which has the desired statistical properties.\n\n\n\n\nIf that is the case, then there is no need to generate \"synthetic data\" in the first place. We could just use statistical properties from the original real-world dataset and say out loud that we only use aggregated information, which does not contain sensitive elements, - and be done with it.\n\n\n\n\nThe more I think about it, the less it makes sense to me. What am I missing about \"synthetic datasets\"?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "MPIchael", "profile_url": "https://scicomp.stackexchange.com/users/28636/mpichael", "user_type": "registered"}, "created_at": "2026-06-25T05:45:16+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "E2F45942-7443-4F15-8991-FDF70E27B9DF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/E2F45942-7443-4F15-8991-FDF70E27B9DF/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "MPIchael", "profile_url": "https://scicomp.stackexchange.com/users/28636/mpichael", "user_type": "registered"}, "created_at": "2026-06-25T09:09:59+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "D6187EC0-3D62-4D69-9E19-3DB7B82A7314", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/D6187EC0-3D62-4D69-9E19-3DB7B82A7314/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "MPIchael", "profile_url": "https://scicomp.stackexchange.com/users/28636/mpichael", "user_type": "registered"}, "created_at": "2026-06-25T09:16:19+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "53D91AF9-3EEF-4C30-8105-7FC997301F9A", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/53D91AF9-3EEF-4C30-8105-7FC997301F9A/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-06-26T12:51:11+00:00", "raw_file": "raw/codex_api_v1/09cbe10ae05462240864407122b451f89c4541eb0ee757adda70c0629772d57a_1790825351806992800_0.json", "raw_sha256": "34f3f34325937951c51090d8305fb513e1e88ef2ed40dcec5c0fe96d5710ba75", "revision_guid": "488B6C83-6596-4ED8-86C9-FE9F51E7A076", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://scicomp.stackexchange.com/revisions/488B6C83-6596-4ED8-86C9-FE9F51E7A076/view-source"}], "source_site": "scicomp", "source_url": "https://scicomp.stackexchange.com/questions/45474/what-is-the-reason-to-argue-for-and-use-synthetic-data", "split": "validation", "split_group": "8e0b7e37727c75b4e59812f04cf6fc964d362ec27f7b583cdb9e039295a5406d", "tags": ["statistics", "data-sets", "sample-statistics", "anonymization"], "thread_id": "scicomp:45474", "title": "What is the reason to argue for and use \"synthetic data\"?"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "

I'm not sure, but I suspect the answer here is a general "no".

\n

The reason I say this is that stereo microscopes typically do not have the magnifications needed to see the mycelium and other structures needed for ID of fungi clearly. For this you need a minimum of 100x (total magnification) and ideally 400x - 1000x magnification (that's 10x, 40x and 100x objective lenses on a compound microscope respectively). The one you mentioned from AmScope should just be capable of this range with a maximum magnification of 225x. I don't know if that magnification is with a Barlow fitted or not.

\n

Fungal ID is typically done by staining the hyphae and fruiting structures, mounting on a slide, and then observing these via transmitted light - brightfield illumination, with the light shining from the bottom, directly through the object. Some stereomicroscopes will have this capability, but definitely not all. Those that do won't have a condenser, which converts the point illumination of the bulb into a parallel or converging beam, which is needed to provide even illumination of the right angle for the objective lens being used so that you can see the object clearly.

\n

Stereomicroscopes would be useful for observing a fungal colony from above, but this isn't often all that useful for identification purposes.

\n

Barlow lenses will help provide more magnification, I think at the expense of depth of field, though this shouldn't be much of a consideration for mounted specimens. Nikon's Microscopy U has lots of really good information on stereomicroscopes, including Barlow lenses (they call them "attachment" lenses) that you might find useful in determining for yourself.

\n", "answer_id": 114421, "answer_text": "I'm not sure, but I suspect the answer here is a general \"no\".\n\n\n\n\nThe reason I say this is that stereo microscopes typically do not have the magnifications needed to see the mycelium and other structures needed for ID of fungi clearly. For this you need a minimum of 100x (total magnification) and ideally 400x - 1000x magnification (that's 10x, 40x and 100x objective lenses on a compound microscope respectively). The one you mentioned from AmScope should just be capable of this range with a maximum magnification of 225x. I don't know if that magnification is with a Barlow fitted or not.\n\n\n\n\nFungal ID is typically done by staining the hyphae and fruiting structures, mounting on a slide, and then observing these via transmitted light - brightfield illumination (https://en.wikipedia.org/wiki/Bright-field_microscopy), with the light shining from the bottom, directly through the object. Some stereomicroscopes will have this capability, but definitely not all. Those that do won't have a condenser (https://en.wikipedia.org/wiki/Condenser_(optics)), which converts the point illumination of the bulb into a parallel or converging beam, which is needed to provide even illumination of the right angle for the objective lens being used so that you can see the object clearly.\n\n\n\n\nStereomicroscopes would be useful for observing a fungal colony from above, but this isn't often all that useful for identification purposes.\n\n\n\n\nBarlow lenses will help provide more magnification, I think at the expense of depth of field, though this shouldn't be much of a consideration for mounted specimens. Nikon's Microscopy U (https://www.microscopyu.com/techniques/stereomicroscopy/introduction-to-stereomicroscopy) has lots of really good information on stereomicroscopes, including Barlow lenses (they call them \"attachment\" lenses) that you might find useful in determining for yourself.", "answer_url": "https://biology.stackexchange.com/a/114421", "author": "bob1", "author_url": "https://biology.stackexchange.com/users/65284/bob1", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-01T19:34:17+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114372, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "bob1", "profile_url": "https://biology.stackexchange.com/users/65284/bob1", "user_type": "registered"}, "created_at": "2024-04-01T19:34:17+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "19B282D2-E309-4C3F-8916-0C9DDC333CF5", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/19B282D2-E309-4C3F-8916-0C9DDC333CF5/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Evan Carroll", "profile_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "user_type": "registered"}, "created_at": "2024-04-01T20:22:57+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "B88230FD-ED4B-461B-AF76-B863073DA74E", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B88230FD-ED4B-461B-AF76-B863073DA74E/view-source"}], "score": 1, "updated_at": "2024-04-01T20:22:57+00:00"}, {"answer_html": "

for some things sure, like looking at surface structures in more detail, and with 200x power you might see micro structures including perhaps cells. but most fungal microscopy is done with a compound microscope of 400-1000x power, which allows you to clearly see cells and cell types, hyphae, and spores

\n", "answer_id": 114430, "answer_text": "for some things sure, like looking at surface structures in more detail, and with 200x power you might see micro structures including perhaps cells. but most fungal microscopy is done with a compound microscope of 400-1000x power, which allows you to clearly see cells and cell types, hyphae, and spores", "answer_url": "https://biology.stackexchange.com/a/114430", "author": "imrobert", "author_url": "https://biology.stackexchange.com/users/75153/imrobert", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-02T17:05:42+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114372, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "imrobert", "profile_url": "https://biology.stackexchange.com/users/75153/imrobert", "user_type": "registered"}, "created_at": "2024-04-02T17:05:42+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "4ACF5EF0-89C5-4532-8BE7-E11E12D8F28C", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/4ACF5EF0-89C5-4532-8BE7-E11E12D8F28C/view-source"}], "score": 1, "updated_at": "2024-04-02T17:05:42+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I have a need for a stereo microscope to do electronics work. I also have a strong desire for a stereo microscope to do mycology. I would like to be able to,\n\n\n\n\n\nClearly identify mycelium, from bacterial contamination (no interest in bacteria).\n\n\n\n\nBe able to isolate spores of mycelium.\n\n\n\n\nIdentify dikaryon, from monokaryon\n\n\n\n\nIdeally, but not required be able to identify different types of mycelium that are undesirable (mold).\n\n\n\n\n\nCould I take a trinocular stereo microscope and add a barrow lens that increases the zoom and decreases the focal length, and use it for biology as desired above? Some stereomicroscopes that have 2x Barlow advertise 225x, like the AmScope ZM2225NT.\n\n\n\n\nWhat would the downsides of this approach be?", "record_id": "Scientific-Answer-Ranking:biology:114372", "scores": [1, 1], "split": "validation", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "

I'm not sure, but I suspect the answer here is a general "no".

\n

The reason I say this is that stereo microscopes typically do not have the magnifications needed to see the mycelium and other structures needed for ID of fungi clearly. For this you need a minimum of 100x (total magnification) and ideally 400x - 1000x magnification (that's 10x, 40x and 100x objective lenses on a compound microscope respectively). The one you mentioned from AmScope should just be capable of this range with a maximum magnification of 225x. I don't know if that magnification is with a Barlow fitted or not.

\n

Fungal ID is typically done by staining the hyphae and fruiting structures, mounting on a slide, and then observing these via transmitted light - brightfield illumination, with the light shining from the bottom, directly through the object. Some stereomicroscopes will have this capability, but definitely not all. Those that do won't have a condenser, which converts the point illumination of the bulb into a parallel or converging beam, which is needed to provide even illumination of the right angle for the objective lens being used so that you can see the object clearly.

\n

Stereomicroscopes would be useful for observing a fungal colony from above, but this isn't often all that useful for identification purposes.

\n

Barlow lenses will help provide more magnification, I think at the expense of depth of field, though this shouldn't be much of a consideration for mounted specimens. Nikon's Microscopy U has lots of really good information on stereomicroscopes, including Barlow lenses (they call them "attachment" lenses) that you might find useful in determining for yourself.

\n", "answer_id": 114421, "answer_text": "I'm not sure, but I suspect the answer here is a general \"no\".\n\n\n\n\nThe reason I say this is that stereo microscopes typically do not have the magnifications needed to see the mycelium and other structures needed for ID of fungi clearly. For this you need a minimum of 100x (total magnification) and ideally 400x - 1000x magnification (that's 10x, 40x and 100x objective lenses on a compound microscope respectively). The one you mentioned from AmScope should just be capable of this range with a maximum magnification of 225x. I don't know if that magnification is with a Barlow fitted or not.\n\n\n\n\nFungal ID is typically done by staining the hyphae and fruiting structures, mounting on a slide, and then observing these via transmitted light - brightfield illumination (https://en.wikipedia.org/wiki/Bright-field_microscopy), with the light shining from the bottom, directly through the object. Some stereomicroscopes will have this capability, but definitely not all. Those that do won't have a condenser (https://en.wikipedia.org/wiki/Condenser_(optics)), which converts the point illumination of the bulb into a parallel or converging beam, which is needed to provide even illumination of the right angle for the objective lens being used so that you can see the object clearly.\n\n\n\n\nStereomicroscopes would be useful for observing a fungal colony from above, but this isn't often all that useful for identification purposes.\n\n\n\n\nBarlow lenses will help provide more magnification, I think at the expense of depth of field, though this shouldn't be much of a consideration for mounted specimens. Nikon's Microscopy U (https://www.microscopyu.com/techniques/stereomicroscopy/introduction-to-stereomicroscopy) has lots of really good information on stereomicroscopes, including Barlow lenses (they call them \"attachment\" lenses) that you might find useful in determining for yourself.", "answer_url": "https://biology.stackexchange.com/a/114421", "author": "bob1", "author_url": "https://biology.stackexchange.com/users/65284/bob1", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-01T19:34:17+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114372, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "bob1", "profile_url": "https://biology.stackexchange.com/users/65284/bob1", "user_type": "registered"}, "created_at": "2024-04-01T19:34:17+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "19B282D2-E309-4C3F-8916-0C9DDC333CF5", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/19B282D2-E309-4C3F-8916-0C9DDC333CF5/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Evan Carroll", "profile_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "user_type": "registered"}, "created_at": "2024-04-01T20:22:57+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "B88230FD-ED4B-461B-AF76-B863073DA74E", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B88230FD-ED4B-461B-AF76-B863073DA74E/view-source"}], "score": 1, "updated_at": "2024-04-01T20:22:57+00:00"}, {"answer_html": "

for some things sure, like looking at surface structures in more detail, and with 200x power you might see micro structures including perhaps cells. but most fungal microscopy is done with a compound microscope of 400-1000x power, which allows you to clearly see cells and cell types, hyphae, and spores

\n", "answer_id": 114430, "answer_text": "for some things sure, like looking at surface structures in more detail, and with 200x power you might see micro structures including perhaps cells. but most fungal microscopy is done with a compound microscope of 400-1000x power, which allows you to clearly see cells and cell types, hyphae, and spores", "answer_url": "https://biology.stackexchange.com/a/114430", "author": "imrobert", "author_url": "https://biology.stackexchange.com/users/75153/imrobert", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-02T17:05:42+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114372, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "imrobert", "profile_url": "https://biology.stackexchange.com/users/75153/imrobert", "user_type": "registered"}, "created_at": "2024-04-02T17:05:42+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "4ACF5EF0-89C5-4532-8BE7-E11E12D8F28C", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/4ACF5EF0-89C5-4532-8BE7-E11E12D8F28C/view-source"}], "score": 1, "updated_at": "2024-04-02T17:05:42+00:00"}], "domain": "biology", "external_links": ["https://en.wikipedia.org/wiki/Bright-field_microscopy", "https://en.wikipedia.org/wiki/Condenser_(optics", "https://www.microscopyu.com/techniques/stereomicroscopy/introduction-to-stereomicroscopy"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:08.576606+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1051d4f3e38449f1419d1973ac812b2286659e454a76f89a23fdaa941dfadddb_0.json", "raw_sha256": "583dcd577e20d33b29e9f8818a7ab6a1fab039c19ab79927e16096cff23fa61d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=7&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Evan Carroll", "question_author_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "question_author_user_type": "registered", "question_created_at": "2024-03-25T15:44:36+00:00", "question_html": "

I have a need for a stereo microscope to do electronics work. I also have a strong desire for a stereo microscope to do mycology. I would like to be able to,

\n\n

Could I take a trinocular stereo microscope and add a barrow lens that increases the zoom and decreases the focal length, and use it for biology as desired above? Some stereomicroscopes that have 2x Barlow advertise 225x, like the AmScope ZM2225NT.

\n

What would the downsides of this approach be?

\n", "question_id": 114372, "question_license": "CC BY-SA 4.0", "question_score": 3, "question_text": "I have a need for a stereo microscope to do electronics work. I also have a strong desire for a stereo microscope to do mycology. I would like to be able to,\n\n\n\n\n\nClearly identify mycelium, from bacterial contamination (no interest in bacteria).\n\n\n\n\nBe able to isolate spores of mycelium.\n\n\n\n\nIdentify dikaryon, from monokaryon\n\n\n\n\nIdeally, but not required be able to identify different types of mycelium that are undesirable (mold).\n\n\n\n\n\nCould I take a trinocular stereo microscope and add a barrow lens that increases the zoom and decreases the focal length, and use it for biology as desired above? Some stereomicroscopes that have 2x Barlow advertise 225x, like the AmScope ZM2225NT.\n\n\n\n\nWhat would the downsides of this approach be?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Evan Carroll", "profile_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "user_type": "registered"}, "created_at": "2024-03-25T15:44:36+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "F04254FF-7335-4404-B8C2-75E45C2124B3", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F04254FF-7335-4404-B8C2-75E45C2124B3/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Evan Carroll", "profile_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "user_type": "registered"}, "created_at": "2024-04-01T18:24:53+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "BAF1EB83-29B2-48B5-B879-C0F2F5930EB5", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/BAF1EB83-29B2-48B5-B879-C0F2F5930EB5/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Evan Carroll", "profile_url": "https://biology.stackexchange.com/users/8241/evan-carroll", "user_type": "registered"}, "created_at": "2024-04-01T19:56:58+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "954A76B9-A1FC-4F7E-92BD-3380590147B0", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/954A76B9-A1FC-4F7E-92BD-3380590147B0/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/114372/can-a-stereo-microscope-be-used-for-mycology", "split": "validation", "split_group": "d04c9b21cea254d430cb9f9f76af9b5f77eaf95949a97f5a530292fe9e05ac0d", "tags": ["microbiology", "microscopy"], "thread_id": "biology:114372", "title": "Can a stereo microscope be used for mycology?"}} {"accepted_status": [false, false, false], "candidate_answers": [{"answer_html": "

Based on the description it could be a leafcutter bee, squash bee, or plasterer bee. But there are more than a hundred bee species in PA alone and the come in a huge range of shapes and sizes and patterns. no one is going to ID it from such a description. Your best bet is to search images of PA bees. there are bees that chew up leaves, and all kinds of similiar behavior.

\n

here is a short list of most common bees in Pennsyvania.

\n

https://emoyer.com/services/pestcontrol/pestlibrary/bees/

\n

Here is a more detailed breakdown.

\n

https://lopezuribelab.com/checklist-bees-pennsylvania/

\n

one kind of leafcutter bee

\n

\"enter

\n", "answer_id": 117784, "answer_text": "Based on the description it could be a leafcutter bee, squash bee, or plasterer bee. But there are more than a hundred bee species in PA alone and the come in a huge range of shapes and sizes and patterns. no one is going to ID it from such a description. Your best bet is to search images of PA bees. there are bees that chew up leaves, and all kinds of similiar behavior.\n\n\n\n\nhere is a short list of most common bees in Pennsyvania.\n\n\n\n\nhttps://emoyer.com/services/pestcontrol/pestlibrary/bees/ (https://emoyer.com/services/pestcontrol/pestlibrary/bees/)\n\n\n\n\nHere is a more detailed breakdown.\n\n\n\n\nhttps://lopezuribelab.com/checklist-bees-pennsylvania/ (https://lopezuribelab.com/checklist-bees-pennsylvania/)\n\n\n\n\none kind of leafcutter bee\n\n\n\n\n[image: enter image description here; source: https://i.sstatic.net/fz1jwb06s.png] (https://i.sstatic.net/fz1jwb06s.png)", "answer_url": "https://biology.stackexchange.com/a/117784", "author": "John", "author_url": "https://biology.stackexchange.com/users/28022/john", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-08-10T14:38:06+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2025-08-10T14:38:06+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "63A82717-A88C-4EC8-96AF-7F6E0CE81838", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/63A82717-A88C-4EC8-96AF-7F6E0CE81838/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2025-08-10T14:45:23+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "756F7865-735F-4123-BB7B-4375FC4AB945", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/756F7865-735F-4123-BB7B-4375FC4AB945/view-source"}], "score": 3, "updated_at": "2025-08-10T14:45:23+00:00"}, {"answer_html": "

It was most probably a hoverfly (syrphid) that imitates a bee. Though I didn't get a picture of that one, today I did get a picture, but of a different species. This one was feeding off the flowers. The one I saw yesterday was obviously laying eggs. It looked like this one: hoverfly (image is proprietary so can only supply link)

\n

Here is the one I saw today. You can see that it is not a bee. It has only one pair of wings and stubby antennae, where bees have two pair of wings and articulated antennae.

\n

\"hoverfly\"

\n

While flying it could be seen to hover, which bees do not do.

\n

There are about 6000 species of syrphid found around the world. They are extremely beneficial insects. Besides being important pollinators, some of them are detritivors, eating decaying plant and animal matter and others, as in the case of the one I saw, the larvae are insectivores eating aphids and other plant sucking insects. wiki hoverfly

\n", "answer_id": 117785, "answer_text": "It was most probably a hoverfly (syrphid) that imitates a bee. Though I didn't get a picture of that one, today I did get a picture, but of a different species. This one was feeding off the flowers. The one I saw yesterday was obviously laying eggs. It looked like this one: hoverfly (https://pixels.com/featured/bee-mimic-hoverfly-bob-gibbons.html) (image is proprietary so can only supply link)\n\n\n\n\nHere is the one I saw today. You can see that it is not a bee. It has only one pair of wings and stubby antennae, where bees have two pair of wings and articulated antennae.\n\n\n\n\n[image: hoverfly; source: https://i.sstatic.net/Z4zOIC1m.png] (https://i.sstatic.net/Z4zOIC1m.png)\n\n\n\n\nWhile flying it could be seen to hover, which bees do not do.\n\n\n\n\nThere are about 6000 species of syrphid found around the world. They are extremely beneficial insects. Besides being important pollinators, some of them are detritivors, eating decaying plant and animal matter and others, as in the case of the one I saw, the larvae are insectivores eating aphids and other plant sucking insects. wiki hoverfly (https://en.wikipedia.org/wiki/Hoverfly)", "answer_url": "https://biology.stackexchange.com/a/117785", "author": "Rich", "author_url": "https://biology.stackexchange.com/users/78837/rich", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-08-10T14:59:09+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-10T14:59:09+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "7FDF9A31-BF6F-4878-9C8C-4BF48DD679C8", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7FDF9A31-BF6F-4878-9C8C-4BF48DD679C8/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-11T17:41:44+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "CA2F3A49-4686-4DF6-A2BD-51C0423C8D9C", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/CA2F3A49-4686-4DF6-A2BD-51C0423C8D9C/view-source"}], "score": 7, "updated_at": "2025-08-11T17:41:44+00:00"}, {"answer_html": "

Your description did remind me of a dark-edged bee fly (Bombylius major), see photo (from Norfolk Wildlife Trust) below. Particularly, the description of size, "fuzzy" body, coloration, and similarity to bee body form brought a bee fly to mind. This link has more information about this species.

\n

\"enter

\n", "answer_id": 119462, "answer_text": "Your description did remind me of a dark-edged bee fly (Bombylius major), see photo (from Norfolk Wildlife Trust) below. Particularly, the description of size, \"fuzzy\" body, coloration, and similarity to bee body form brought a bee fly to mind. This link has more information about this species.\n\n\n\n\n[image: enter image description here; source: https://i.sstatic.net/oJTRLMmA.png] (https://i.sstatic.net/oJTRLMmA.png)", "answer_url": "https://biology.stackexchange.com/a/119462", "author": "OllieVet", "author_url": "https://biology.stackexchange.com/users/76792/ollievet", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-04-29T17:48:35+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:18.621890+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/af0d3457619c0da44037d660ba62b34ff4f307b5f5add32aa47548a02d98cd9c_0.json", "raw_sha256": "1bae8c6935dc08a5e6562c41b0b68738a9f472d70ac4bf71308b1f7ace0f101d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "OllieVet", "profile_url": "https://biology.stackexchange.com/users/76792/ollievet", "user_type": "registered"}, "created_at": "2026-04-29T17:48:35+00:00", "raw_file": "raw/codex_api_v1/579a4d2562ba9524cfbccb0521aa128aef0c357c985479e84dfae99b419043f3_1790824187996707100_0.json", "raw_sha256": "498851e9e2788dd78c09b5bc32fc2c43c0983eaa43d2c56d9c618718c8202873", "revision_guid": "06315489-5A0C-4C60-9D5D-8818A8F9DFBF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/06315489-5A0C-4C60-9D5D-8818A8F9DFBF/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "OllieVet", "profile_url": "https://biology.stackexchange.com/users/76792/ollievet", "user_type": "registered"}, "created_at": "2026-04-30T20:04:27+00:00", "raw_file": "raw/codex_api_v1/579a4d2562ba9524cfbccb0521aa128aef0c357c985479e84dfae99b419043f3_1790824187996707100_0.json", "raw_sha256": "498851e9e2788dd78c09b5bc32fc2c43c0983eaa43d2c56d9c618718c8202873", "revision_guid": "0D64A651-2F79-47CE-A317-9DA329A606B4", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/0D64A651-2F79-47CE-A317-9DA329A606B4/view-source"}], "score": 2, "updated_at": "2026-04-30T20:04:27+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "It looks like a bee, about 5/8\" long, hairy(fuzzy) almost black with thin, pale white or yellow bands. I could not see its head clearly.\n\n\n\n\nThis is how much it resembles a bee:\n\n\n\n\nWhile I was watching it, one part of my brain was saying \"That insect is laying eggs on our cucumber leaves.\" This was overruled by another part of my brain that said,\" NO, that is obviously a bee. It must be mistaking the green of the leaves for the yellow of the flowers. I was very concerned that it would not find food and would die before it could return to its nest/hive. Hence my original question:\n\n\n\n\n\n\n\nPennsylvania. On our cucumber plants, whilst most bees flew from\nflower to flower, one bee flew from leaf to leaf, landing only\nmomentarily. It would land under the leaf, bend its abdomen slightly,\nthen take off again. It did this several dozen times. This bee was\nabout 1/2\" long mostly black with thin pale yellow bands. Sorry but by\nthe time I got my camera it had flown off.\n\n\n\n\nIs this normal behavior? Or does this bee need glasses?\n\n\n\n\n\n\n\nFollowing the comment by @mgkrebbs I realized my error and rethought my original hypothesis,\n\n\n\n\nSo, what could it be?", "record_id": "Scientific-Answer-Ranking:biology:117782", "scores": [3, 7, 2], "split": "validation", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "

Based on the description it could be a leafcutter bee, squash bee, or plasterer bee. But there are more than a hundred bee species in PA alone and the come in a huge range of shapes and sizes and patterns. no one is going to ID it from such a description. Your best bet is to search images of PA bees. there are bees that chew up leaves, and all kinds of similiar behavior.

\n

here is a short list of most common bees in Pennsyvania.

\n

https://emoyer.com/services/pestcontrol/pestlibrary/bees/

\n

Here is a more detailed breakdown.

\n

https://lopezuribelab.com/checklist-bees-pennsylvania/

\n

one kind of leafcutter bee

\n

\"enter

\n", "answer_id": 117784, "answer_text": "Based on the description it could be a leafcutter bee, squash bee, or plasterer bee. But there are more than a hundred bee species in PA alone and the come in a huge range of shapes and sizes and patterns. no one is going to ID it from such a description. Your best bet is to search images of PA bees. there are bees that chew up leaves, and all kinds of similiar behavior.\n\n\n\n\nhere is a short list of most common bees in Pennsyvania.\n\n\n\n\nhttps://emoyer.com/services/pestcontrol/pestlibrary/bees/ (https://emoyer.com/services/pestcontrol/pestlibrary/bees/)\n\n\n\n\nHere is a more detailed breakdown.\n\n\n\n\nhttps://lopezuribelab.com/checklist-bees-pennsylvania/ (https://lopezuribelab.com/checklist-bees-pennsylvania/)\n\n\n\n\none kind of leafcutter bee\n\n\n\n\n[image: enter image description here; source: https://i.sstatic.net/fz1jwb06s.png] (https://i.sstatic.net/fz1jwb06s.png)", "answer_url": "https://biology.stackexchange.com/a/117784", "author": "John", "author_url": "https://biology.stackexchange.com/users/28022/john", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-08-10T14:38:06+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2025-08-10T14:38:06+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "63A82717-A88C-4EC8-96AF-7F6E0CE81838", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/63A82717-A88C-4EC8-96AF-7F6E0CE81838/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2025-08-10T14:45:23+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "756F7865-735F-4123-BB7B-4375FC4AB945", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/756F7865-735F-4123-BB7B-4375FC4AB945/view-source"}], "score": 3, "updated_at": "2025-08-10T14:45:23+00:00"}, {"answer_html": "

It was most probably a hoverfly (syrphid) that imitates a bee. Though I didn't get a picture of that one, today I did get a picture, but of a different species. This one was feeding off the flowers. The one I saw yesterday was obviously laying eggs. It looked like this one: hoverfly (image is proprietary so can only supply link)

\n

Here is the one I saw today. You can see that it is not a bee. It has only one pair of wings and stubby antennae, where bees have two pair of wings and articulated antennae.

\n

\"hoverfly\"

\n

While flying it could be seen to hover, which bees do not do.

\n

There are about 6000 species of syrphid found around the world. They are extremely beneficial insects. Besides being important pollinators, some of them are detritivors, eating decaying plant and animal matter and others, as in the case of the one I saw, the larvae are insectivores eating aphids and other plant sucking insects. wiki hoverfly

\n", "answer_id": 117785, "answer_text": "It was most probably a hoverfly (syrphid) that imitates a bee. Though I didn't get a picture of that one, today I did get a picture, but of a different species. This one was feeding off the flowers. The one I saw yesterday was obviously laying eggs. It looked like this one: hoverfly (https://pixels.com/featured/bee-mimic-hoverfly-bob-gibbons.html) (image is proprietary so can only supply link)\n\n\n\n\nHere is the one I saw today. You can see that it is not a bee. It has only one pair of wings and stubby antennae, where bees have two pair of wings and articulated antennae.\n\n\n\n\n[image: hoverfly; source: https://i.sstatic.net/Z4zOIC1m.png] (https://i.sstatic.net/Z4zOIC1m.png)\n\n\n\n\nWhile flying it could be seen to hover, which bees do not do.\n\n\n\n\nThere are about 6000 species of syrphid found around the world. They are extremely beneficial insects. Besides being important pollinators, some of them are detritivors, eating decaying plant and animal matter and others, as in the case of the one I saw, the larvae are insectivores eating aphids and other plant sucking insects. wiki hoverfly (https://en.wikipedia.org/wiki/Hoverfly)", "answer_url": "https://biology.stackexchange.com/a/117785", "author": "Rich", "author_url": "https://biology.stackexchange.com/users/78837/rich", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-08-10T14:59:09+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-10T14:59:09+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "7FDF9A31-BF6F-4878-9C8C-4BF48DD679C8", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7FDF9A31-BF6F-4878-9C8C-4BF48DD679C8/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-11T17:41:44+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "CA2F3A49-4686-4DF6-A2BD-51C0423C8D9C", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/CA2F3A49-4686-4DF6-A2BD-51C0423C8D9C/view-source"}], "score": 7, "updated_at": "2025-08-11T17:41:44+00:00"}, {"answer_html": "

Your description did remind me of a dark-edged bee fly (Bombylius major), see photo (from Norfolk Wildlife Trust) below. Particularly, the description of size, "fuzzy" body, coloration, and similarity to bee body form brought a bee fly to mind. This link has more information about this species.

\n

\"enter

\n", "answer_id": 119462, "answer_text": "Your description did remind me of a dark-edged bee fly (Bombylius major), see photo (from Norfolk Wildlife Trust) below. Particularly, the description of size, \"fuzzy\" body, coloration, and similarity to bee body form brought a bee fly to mind. This link has more information about this species.\n\n\n\n\n[image: enter image description here; source: https://i.sstatic.net/oJTRLMmA.png] (https://i.sstatic.net/oJTRLMmA.png)", "answer_url": "https://biology.stackexchange.com/a/119462", "author": "OllieVet", "author_url": "https://biology.stackexchange.com/users/76792/ollievet", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-04-29T17:48:35+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:18.621890+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/af0d3457619c0da44037d660ba62b34ff4f307b5f5add32aa47548a02d98cd9c_0.json", "raw_sha256": "1bae8c6935dc08a5e6562c41b0b68738a9f472d70ac4bf71308b1f7ace0f101d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 117782, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "OllieVet", "profile_url": "https://biology.stackexchange.com/users/76792/ollievet", "user_type": "registered"}, "created_at": "2026-04-29T17:48:35+00:00", "raw_file": "raw/codex_api_v1/579a4d2562ba9524cfbccb0521aa128aef0c357c985479e84dfae99b419043f3_1790824187996707100_0.json", "raw_sha256": "498851e9e2788dd78c09b5bc32fc2c43c0983eaa43d2c56d9c618718c8202873", "revision_guid": "06315489-5A0C-4C60-9D5D-8818A8F9DFBF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/06315489-5A0C-4C60-9D5D-8818A8F9DFBF/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "OllieVet", "profile_url": "https://biology.stackexchange.com/users/76792/ollievet", "user_type": "registered"}, "created_at": "2026-04-30T20:04:27+00:00", "raw_file": "raw/codex_api_v1/579a4d2562ba9524cfbccb0521aa128aef0c357c985479e84dfae99b419043f3_1790824187996707100_0.json", "raw_sha256": "498851e9e2788dd78c09b5bc32fc2c43c0983eaa43d2c56d9c618718c8202873", "revision_guid": "0D64A651-2F79-47CE-A317-9DA329A606B4", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/0D64A651-2F79-47CE-A317-9DA329A606B4/view-source"}], "score": 2, "updated_at": "2026-04-30T20:04:27+00:00"}], "domain": "biology", "external_links": ["https://emoyer.com/services/pestcontrol/pestlibrary/bees/", "https://en.wikipedia.org/wiki/Hoverfly", "https://i.sstatic.net/Z4zOIC1m.png", "https://i.sstatic.net/fz1jwb06s.png", "https://i.sstatic.net/oJTRLMmA.png", "https://lopezuribelab.com/checklist-bees-pennsylvania/", "https://pixels.com/featured/bee-mimic-hoverfly-bob-gibbons.html"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:01.208074+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/f1b387b48f36041f506f18fa9796531023c7eae1e796ec622ad56833c02bea98_0.json", "raw_sha256": "3f8214c87c0fe16dd016324597332ca392e0ba98600877cc746483ef492ce03d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Rich", "question_author_url": "https://biology.stackexchange.com/users/78837/rich", "question_author_user_type": "registered", "question_created_at": "2025-08-09T16:27:38+00:00", "question_html": "

It looks like a bee, about 5/8" long, hairy(fuzzy) almost black with thin, pale white or yellow bands. I could not see its head clearly.

\n

This is how much it resembles a bee:

\n

While I was watching it, one part of my brain was saying "That insect is laying eggs on our cucumber leaves." This was overruled by another part of my brain that said," NO, that is obviously a bee. It must be mistaking the green of the leaves for the yellow of the flowers. I was very concerned that it would not find food and would die before it could return to its nest/hive. Hence my original question:

\n
\n

Pennsylvania. On our cucumber plants, whilst most bees flew from\nflower to flower, one bee flew from leaf to leaf, landing only\nmomentarily. It would land under the leaf, bend its abdomen slightly,\nthen take off again. It did this several dozen times. This bee was\nabout 1/2" long mostly black with thin pale yellow bands. Sorry but by\nthe time I got my camera it had flown off.

\n

Is this normal behavior? Or does this bee need glasses?

\n
\n

Following the comment by @mgkrebbs I realized my error and rethought my original hypothesis,

\n

So, what could it be?

\n", "question_id": 117782, "question_license": "CC BY-SA 4.0", "question_score": 0, "question_text": "It looks like a bee, about 5/8\" long, hairy(fuzzy) almost black with thin, pale white or yellow bands. I could not see its head clearly.\n\n\n\n\nThis is how much it resembles a bee:\n\n\n\n\nWhile I was watching it, one part of my brain was saying \"That insect is laying eggs on our cucumber leaves.\" This was overruled by another part of my brain that said,\" NO, that is obviously a bee. It must be mistaking the green of the leaves for the yellow of the flowers. I was very concerned that it would not find food and would die before it could return to its nest/hive. Hence my original question:\n\n\n\n\n\n\n\nPennsylvania. On our cucumber plants, whilst most bees flew from\nflower to flower, one bee flew from leaf to leaf, landing only\nmomentarily. It would land under the leaf, bend its abdomen slightly,\nthen take off again. It did this several dozen times. This bee was\nabout 1/2\" long mostly black with thin pale yellow bands. Sorry but by\nthe time I got my camera it had flown off.\n\n\n\n\nIs this normal behavior? Or does this bee need glasses?\n\n\n\n\n\n\n\nFollowing the comment by @mgkrebbs I realized my error and rethought my original hypothesis,\n\n\n\n\nSo, what could it be?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-09T16:27:38+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "26F16ABE-A9AB-4E15-A597-9D5340023B0B", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/26F16ABE-A9AB-4E15-A597-9D5340023B0B/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Rich", "profile_url": "https://biology.stackexchange.com/users/78837/rich", "user_type": "registered"}, "created_at": "2025-08-09T22:30:33+00:00", "raw_file": "raw/codex_api_v1/d8f60fae1c998cc8c158494f81f9d96078105a2ba0c494044a17f0f0183714e8_1790824152377234600_0.json", "raw_sha256": "271777c6d25c770388803b7ee2725f9a2ad11be7bd2802305c1c50f6e43933bb", "revision_guid": "B0569837-0B0E-40F1-BF48-70E9D1B5E80F", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B0569837-0B0E-40F1-BF48-70E9D1B5E80F/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/117782/looks-just-like-a-bee-but-it-isnt-what-is-it", "split": "validation", "split_group": "3ed922a8b7a0373b9e5fceeb9225e200a8f0eb3dd0336e397519db89232554e5", "tags": ["species-identification", "entomology"], "thread_id": "biology:117782", "title": "Looks just like a bee, but it isn't. What is it?"}}