2
$\begingroup$

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?

$\endgroup$

2 Answers 2

2
$\begingroup$

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
$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.