def SetDefaults(runDetails=None): """ initializes a details object with default values **Arguments** - details: (optional) a _CompositeRun.CompositeRun_ object. If this is not provided, the global _runDetails will be used. **Returns** the initialized _CompositeRun_ object. """ if runDetails is None: runDetails = _runDetails return CompositeRun.SetDefaults(runDetails)
sys.exit(-1) if __name__ == '__main__': import getopt try: args, extras = getopt.getopt( sys.argv[1:], 'd:t:a:N:p:cSTHF:v:', ('thresh=', 'plotFile=', 'showPlot', 'pickleCol=', 'OOB', 'noSort', 'pickBase=', 'doROC', 'rocThresh=', 'enrich=')) except Exception: import traceback traceback.print_exc() Usage() details = CompositeRun.CompositeRun() CompositeRun.SetDefaults(details) details.activeTgt = [1] details.doTraining = 0 details.doHoldout = 0 details.dbTableName = '' details.plotFile = '' details.showPlot = 0 details.pickleCol = -1 details.errorEstimate = 0 details.sortIt = 1 details.pickBase = '' details.doROC = 0 details.rocThresh = -1 for arg, val in args:
import sys, time import math import numpy from rdkit.six.moves import cPickle from rdkit import RDConfig from rdkit.utils import listutils from rdkit.ML.Composite import Composite, BayesComposite #from ML.SVM import SVMClassificationModel as SVM from rdkit.ML.Data import DataUtils, SplitData from rdkit.ML import ScreenComposite from rdkit.Dbase import DbModule from rdkit.Dbase.DbConnection import DbConnect from rdkit.ML import CompositeRun from rdkit import DataStructs _runDetails = CompositeRun.CompositeRun() __VERSION_STRING = "3.2.3" _verbose = 1 def message(msg): """ emits messages to _sys.stdout_ override this in modules which import this one to redirect output **Arguments** - msg: the string to be displayed """