Esempio n. 1
0
    def __init__(self, baseModel, configFile):
        self.base = baseModel

        # Initialize databases for this extension
        self.modelParams = baseModel.modelParams
        self.modelParams.addDatabase("proc_id_model")
        self.gpuPtrs = baseModel.gpuPtrs
        self.gpuPtrs.addDatabase("proc_id_model")

        if not self.base.data.isspatial:
            log.error(
                "SpatialGmmProcessIdModel only supports spatial datasets!")
            exit()

        # Check whether the data file has hard coded process IDs
        if self.base.data.proc_ids_known:
            log.warning(
                "K and C are present in the data file but the SpatialGmmProcessIdModel ignores them!"
            )

        # Parse the configuration file to get params
        self.parseConfigurationFile(configFile)
        pprint_dict(self.params, "Process ID Model Params")

        self.initializeGpuKernels()
Esempio n. 2
0
 def __init__(self, baseModel, configFile):
     self.base = baseModel
     self.base.data = self.base.data
             
     # Check whether the data file has hard coded process IDs
     if not self.base.data.proc_ids_known:
         log.error("Process IDs are not present in the data!")
         
     # Parse the configuration file to get params
     self.parseConfigurationFile(configFile)
     pprint_dict(self.params, "Process ID Model Params")
     
     self.initializeGpuKernels()
Esempio n. 3
0
    def __init__(self, baseModel, configFile):
        self.base = baseModel
        self.base.data = self.base.data

        # Check whether the data file has hard coded process IDs
        if not self.base.data.proc_ids_known:
            log.error("Process IDs are not present in the data!")

        # Parse the configuration file to get params
        self.parseConfigurationFile(configFile)
        pprint_dict(self.params, "Process ID Model Params")

        self.initializeGpuKernels()
Esempio n. 4
0
 def __init__(self, baseModel, configFile):
     super(StochasticBlockModelCoupledWithW,self).__init__(baseModel, configFile)
     
     # Initialize databases for this extension
     self.modelParams.addDatabase("weight_model")
     self.gpuPtrs.addDatabase("weight_model")
     
     # Load the GPU kernels necessary for background rate inference
     # Allocate memory on GPU for background rate inference
     # Initialize host params        
     self.parseConfigurationFile(configFile)
     pprint_dict(self.params, "Weight and Graph Model Params")
     
     self.initializeGpuKernels()
Esempio n. 5
0
    def __init__(self, baseModel, configFile):
        super(StochasticBlockModelCoupledWithW,
              self).__init__(baseModel, configFile)

        # Initialize databases for this extension
        self.modelParams.addDatabase("weight_model")
        self.gpuPtrs.addDatabase("weight_model")

        # Load the GPU kernels necessary for background rate inference
        # Allocate memory on GPU for background rate inference
        # Initialize host params
        self.parseConfigurationFile(configFile)
        pprint_dict(self.params, "Weight and Graph Model Params")

        self.initializeGpuKernels()
Esempio n. 6
0
 def __init__(self, baseModel, configFile):
     # Store pointer to base model
     self.base = baseModel
             
     # Initialize databases for this extension
     self.modelParams = baseModel.modelParams
     self.modelParams.addDatabase("impulse_model")
     self.gpuPtrs = baseModel.gpuPtrs
     self.gpuPtrs.addDatabase("impulse_model")
     
     # Load the GPU kernels necessary for impulse response param inference
     # Allocate memory on GPU for inference
     # Initialize host params        
     self.parseConfigurationFile(configFile)
     pprint_dict(self.params, "Impulse Model Params")
Esempio n. 7
0
    def __init__(self, baseModel, configFile):
        # Store pointer to base model
        self.base = baseModel

        # Initialize databases for this extension
        self.modelParams = baseModel.modelParams
        self.modelParams.addDatabase("weight_model")
        self.gpuPtrs = baseModel.gpuPtrs
        self.gpuPtrs.addDatabase("weight_model")

        # Load the GPU kernels necessary for background rate inference
        # Allocate memory on GPU for background rate inference
        # Initialize host params
        self.parseConfigurationFile(configFile)
        pprint_dict(self.params, "Weight Model Params")

        self.initializeGpuKernels()
        self.initializeGpuMemory()
Esempio n. 8
0
    def __init__(self, dataManager, configFile, data):
        """
        Construct a new base model.
        """
        self.parseConfigFile(configFile)
        pprint_dict(self.params, "Base Model Params")

        # Save a pointer to the data and compute the intervals between spikes
        self.dm = dataManager
        self.data = data
        self.prepareData()

        # Initialize parameter and GPU pointer databases
        self.modelParams = ParamsDatabase()
        self.gpuPtrs = ParamsDatabase()

        # Initialize model parameters on host and gpu
        self.initializeRandomness()
        self.initializeGpuKernels()
        self.constructModelExtensions(configFile)
        self.computeSampleOrder()
Esempio n. 9
0
 def __init__(self, baseModel, configFile):
     self.base = baseModel
     
     # Initialize databases for this extension
     self.modelParams = baseModel.modelParams
     self.modelParams.addDatabase("proc_id_model")
     self.gpuPtrs = baseModel.gpuPtrs
     self.gpuPtrs.addDatabase("proc_id_model")
     
     if not self.base.data.isspatial:
         log.error("SpatialGmmProcessIdModel only supports spatial datasets!")
         exit()
     
     # Check whether the data file has hard coded process IDs
     if self.base.data.proc_ids_known:
         log.warning("K and C are present in the data file but the SpatialGmmProcessIdModel ignores them!")
         
     # Parse the configuration file to get params
     self.parseConfigurationFile(configFile)
     pprint_dict(self.params, "Process ID Model Params")
     
     self.initializeGpuKernels()
Esempio n. 10
0
 def __init__(self, dataManager, configFile, data):
     """
     Construct a new base model.
     """
     self.parseConfigFile(configFile)
     pprint_dict(self.params, "Base Model Params")
     
     # Save a pointer to the data and compute the intervals between spikes
     self.dm = dataManager
     self.data = data
     self.prepareData()
 
     
     # Initialize parameter and GPU pointer databases
     self.modelParams = ParamsDatabase()
     self.gpuPtrs = ParamsDatabase()
     
     # Initialize model parameters on host and gpu
     self.initializeRandomness()
     self.initializeGpuKernels()
     self.constructModelExtensions(configFile)
     self.computeSampleOrder()