Algorithm Selection

PHOTONAI comes with a large collection of machine learning algorithms. The interface always remains the same regardless of the source package.

Have a look at PHOTONAIs built-in Pre-processing and Learning Algorithms. You can select the algorithm via its name by using a PipelineElement as shown in the following examples.

In addition you can specify hyperparameters as well as their value range in order to be optimized by the hyperparameter optimization strategy. Currently, PHOTONAI offers Grid-Search, Random Search and two frameworks for bayesian optimization.

PCA

       
from photonai.base import PipelineElement
PipelineElement('PCA',
                hyperparameters={'n_components': IntegerRange(5, 20)},
                test_disabled=True)
# to test if disabling the PipelineElement improves performance,
# simply add the test_disabled=True parameter
       

SVC

       
PipelineElement('SVC',
                hyperparameters={'kernel': Categorical(['rbf', 'poly']),
                                 'C': FloatRange(0.5, 2)},
                gamma='auto')
       

Keras Neural Net

       
PipelineElement('KerasDnnRegressor',
                hyperparameters={'hidden_layer_sizes': Categorical([[10, 8, 4],
                                                                    [20, 5, 3]]),
                                 'dropout_rate': Categorical([[0.5, 0.2, 0.1],
                                                              0.1])
                                },
                activations='relu',
                epochs=5,
                batch_size=32)
       

EASY ACCESS TO ESTABLISHED ML IMPLEMENTATIONS