2

I am looking for a package that provides a single neuron/perceptron for classification in R. So far I only found multi-layer perceptrons. Where can I find one?

Make42
  • 565

2 Answers2

2

Logistic regression is very close to "single neuron/perceptron for classification in R".

See here for details.

What's the difference between logistic regression and perceptron?


If you want to try logistic regression, here is an example using R glm function.

> summary(glm(am~wt+hp,mtcars,family="binomial"))

Call:
glm(formula = am ~ wt + hp, family = "binomial", data = mtcars)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-2.2537  -0.1568  -0.0168   0.1543   1.3449  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)   
(Intercept) 18.86630    7.44356   2.535  0.01126 * 
wt          -8.08348    3.06868  -2.634  0.00843 **
hp           0.03626    0.01773   2.044  0.04091 * 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 43.230  on 31  degrees of freedom
Residual deviance: 10.059  on 29  degrees of freedom
AIC: 16.059

Number of Fisher Scoring iterations: 8
Haitao Du
  • 36,852
  • 25
  • 145
  • 242
1

You can use the R-specific search-engine http://rseek.org/ to find a package that implements a Perceptron. The example shown on https://rpubs.com/SHIYU/perceptron is particularly helpful.

Dirigo
  • 376
  • 3
  • 8