[OpenR8 solution] RegressionForest (date analyzing)
  1. RegressionForest

 

Inference results from the use of random forest prediction data.

 

 

  1. Folder Introduction 

 

The contents of this solution folder are shown in Fig. 1 below, as described in the following table.

 

The source code path is shown Fig. 2 below.

 

The two paths of data and trained models are shown Fig. 3 below.

 

Fig. 1. Folder diagram..png

Fig. 1. Folder diagram.

 

File

Description

regression_forest_training.flow

Flow for training.

regression_forest_inference.flow

Read a trained model to predict.

data folder

The path of the input data and the model file.

src folder

Path to the source code required to run flow.

 

Fig. 2. Folder diagram..png

Fig. 2. Folder diagram.

 

File

Description

regression_forest_training.py

The PY source code used in the training.

regression_forest_inference.py

Inference that the PY source code will be used.

 

Fig. 3. Folder diagram..png

Fig. 3. Folder diagram.

 

File

Description

Housing Values in Suburbs of Boston.txt

Field description of CSV data.

housing.csv

Input data.

housing_test.csv

The data of the test.

(Run the files generated by Regression_forest_training.flow. Randomly pick out part of the data from Housing.csv as a test group)

housing_test_prediction.csv

The result of the inferred data.

regression_model.sav

Models produced after training

 

 

 

  1. Preparing data data : 

 

Please find housing.csv in the OpenR8 > solution > Regressionforest > data folder. As shown in Fig. 4 below, you can see that the last field N is the output value (or label number), and the remaining previous fields are input values. The output can be inferred from several input values.

 

If you want to change the data to your own data. Please fill in the values entered (that is, the cause) in the previous fields, and fill in the output value (that is, the result) in the last field.

 

Fig. 4. Enter the contents of the data. .png

Fig. 4. Enter the contents of the data.

 

 

  1. Run the flow file for training 

 

【Training Models】  

How to use it : Run R8.exe > Open and load flow files > Training Models. Each step is as follows.

 

The first step: Run R8.exe. See Fig. 5 below.

 

Fig. 5. Run R8.png

Fig. 5. Run R8.exe.

 

The Second Step : Open and load flow files. See Fig. 6 below.

 

Fig. 6. Open the flow file..png

Fig. 6. Open the flow file.

 

The third step : Set the input data. See Fig. 7 below.

 

Fig. 7. Select the data you want to train and test..png

Fig. 7. Select the data you want to train and test.

 

Step Fourth: Set the data you want to enter. See Fig. 8 below.

 

Fig. 8. Set the proportion of data to test..png

Fig. 8. Set the proportion of data to test.

 

Step Fifth: Set the file name of the model. See Fig. 9 below.

 

Fig. 9. Set the file name of the model..png

Fig. 9. Set the file name of the model.

 

Step Fifth: Perform training. See Fig. 10 below.

 

Fig. 10. Running training..png

Fig. 10. Running training.

 

Step sixth: the generated model. See Fig. 11 below.

 

Fig. 11. The resulting model..png

Fig. 11. The resulting model.

 

 

  1. Run flow for inference testing : 

 

The first step: open and load the process file. See Fig. 12 below.

 

Fig. 12. Open the solution..png

Fig. 12. Open the solution.

 

The second step: Set the data to be tested. See Fig. 13 below.

 

Fig. 13. Select the data to test..png

Fig. 13. Select the data to test.

 

The third step : Set the model to test. See Fig. 14 below.

 

Fig. 14. Select the model you want to test..png

Fig. 14. Select the model you want to test.

 

Step Fourth : Execution inference. See Fig. 15 below.

 

Fig. 15. Running inference..png

Fig. 15. Running inference.

 

Step Fifth: The result of finishing the inference. See Fig. 16, Fig. 17 below. 

 

Fig. 16. The result file for which the inference has been completed..png

Fig. 16. The result file for which the inference has been completed.

 

Fig. 17. The result file of the inference..png

Fig. 17. The result file of the inference.

 


Recommended Article

1.
OpenR8 Community Edition - AI Software for Everyone (Free Download)