def train(self, table_name, indep, dep, numIter=100, optimizer='irls',precision=0.001):
            self.model = {}
            #If indep is a list, then the input is specified as a list of columns in a table.
            #1) First, we will transform any categorical columns in this list.
            #2) We will marshal the values from the columns into an array, that can be passed on to MADlib's logistic regression algorithm.
            if(isinstance(indep,[].__class__)):
                self.model['indep_org'] = indep
                table_name, indep, dep, _ = pivotCategoricalColumns(self.dbconn,table_name, indep, dep)
                #Convert transformed independent columns into an array
                table_name, indep = convertsColsToArray(self.dbconn, table_name, indep, dep)
            else:
                self.model['indep_org'] = indep
               
            self.model['indep'] = indep
            self.model['dep'] = dep
            
            stmt = '''
                      select * 
                      from {madlib_schema}.logregr('{table_name}','{dep}','{indep}',{numIter}, '{optimizer}', {precision}) 
                   '''.format(dep=dep,
                               indep=self.model['indep'],
                               table_name=table_name,
                               numIter=numIter,
                               optimizer=optimizer,
                               precision=precision,
                               madlib_schema=self.dbconn.madlib_schema
                              ) 
            
            logging.info('statement :{0}'.format(stmt))
            mdl_params = psql.read_frame(stmt, self.dbconn.getConnection())
            for param in mdl_params.columns:
                self.model[param] = mdl_params.get(param)[0]
            
            return self.model, mdl_params
Fail if C{instance} is not an instance of the given class or of
dataset/ETHPy150Open pivotalsoftware/pymadlib/pymadlib/pymadlib.py/LogisticRegression.train--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/unittest.py/_Assertions.failIfIsInstance