(self, request, context, path="../models/")
Class initializer.
        :param request: an iterable sequence of RowData
        :param context:
        :param path: a directory path to store persistent models
        :Sets up the model parameters based on the request
Class initializer.
        :param request: an iterable sequence of RowData
        :param context:
        :param path: a directory path to store persistent models
        :Sets up the model parameters based on the request
Class initializer . : param request : an iterable sequence of RowData : param context : : param path : a directory path to store persistent models : Sets up the model parameters based on the request
def __init__(self, request, context, path="../models/"):
        """
        Class initializer.
        :param request: an iterable sequence of RowData
        :param context:
        :param path: a directory path to store persistent models
        :Sets up the model parameters based on the request
        """
               
        # Set the request, context and path variables for this object instance
        self.request = request
        self.context = context
        self.path = path
        self.logfile = None
        
        # Set up a dictionary of valid algorithmns
        self.algorithms = {"DummyClassifier":DummyClassifier, "DummyRegressor":DummyRegressor,\
                           "AdaBoostClassifier":AdaBoostClassifier, "AdaBoostRegressor":AdaBoostRegressor,\
                           "BaggingClassifier":BaggingClassifier, "BaggingRegressor":BaggingRegressor,\
                           "ExtraTreesClassifier":ExtraTreesClassifier, "ExtraTreesRegressor":ExtraTreesRegressor,\
                           "GradientBoostingClassifier":GradientBoostingClassifier,\
                           "GradientBoostingRegressor":GradientBoostingRegressor,\
                           "RandomForestClassifier":RandomForestClassifier, "RandomForestRegressor":RandomForestRegressor,\
                           "VotingClassifier":VotingClassifier, "GaussianProcessClassifier":GaussianProcessClassifier,\
                           "GaussianProcessRegressor":GaussianProcessRegressor, "LinearRegression":LinearRegression,\
                           "LogisticRegression":LogisticRegression, "LogisticRegressionCV":LogisticRegressionCV,\
                           "PassiveAggressiveClassifier":PassiveAggressiveClassifier,\
                           "PassiveAggressiveRegressor":PassiveAggressiveRegressor, "Perceptron":Perceptron,\
                           "RANSACRegressor":RANSACRegressor, "Ridge":Ridge, "RidgeClassifier":RidgeClassifier,\
                           "RidgeCV":RidgeCV, "RidgeClassifierCV":RidgeClassifierCV, "SGDClassifier":SGDClassifier,\
                           "SGDRegressor":SGDRegressor, "TheilSenRegressor":TheilSenRegressor, "BernoulliNB":BernoulliNB,\
                           "GaussianNB":GaussianNB, "MultinomialNB":MultinomialNB,\
                           "KNeighborsClassifier":KNeighborsClassifier, "KNeighborsRegressor":KNeighborsRegressor,\
                           "RadiusNeighborsClassifier":RadiusNeighborsClassifier,\
                           "RadiusNeighborsRegressor":RadiusNeighborsRegressor, "MLPClassifier":MLPClassifier,\
                           "MLPRegressor":MLPRegressor, "LinearSVC":LinearSVC, "LinearSVR":LinearSVR, "NuSVC":NuSVC,\
                           "NuSVR":NuSVR, "SVC":SVC, "SVR":SVR, "DecisionTreeClassifier":DecisionTreeClassifier,\
                           "DecisionTreeRegressor":DecisionTreeRegressor, "ExtraTreeClassifier":ExtraTreeClassifier,\
                           "ExtraTreeRegressor":ExtraTreeRegressor, "PCA":PCA, "KernelPCA":KernelPCA, "IncrementalPCA":IncrementalPCA,\
                           "TruncatedSVD":TruncatedSVD, "FactorAnalysis":FactorAnalysis, "FastICA":FastICA, "NMF":NMF,\
                           "SparsePCA":SparsePCA, "DictionaryLearning":DictionaryLearning,\
                           "LatentDirichletAllocation":LatentDirichletAllocation,\
                           "MiniBatchDictionaryLearning":MiniBatchDictionaryLearning, "MiniBatchSparsePCA":MiniBatchSparsePCA,\
                           "AffinityPropagation":AffinityPropagation, "AgglomerativeClustering":AgglomerativeClustering,\
                           "Birch":Birch, "DBSCAN":DBSCAN, "FeatureAgglomeration":FeatureAgglomeration, "KMeans":KMeans,\
                            "MiniBatchKMeans":MiniBatchKMeans, "MeanShift":MeanShift, "SpectralClustering":SpectralClustering,\
                            "ARDRegression":ARDRegression, "BayesianRidge":BayesianRidge, "ElasticNet":ElasticNet,\
                            "ElasticNetCV":ElasticNetCV, "HuberRegressor":HuberRegressor, "Lars":Lars, "LarsCV":LarsCV,\
                            "Lasso":Lasso, "LassoCV":LassoCV, "LassoLars":LassoLars, "LassoLarsCV":LassoLarsCV, "LassoLarsIC":LassoLarsIC,\
                            "MultiTaskLasso":MultiTaskLasso, "MultiTaskElasticNet":MultiTaskElasticNet, "MultiTaskLassoCV":MultiTaskLassoCV,\
                            "MultiTaskElasticNetCV":MultiTaskElasticNetCV, "OrthogonalMatchingPursuit":OrthogonalMatchingPursuit,\
                            "OrthogonalMatchingPursuitCV":OrthogonalMatchingPursuitCV, "KerasRegressor":KerasRegressorForQlik,\
                            "KerasClassifier":KerasClassifierForQlik}
        
        self.decomposers = {"PCA":PCA, "KernelPCA":KernelPCA, "IncrementalPCA":IncrementalPCA, "TruncatedSVD":TruncatedSVD,\
                            "FactorAnalysis":FactorAnalysis, "FastICA":FastICA, "NMF":NMF, "SparsePCA":SparsePCA,\
                            "DictionaryLearning":DictionaryLearning, "LatentDirichletAllocation":LatentDirichletAllocation,\
                            "MiniBatchDictionaryLearning":MiniBatchDictionaryLearning, "MiniBatchSparsePCA":MiniBatchSparsePCA}
        
        self.classifiers = ["DummyClassifier", "AdaBoostClassifier", "BaggingClassifier", "ExtraTreesClassifier",\
                            "GradientBoostingClassifier", "RandomForestClassifier", "VotingClassifier",\
                            "GaussianProcessClassifier", "LogisticRegression", "LogisticRegressionCV",\
                            "PassiveAggressiveClassifier", "Perceptron", "RidgeClassifier", "RidgeClassifierCV",\
                            "SGDClassifier", "BernoulliNB", "GaussianNB", "MultinomialNB", "KNeighborsClassifier",\
                            "RadiusNeighborsClassifier", "MLPClassifier", "LinearSVC", "NuSVC", "SVC",\
                            "DecisionTreeClassifier", "ExtraTreeClassifier", "KerasClassifier"] 
        
        self.regressors = ["DummyRegressor", "AdaBoostRegressor", "BaggingRegressor", "ExtraTreesRegressor",\
                           "GradientBoostingRegressor", "RandomForestRegressor", "GaussianProcessRegressor",\
                           "LinearRegression", "PassiveAggressiveRegressor", "RANSACRegressor", "Ridge", "RidgeCV",\
                           "SGDRegressor", "TheilSenRegressor", "KNeighborsRegressor", "RadiusNeighborsRegressor",\
                           "MLPRegressor", "LinearSVR", "NuSVR", "SVR", "DecisionTreeRegressor",\
                           "ExtraTreeRegressor", "ARDRegression", "BayesianRidge", "ElasticNet", "ElasticNetCV",\
                           "HuberRegressor", "Lars", "LarsCV", "Lasso", "LassoCV", "LassoLars", "LassoLarsCV",\
                           "LassoLarsIC", "MultiTaskLasso", "MultiTaskElasticNet", "MultiTaskLassoCV", "MultiTaskElasticNetCV",\
                           "OrthogonalMatchingPursuit", "OrthogonalMatchingPursuitCV", "KerasRegressor"]
    
        self.clusterers = ["AffinityPropagation", "AgglomerativeClustering", "Birch", "DBSCAN", "FeatureAgglomeration", "KMeans",\
                           "MiniBatchKMeans", "MeanShift", "SpectralClustering"]
def __init__ ( self , request , context , path = "../models/" ) : # Set the request, context and path variables for this object instance self . request = request self . context = context self . path = path self . logfile = None # Set up a dictionary of valid algorithmns self . algorithms = { "DummyClassifier" : DummyClassifier , "DummyRegressor" : DummyRegressor , "AdaBoostClassifier" : AdaBoostClassifier , "AdaBoostRegressor" : AdaBoostRegressor , "BaggingClassifier" : BaggingClassifier , "BaggingRegressor" : BaggingRegressor , "ExtraTreesClassifier" : ExtraTreesClassifier , "ExtraTreesRegressor" : ExtraTreesRegressor , "GradientBoostingClassifier" : GradientBoostingClassifier , "GradientBoostingRegressor" : GradientBoostingRegressor , "RandomForestClassifier" : RandomForestClassifier , "RandomForestRegressor" : RandomForestRegressor , "VotingClassifier" : VotingClassifier , "GaussianProcessClassifier" : GaussianProcessClassifier , "GaussianProcessRegressor" : GaussianProcessRegressor , "LinearRegression" : LinearRegression , "LogisticRegression" : LogisticRegression , "LogisticRegressionCV" : LogisticRegressionCV , "PassiveAggressiveClassifier" : PassiveAggressiveClassifier , "PassiveAggressiveRegressor" : PassiveAggressiveRegressor , "Perceptron" : Perceptron , "RANSACRegressor" : RANSACRegressor , "Ridge" : Ridge , "RidgeClassifier" : RidgeClassifier , "RidgeCV" : RidgeCV , "RidgeClassifierCV" : RidgeClassifierCV , "SGDClassifier" : SGDClassifier , "SGDRegressor" : SGDRegressor , "TheilSenRegressor" : TheilSenRegressor , "BernoulliNB" : BernoulliNB , "GaussianNB" : GaussianNB , "MultinomialNB" : MultinomialNB , "KNeighborsClassifier" : KNeighborsClassifier , "KNeighborsRegressor" : KNeighborsRegressor , "RadiusNeighborsClassifier" : RadiusNeighborsClassifier , "RadiusNeighborsRegressor" : RadiusNeighborsRegressor , "MLPClassifier" : MLPClassifier , "MLPRegressor" : MLPRegressor , "LinearSVC" : LinearSVC , "LinearSVR" : LinearSVR , "NuSVC" : NuSVC , "NuSVR" : NuSVR , "SVC" : SVC , "SVR" : SVR , "DecisionTreeClassifier" : DecisionTreeClassifier , "DecisionTreeRegressor" : DecisionTreeRegressor , "ExtraTreeClassifier" : ExtraTreeClassifier , "ExtraTreeRegressor" : ExtraTreeRegressor , "PCA" : PCA , "KernelPCA" : KernelPCA , "IncrementalPCA" : IncrementalPCA , "TruncatedSVD" : TruncatedSVD , "FactorAnalysis" : FactorAnalysis , "FastICA" : FastICA , "NMF" : NMF , "SparsePCA" : SparsePCA , "DictionaryLearning" : DictionaryLearning , "LatentDirichletAllocation" : LatentDirichletAllocation , "MiniBatchDictionaryLearning" : MiniBatchDictionaryLearning , "MiniBatchSparsePCA" : MiniBatchSparsePCA , "AffinityPropagation" : AffinityPropagation , "AgglomerativeClustering" : AgglomerativeClustering , "Birch" : Birch , "DBSCAN" : DBSCAN , "FeatureAgglomeration" : FeatureAgglomeration , "KMeans" : KMeans , "MiniBatchKMeans" : MiniBatchKMeans , "MeanShift" : MeanShift , "SpectralClustering" : SpectralClustering , "ARDRegression" : ARDRegression , "BayesianRidge" : BayesianRidge , "ElasticNet" : ElasticNet , "ElasticNetCV" : ElasticNetCV , "HuberRegressor" : HuberRegressor , "Lars" : Lars , "LarsCV" : LarsCV , "Lasso" : Lasso , "LassoCV" : LassoCV , "LassoLars" : LassoLars , "LassoLarsCV" : LassoLarsCV , "LassoLarsIC" : LassoLarsIC , "MultiTaskLasso" : MultiTaskLasso , "MultiTaskElasticNet" : MultiTaskElasticNet , "MultiTaskLassoCV" : MultiTaskLassoCV , "MultiTaskElasticNetCV" : MultiTaskElasticNetCV , "OrthogonalMatchingPursuit" : OrthogonalMatchingPursuit , "OrthogonalMatchingPursuitCV" : OrthogonalMatchingPursuitCV , "KerasRegressor" : KerasRegressorForQlik , "KerasClassifier" : KerasClassifierForQlik } self . decomposers = { "PCA" : PCA , "KernelPCA" : KernelPCA , "IncrementalPCA" : IncrementalPCA , "TruncatedSVD" : TruncatedSVD , "FactorAnalysis" : FactorAnalysis , "FastICA" : FastICA , "NMF" : NMF , "SparsePCA" : SparsePCA , "DictionaryLearning" : DictionaryLearning , "LatentDirichletAllocation" : LatentDirichletAllocation , "MiniBatchDictionaryLearning" : MiniBatchDictionaryLearning , "MiniBatchSparsePCA" : MiniBatchSparsePCA } self . classifiers = [ "DummyClassifier" , "AdaBoostClassifier" , "BaggingClassifier" , "ExtraTreesClassifier" , "GradientBoostingClassifier" , "RandomForestClassifier" , "VotingClassifier" , "GaussianProcessClassifier" , "LogisticRegression" , "LogisticRegressionCV" , "PassiveAggressiveClassifier" , "Perceptron" , "RidgeClassifier" , "RidgeClassifierCV" , "SGDClassifier" , "BernoulliNB" , "GaussianNB" , "MultinomialNB" , "KNeighborsClassifier" , "RadiusNeighborsClassifier" , "MLPClassifier" , "LinearSVC" , "NuSVC" , "SVC" , "DecisionTreeClassifier" , "ExtraTreeClassifier" , "KerasClassifier" ] self . regressors = [ "DummyRegressor" , "AdaBoostRegressor" , "BaggingRegressor" , "ExtraTreesRegressor" , "GradientBoostingRegressor" , "RandomForestRegressor" , "GaussianProcessRegressor" , "LinearRegression" , "PassiveAggressiveRegressor" , "RANSACRegressor" , "Ridge" , "RidgeCV" , "SGDRegressor" , "TheilSenRegressor" , "KNeighborsRegressor" , "RadiusNeighborsRegressor" , "MLPRegressor" , "LinearSVR" , "NuSVR" , "SVR" , "DecisionTreeRegressor" , "ExtraTreeRegressor" , "ARDRegression" , "BayesianRidge" , "ElasticNet" , "ElasticNetCV" , "HuberRegressor" , "Lars" , "LarsCV" , "Lasso" , "LassoCV" , "LassoLars" , "LassoLarsCV" , "LassoLarsIC" , "MultiTaskLasso" , "MultiTaskElasticNet" , "MultiTaskLassoCV" , "MultiTaskElasticNetCV" , "OrthogonalMatchingPursuit" , "OrthogonalMatchingPursuitCV" , "KerasRegressor" ] self . clusterers = [ "AffinityPropagation" , "AgglomerativeClustering" , "Birch" , "DBSCAN" , "FeatureAgglomeration" , "KMeans" , "MiniBatchKMeans" , "MeanShift" , "SpectralClustering" ]