Exemplo 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()
Exemplo 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()
Exemplo 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()
Exemplo 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()
Exemplo 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()
Exemplo 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")
Exemplo 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()
Exemplo 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()
Exemplo 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()
Exemplo 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()