September 2017
Beginner to intermediate
270 pages
5h 53m
English
To improve our practice with the nnet library, we look at another example. This time we will use the data collected at a restaurant through customer interviews. The customers were asked to give a score to the following aspects: service, ambience, and food. They were also asked whether they would leave the tip on the basis of these scores. In this case, the number of inputs is 2 and the output is a categorical value (Tip=1 and No-tip=0).
The input file to be used is shown in the following table:
|
No |
CustomerWillTip |
Service |
Ambience |
Food |
TipOrNo |
|
1 |
1 |
4 |
4 |
5 |
Tip |
|
2 |
1 |
6 |
4 |
4 |
Tip |
|
3 |
1 |
5 |
2 |
4 |
Tip |
|
4 |
1 |
6 |
5 |
5 |
Tip |
|
5 |
1 |
6 |
3 |
4 |
Tip |
|
6 |