Skip to main content

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -1.5666401856626664018566
 [2,] -0.078225500455 -0.06536644222
 [3,]  0.410455341173  0.9703610725467036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  0.70074482878
 [6,]  0.614550199698  10.83536187570
 [7,] -0.612837570442 -20.48086112696
 [8,] -0.743739495966 -1.2699447157706994471577
 [9,]  0.200419240204  10.83957097597
[10,] -0.166568966328 -0.9058327771550583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -1.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890  62.50479250068
[16,]  0.367771764513  10.96127873663

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -1.56664018566
 [2,] -0.078225500455 -0.06536644222
 [3,]  0.410455341173  0.97036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  0.70074482878
 [6,]  0.614550199698  1.83536187570
 [7,] -0.612837570442 -2.48086112696
 [8,] -0.743739495966 -1.26994471577
 [9,]  0.200419240204  1.83957097597
[10,] -0.166568966328 -0.90583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -1.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890  6.50479250068
[16,]  0.367771764513  1.96127873663

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -1.26664018566
 [2,] -0.078225500455 -0.06536644222
 [3,]  0.410455341173  0.67036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  0.70074482878
 [6,]  0.614550199698  0.83536187570
 [7,] -0.612837570442 -0.48086112696
 [8,] -0.743739495966 -1.06994471577
 [9,]  0.200419240204  0.83957097597
[10,] -0.166568966328 -0.50583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -1.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890  2.50479250068
[16,]  0.367771764513  0.96127873663
deleted 29 characters in body
Source Link
siqi
  • 49
  • 2

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same but roughly 5-7 times larger?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -91.56664018566
 [2,] -0.078225500455 -0.4653664422206536644222
 [3,]  0.410455341173  20.5703610725497036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  20.70074482878
 [6,]  0.614550199698  21.83536187570
 [7,] -0.612837570442 -32.48086112696
 [8,] -0.743739495966 -51.26994471577
 [9,]  0.200419240204  1.83957097597
[10,] -0.166568966328 -0.90583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -21.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890 10 6.50479250068
[16,]  0.367771764513  1.96127873663

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same but roughly 5-7 times larger?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -9.56664018566
 [2,] -0.078225500455 -0.46536644222
 [3,]  0.410455341173  2.57036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  2.70074482878
 [6,]  0.614550199698  2.83536187570
 [7,] -0.612837570442 -3.48086112696
 [8,] -0.743739495966 -5.26994471577
 [9,]  0.200419240204  1.83957097597
[10,] -0.166568966328 -0.90583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -2.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890 10.50479250068
[16,]  0.367771764513  1.96127873663

Should the weights of a neural network without hidden layer and a logistic activation function be the same as the parameters of a logistic regression? Mine are not the same?

nnallnohidden=nnet(
    PartialPrepayzo~FIXPER+MEDSAL2+DREL+LEEFTIJD+HH2CRED+LTV_curr+
    rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate,
    data=test,
    size=0,
    skip=T)

log <- glm(PartialPrepayzo~FIXPER+MEDSAL2+DREL+
LEEFTIJD+HH2CRED+LTV_curr+rate1Y+rate5Y+CIremFIRP+URB+WELSTAN2+OutNot+mover+SavRate+CRate, data = test, family = "binomial")
summary(log)

                 [,1]           [,2]
 [1,] -1.029560622391 -1.56664018566
 [2,] -0.078225500455 -0.06536644222
 [3,]  0.410455341173  0.97036107254
 [4,]  0.006961510972 -0.11463794856
 [5,]  0.473629162069  0.70074482878
 [6,]  0.614550199698  1.83536187570
 [7,] -0.612837570442 -2.48086112696
 [8,] -0.743739495966 -1.26994471577
 [9,]  0.200419240204  1.83957097597
[10,] -0.166568966328 -0.90583277715
[11,]  0.017640270701  0.12678131085
[12,] -0.005947704128 -0.04248886193
[13,] -0.428175932694 -1.69521649738
[14,]  0.049657239050  0.26482261363
[15,]  1.602200661890  6.50479250068
[16,]  0.367771764513  1.96127873663
edited title
Link
Nick Cox
  • 59.5k
  • 8
  • 136
  • 212

HELP!! Should weights of Neuralneural network without hidden layer match logistic regression?

deleted 115 characters in body; edited title
Source Link
siqi
  • 49
  • 2
Loading
added 115 characters in body; edited title
Source Link
Nick Cox
  • 59.5k
  • 8
  • 136
  • 212
Loading
deleted 1 characters in body; edited title
Source Link
siqi
  • 49
  • 2
Loading
added 2 characters in body
Source Link
siqi
  • 49
  • 2
Loading
improved title, added logistic tag (and deleted "thx")
Source Link
Loading
edited body
Source Link
siqi
  • 49
  • 2
Loading
added 1 characters in body
Source Link
siqi
  • 49
  • 2
Loading
edited body
Source Link
siqi
  • 49
  • 2
Loading
added 1 characters in body
Source Link
siqi
  • 49
  • 2
Loading
Source Link
siqi
  • 49
  • 2
Loading