The K Desktop Environment

Next Previous Table of Contents

3. Usage

3.1 General Usage

The general procedure for analyzing account data is as follows:

  1. Open an account data file from menu File/Open... or File/Open Recent
  2. (Optionally) Set training settings from menu Data/Training Settings...
  3. Train the data from menu Data/Train neural network
  4. (Optionally) Open budget from menu File/Open budget...
  5. Inspect prediction statistics from menu Data/Prediction statistics...
  6. Visualize the predictions from menu Data/Plot data...

These steps and other optional procedures are explaned below.

3.2 Account data file

Account data is loaded from menu File/Open.

The data file contains a number of monthly account balances from a continuous time period. The last 12 months of the data are considered as test data, and all the data before that is used as training data.

The training data is used to predict what the account balaces in the last year should be. The accountant compares that prediction to the actual balances, the test data in the file. If there is a great difference in a certain balance, the accountant may choose to pay more attention to it.

Data file format

The file format must be exactly correct, as explained here. The immediately first row is a header that contains the names of the accounts, separated by tab characters. This first column of the first row is empty, followed by a single tab character.

The rest of the rows are data rows. The columns are separated by a single tab character. First column of each data row is time label. Two first numbers are the year and two latter numbers are the month. The year is always given with two digits (Y2k problems won't occur before 2030).

Below is an example from the beginning of an account data file.

        Net sales       Materials       Person costs    Gross margin    Administration  Total indirect  Operating profit        Receivables     Trade debts
9001    4769    -974    -1041   2754    -297    -1713   1041    8184    -6891
9002    3794    -874    -717    2203    -112    -1074   1129    8612    -8334
9003    4846    -1315   -938    2593    -387    -2191   402     8613    -8153
9004    4452    -1564   -922    1966    -136    -1582   384     9204    -8071
9005    4665    -1283   -702    2680    -424    -1995   685     9492    -8704
9006    4420    -1301   -738    2381    -316    -2041   340     9818    -8541
9007    871     -242    -193    436     -92     -549    -113    9513    -8110
9008    5561    -1451   -1046   3064    -355    -2274   790     9558    -8023
9009    3666    -1145   -799    1722    -268    -1731   -9      9624    -7983
9010    4179    -1043   -777    2359    -216    -1832   527     9615    -8091
9011    3924    -1013   -1077   1834    -295    -1305   529     9615    -8161
9012    2572    -792    -814    966     -290    -2166   -1200   8609    -7794
9101    3584    -723    -840    2021    -343    -1824   197     8866    -7693
9102    3151    -707    -568    1876    -436    -1517   359     7737    -7700
9103    3703    -825    -652    2226    -285    -1947   279     8820    -7299
...

Note that the first row may seem to continue on the second row, but that because of word wrap in this document. The actual data file must not be word-wrapped.

The final row containing numbers must have a trailing newline, but there must be nothing after that.

Exporting table as text from spreadsheets

Most spreadsheet softwares support saving tables in tab spaced format.

Gnumeric supports tab spaced values. Use menu File/Save As and save the file as "Simple Text". The problem is that GNumeric puts the name of the sheet as the first row. You must remove it with a text editor.

KSpread supports only comma spaced values (CSV). Choose menu item File/Save As, select the CSV format, and save the file with name datafile.csv. Then open a shell window, change to appropriate directory, and issue following

$ perl -pe 's/,/\t/g' datafile.csv >datafile-tab.csv

This changes the comma separators to tab characters. Check that the file format is correct.

Budget data files

Budget data files follow exactly the same format as the actual data file. The column names in the first row are ignored. The number and order of the data columns must be exactly same as in training data file.

3.3 Neural network training options

Changing the neural network training options shouldn't be done by the accountant in routine operation. The options are mostly for research purposes.

Next Previous Table of Contents