PHOTONAI Wizard

Yeah! Let's start a new pipeline. We just want to make sure you know that all of your current choices are then replaced with a fresh and empty pipeline.

Start new Cancel

Analysis Name

Specify a name for this analysis.

Project Description

Please provide a short description of your project.

Project Folder

Please give a local directory for your photon analysis

                        
                            
# Specify how results are going to be saved
# Define hyperpipe
hyperpipe = Hyperpipe('None',
                      project_folder = './results',
                      optimizer="random_grid_search",
                      optimizer_params={'n_configurations': 30},
                      metrics=['accuracy', 'balanced_accuracy', 'specificity', 'sensitivity'],
                      best_config_metric="balanced_accuracy",
                      outer_cv = KFold(n_splits=5,shuffle=True),
                      inner_cv = KFold(n_splits=3, shuffle=True))
        
# Add transformer elements
preprocessing_pipe = Preprocessing()
hyperpipe += preprocessing_pipe
preprocessing_pipe += PipelineElement("LabelEncoder") 
                        
hyperpipe += PipelineElement("SimpleImputer", hyperparameters={}, 
                             test_disabled=False, missing_values=np.nan, strategy='mean', fill_value=0)
hyperpipe += PipelineElement("PCA", hyperparameters={'n_components': FloatRange(0.2, 0.99)}, 
                             test_disabled=False)
hyperpipe += PipelineElement("RandomForestClassifier", hyperparameters={'n_estimators': [25, 50, 75], 'min_samples_split': IntegerRange(2, 10), 'min_samples_leaf': IntegerRange(1, 10)}, criterion='gini', max_depth=None)

                        
                    

PHOTON SYNTAX

                    
                        
# Specify how results are going to be saved
# Define hyperpipe
hyperpipe = Hyperpipe('None',
                      project_folder = './results',
                      optimizer="random_grid_search",
                      optimizer_params={'n_configurations': 30},
                      metrics=['accuracy', 'balanced_accuracy', 'specificity', 'sensitivity'],
                      best_config_metric="balanced_accuracy",
                      outer_cv = KFold(n_splits=5,shuffle=True),
                      inner_cv = KFold(n_splits=3, shuffle=True))
        
# Add transformer elements
preprocessing_pipe = Preprocessing()
hyperpipe += preprocessing_pipe
preprocessing_pipe += PipelineElement("LabelEncoder") 
                        
hyperpipe += PipelineElement("SimpleImputer", hyperparameters={}, 
                             test_disabled=False, missing_values=np.nan, strategy='mean', fill_value=0)
hyperpipe += PipelineElement("PCA", hyperparameters={'n_components': FloatRange(0.2, 0.99)}, 
                             test_disabled=False)
hyperpipe += PipelineElement("RandomForestClassifier", hyperparameters={'n_estimators': [25, 50, 75], 'min_samples_split': IntegerRange(2, 10), 'min_samples_leaf': IntegerRange(1, 10)}, criterion='gini', max_depth=None)