23d57c2f5ea599912459f1c7c44bfb0a83f5bdc6,pgmpy/readwrite/BIF.py,BIFReader,get_cpd,#BIFReader#,234

Before Change


            self.grammar.variable_cpds
        except AttributeError:
            self.grammar = self.Get_grammar(self.network)
        return self.grammar.variable_cpds

    def get_parents(self):

        

After Change


                            [0.4, 0.95]])}
         
        variable_cpds = {}
        for block in self.probability_block:
            name = self.probability_expr.searchString(block)[0][0]
            cpds = self.cpd_expr.searchString(block)
            arr = [float(j) for i in cpds for j in i]
            arr = numpy.array(arr)
            arr = arr.reshape((len(self.variable_states[name]),
                              arr.size//len(self.variable_states[name])))
            variable_cpds[name] = arr

        return variable_cpds

    def get_edges(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: pgmpy/pgmpy
Commit Name: 23d57c2f5ea599912459f1c7c44bfb0a83f5bdc6
Time: 2015-11-16
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_cpd


Project Name: pgmpy/pgmpy
Commit Name: 23d57c2f5ea599912459f1c7c44bfb0a83f5bdc6
Time: 2015-11-16
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_cpd


Project Name: pgmpy/pgmpy
Commit Name: 23d57c2f5ea599912459f1c7c44bfb0a83f5bdc6
Time: 2015-11-16
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_parents


Project Name: pgmpy/pgmpy
Commit Name: 23d57c2f5ea599912459f1c7c44bfb0a83f5bdc6
Time: 2015-11-16
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_variables