You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Logistic Regression、NN、SVM同数据集获相同准确率?原因及实操疑问解析

Can Logistic Regression, Neural Network, and SVM Achieve Identical Accuracy on the Same Train/Test Set?

Great questions—let’s unpack these clearly, since this is a common point of confusion when working with classification models.

1. Is it possible for these three models to get the same accuracy?

Absolutely, this is totally feasible. Here’s the core reason:
All three are discriminative models—they focus on learning the decision boundary between classes, rather than modeling the distribution of each individual class. If the optimal boundary for your dataset can be represented equally well by all three models, they’ll end up making identical predictions on the test set, leading to the same accuracy.

For a concrete example: if your data is linearly separable (think a plot where you can draw a straight line to perfectly split two classes), a basic Logistic Regression model will find that optimal linear boundary. A shallow neural network (with no hidden layers—essentially just Logistic Regression under the hood) and a linear SVM (using the linear kernel) will also converge to that exact same boundary. No surprises here—same boundary means same predictions, same accuracy.

2. Why might you see exactly identical average accuracy in practice?

You’re spot-on that easily distinguishable classes play a big role, but there are a few other common, valid causes:

  • Linearly separable data: As noted above, if your data can be perfectly split with a linear boundary, all three models (when configured correctly—like using a linear kernel for SVM, no hidden layers for the NN) will lock onto that same optimal boundary. Even with minor regularization, if it doesn’t shift the boundary enough to change test set predictions, you’ll get identical results.
  • Trivial classification task: If your task is super simple—like classifying emails as spam where every spam email contains the exact phrase "win free money"—any model that can pick up on basic pattern matching will get every prediction right. The accuracy ceiling is 100%, so all models hit that mark.
  • Model configurations that align: If you set up your neural network to be functionally equivalent to Logistic Regression (e.g., no hidden layers, sigmoid output for binary classification) and use a linear SVM with matching regularization strength, they’re essentially doing the same math under the hood. It’s no wonder they produce the same accuracy.
  • Small test set size: If your test set is tiny, random chance could lead to all models getting the exact same number of predictions right. This is less likely if you’re averaging over multiple runs, but it’s still a possible edge case.
  • Noise-free, perfectly predictable data: If your features have zero noise and directly map to the class label with no ambiguity (e.g., class 1 always has feature X = 5, class 0 always has X = 0), any model that can learn basic correlations will pick up on this, leading to identical top-tier accuracy.

内容的提问来源于stack exchange,提问作者Jason

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 03:51:56