Icon

06_​Parameter_​Optimization_​two_​examples

2 Examples for Parameter Optimization Loops

This workflow shows 2 examples of parameter optimization in a decision tree and in a logistic regression. In the decision tree we optimize the minimum number of records per node within a range [2,15] with step 1. In the Logistic Regression we optimize step size in (0,1] step =0.1 and variance in (0, 5] step = 0.1

2 Examples for Parameter Optimization LoopThis workflow shows 2 examples of parameter optimization. In the Decision Tree we optimize the minimum number of records per node.In the Logistic Regression we optimize the learning rate and variance. Parameter Optimization for the Decision Tree Learner using the Brute Force strategy (only one parameter)This loop performs a parameter optimization on the minimum number of records for the Decision Tree Learner node. It finds the value between 2 and 15 that leads to thehighest model accuracy.The different parameters are output as flow variables by the Parameter Optimization Loop Start node. The parameter settings of the Decision Tree algorithm are overwritten bythe flow variables and trees with different settings are trained. The Scorer node creates a flow variable with the actual accuracy in each iteration. This is then fed into theParameter Optimization Loop End node.The end node compares the accuracies and supplies the best value in the first output. Parameter Optimization for the Logistic Regression Learner using the Hill Climbing strategyThis loop performs a parameter optimization on step size and variance for the regularization and finds the set that leads to the highest Area under the ROC Curve. Unlike theexample above, here we use Hill Climbing Strategy. The Area under the ROC Curve is calculated by a JavaScript ROC Curve node and produced at output port, thentransformed into a flow variable, and finally fed into the Parameter Optimization Loop End node. This loop end node compares the values for the area under the ROC Curvewith all iterations and selects the parameter set that leads to the highest area under the ROC curve. Minimum Number of Records in {2,3,...,15}Compare Accurcy fordifferent interations80% for training20% for testingTrain decision tree model Apply model totest data setEvaluate Model.Accuracy is savedas flow variableSigma in {0.1, 0.2, ..., 5}Step size in {0.1, 0.2, ..., 2}Compare the Area under the ROC curveTrain model withSAG and Gaussprior80% for training set20% for testing setGenerate some exampledataGenerate some exampledataApply model to test data setCalculate thearea under the ROC curveTranform the valueinto a flow variable Parameter OptimizationLoop Start ParameterOptimization Loop End Partitioning DecisionTree Learner Decision TreePredictor Scorer Parameter OptimizationLoop Start ParameterOptimization Loop End LogisticRegression Learner Partitioning Data Generator Data Generator Logistic RegressionPredictor ROC Curve Table Row to Variable(deprecated) 2 Examples for Parameter Optimization LoopThis workflow shows 2 examples of parameter optimization. In the Decision Tree we optimize the minimum number of records per node.In the Logistic Regression we optimize the learning rate and variance. Parameter Optimization for the Decision Tree Learner using the Brute Force strategy (only one parameter)This loop performs a parameter optimization on the minimum number of records for the Decision Tree Learner node. It finds the value between 2 and 15 that leads to thehighest model accuracy.The different parameters are output as flow variables by the Parameter Optimization Loop Start node. The parameter settings of the Decision Tree algorithm are overwritten bythe flow variables and trees with different settings are trained. The Scorer node creates a flow variable with the actual accuracy in each iteration. This is then fed into theParameter Optimization Loop End node.The end node compares the accuracies and supplies the best value in the first output. Parameter Optimization for the Logistic Regression Learner using the Hill Climbing strategyThis loop performs a parameter optimization on step size and variance for the regularization and finds the set that leads to the highest Area under the ROC Curve. Unlike theexample above, here we use Hill Climbing Strategy. The Area under the ROC Curve is calculated by a JavaScript ROC Curve node and produced at output port, thentransformed into a flow variable, and finally fed into the Parameter Optimization Loop End node. This loop end node compares the values for the area under the ROC Curvewith all iterations and selects the parameter set that leads to the highest area under the ROC curve. Minimum Number of Records in {2,3,...,15}Compare Accurcy fordifferent interations80% for training20% for testingTrain decision tree model Apply model totest data setEvaluate Model.Accuracy is savedas flow variableSigma in {0.1, 0.2, ..., 5}Step size in {0.1, 0.2, ..., 2}Compare the Area under the ROC curveTrain model withSAG and Gaussprior80% for training set20% for testing setGenerate some exampledataGenerate some exampledataApply model to test data setCalculate thearea under the ROC curveTranform the valueinto a flow variable Parameter OptimizationLoop Start ParameterOptimization Loop End Partitioning DecisionTree Learner Decision TreePredictor Scorer Parameter OptimizationLoop Start ParameterOptimization Loop End LogisticRegression Learner Partitioning Data Generator Data Generator Logistic RegressionPredictor ROC Curve Table Row to Variable(deprecated)

Nodes

Extensions

Links