Multimedia Computing and Computer Vision Lab

The fertilized forests project has the aim to provide an easy to use, easy to extend, yet fast library for decision forests. It summarizes the research in this field and provides a solid platform to extend it.

The library is thoroughly tested and highly flexible. Its development started at the Multimedia Computing and Computer Vision Lab of the University of Augsburg. It is available under the permissive 2-clause BSD license. If you use this software for your research, please consider citing it.

Feature highlights are:

A minimal example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include <fertilized/fertilized.h>
using namespace fertilized;
auto soil = Soil<>();
auto forest = soil.StandardClassificationForest(2,  // # classes
                                                3); // # features
Array<float, 2, 2> data = allocate(10, 3);
// Fill the data array (10 samples, 3 features).
Array<uint, 2, 2> annotation = allocate(10, 1);
// Fill the annotation array (10 samples, 1 annotation).
forest -> fit(data, annotation);
Array<float, 2, 2> new_data = allocate(100, 3);
// Fill the new data (100 samples, 3 features) and get predictions.
Array<double, 2, 2> predictions = forest -> predict(new_data);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import fertilized
import numpy as np
soil = fertilized.Soil()
forest = soil.StandardClassificationForest(2, # # classes
                                           3) # # features
data = np.empty(size=(10, 3), dtype='float')
# Fill the data array (10 samples, 3 features).
annotation = np.empty(size=(10, 1), dtype='uint')
# Fill the annotation array (10 samples, 1 annotation).
forest.fit(data, annotation)
new_data = np.empty(size=(100, 3), dtype='float')
# Fill the new data (100 samples, 3 features) and get predictions.
predictions = forest.predict(new_data)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
addpath(strcat('pathto', filesep, 'fertilized'));

soil = Soil();
forest = soil.StandardClassificationForest(2,  % # classes
                                           3); % # features
data = single(zeros(10, 3));
% Fill the data array (10 samples, 3 features).
annotation = uint32(zeros(10, 1));
% Fill the annotation array (10 samples, 1 annotation);
forest.fit(data, annotation);
new_data = single(zeros(100, 3));
% Fill the new data (100 samples, 3 features) and get predictions.
predictions = forest.predict(new_data);