Instructions for using FPP through an example


(0 comments)

Machine learning techniques may sound superior, but its application is very practical in life. So big tech corporations like IBM and Google have invested a lot of money and used their cloud to trade in machine learning services. Applications can be at national level such as wildfire disaster analysis, weather forecast; average as supporting decision making; small as predicting housing prices and income.

We use FPP for a simple and familiar problem, enough to illustrate how to use it. That is the Tennis problem.

1) Extracting fpp-4.0.2.tar.xz

After downloading fpp-4.0.2.tar.xz, you create a folder called fpp, place the file there, change to the directory and extract the file as follows:

mkdir fpp && cd fpp
mv ~/Downloads/fpp-4.0.2.tar.xz .
tar xf fpp-4.0.2.tar.xz

Now the fpp folder has 3 files



We empty the data file fppdata.txt

echo > fppdata.txt



2) Preparing data

The problem has 4 columns of features: OUTLOOK, TEMPERATURE, HUMIDITY, WINDY; 1 result column (or label column) is PLAY TENNIS?
With the values ​​of the feature columns, the result PLAY TENNIS? will be Yes or No.

There are 14 samples:


No.    OUTLOOK     TEMPERATURE     HUMIDITY     WINDY     PLAY TENNIS?
1,     Sunny,      Hot,            High,        Weak,     No
2,     Sunny,      Hot,            High,        Strong,   No
3,     Overcast,   Hot,            High,        Weak,     Yes
4,     Rain,       Mild,           High,        Weak,     Yes
5,     Rain,       Cool,           Normal,      Weak,     Yes
6,     Rain,       Cool,           Normal,      Strong,   No
7,     Overcast,   Cool,           Normal,      Strong,   Yes
8,     Sunny,      Mild,           High,        Weak,     No
9,     Sunny,      Cool,           Normal,      Weak,     Yes
10,    Rain,       Mild,           Normal,      Weak,     Yes
11,    Sunny,      Mild,           Normal,      Strong,   Yes
12,    Overcast,   Mild,           High,        Strong,   Yes
13,    Overcast,   Hot,            Normal,      Weak,     Yes
14,    Rain,       Mild,           High,        Strong,   No



We edit the file fppdata.txt with the following content

-----BEGIN DATA DEFINITION-----
OUTLOOK: Sunny, Overcast, Rain
TEMPERATURE: Hot, Mild, Cool
HUMIDITY: High, Normal
WINDY: Weak, Strong
PLAY_TENNIS?: Yes, No
-----END DATA DEFINITION-----

Football predictions data

No.    OUTLOOK     TEMPERATURE     HUMIDITY     WINDY     PLAY TENNIS?
1,     Sunny,      Hot,            High,        Weak,     No
2,     Sunny,      Hot,            High,        Strong,   No
3,     Overcast,   Hot,            High,        Weak,     Yes
4,     Rain,       Mild,           High,        Weak,     Yes
5,     Rain,       Cool,           Normal,      Weak,     Yes
6,     Rain,       Cool,           Normal,      Strong,   No
7,     Overcast,   Cool,           Normal,      Strong,   Yes
8,     Sunny,      Mild,           High,        Weak,     No
9,     Sunny,      Cool,           Normal,      Weak,     Yes
10,    Rain,       Mild,           Normal,      Weak,     Yes
11,    Sunny,      Mild,           Normal,      Strong,   Yes
12,    Overcast,   Mild,           High,        Strong,   Yes
13,    Overcast,   Hot,            Normal,      Weak,     Yes
14,    Rain,       Mild,           High,        Strong,   No



3) Training

Network training simply runs a command like this:

./fpp -l -j2



Now we have additionally weight file weights.txt



4) Using the model

To use the model, you run the non-parameter fpp

./fpp


The decision tree of the problem is as follows



If we enter values

OUTLOOK: Sunny
HUMIDITY: Normal
WINDY, TEMPERATURE are arbitrary

The result will be Yes

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required


What is 7 + 6?

required