trying to compare neural network with no hidden layers with logistic regression

1 回表示 (過去 30 日間)
Himanshu Singh
Himanshu Singh 2017 年 10 月 26 日
回答済み: Greg Heath 2018 年 10 月 6 日
Mathematically neural network with no hidden layers should be same as logistic regression. On a simple data X class labels Y I am calling patternnet[] and fitglm. The training data provided to train both models is same. When using both models on same test data different accuracy results are obtained. Unable to understand why even the training accuracy of both models is different.
  1 件のコメント
KAE
KAE 2018 年 10 月 4 日
Can you provide a simple code example from one of the built in datasets in Matlab?

サインインしてコメントする。

回答 (1 件)

Greg Heath
Greg Heath 2018 年 10 月 6 日
No hidden nodes default is the same as
LINEAR REGRESSION
NOT
LOGISTIC REGRESSION
For logistic regression, you have to replace the default linear output layer with a logistic layer.
Hope this helps.
Thank you for formally accepting my answer
Greg

カテゴリ

Help Center および File ExchangeLinear Regression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by