b384268df66742de0bc92a13db162b8409dda730,pgmpy/readwrite/BIF.py,BIFReader,get_values,#BIFReader#,218

Before Change


                                   arr.size // len(self.variable_states[var_name])))
            else:
                arr_length = numpy.prod([len(self.variable_states[var]) for var in parents])
                arr = [[0 for j in range(arr_length)] for i in self.variable_states[var_name]]
                length = len(self.variable_states[var_name])
                for prob_line in cpds:
                    states = prob_line[:len(parents)]

After Change


                    states = prob_line[:len(parents)]
                    vals = [float(i) for i in prob_line[len(parents):]]
                    values_dict[tuple(states)] = vals
                for index, combination in enumerate(product(*[self.variable_states[var] for var in parents])):
                    arr[:, index] = values_dict[combination]
            variable_cpds[var_name] = arr

        return variable_cpds
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: pgmpy/pgmpy
Commit Name: b384268df66742de0bc92a13db162b8409dda730
Time: 2019-04-19
Author: ankurankan@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_values


Project Name: Rostlab/nalaf
Commit Name: 234698b07ab372738686e3d3de6ab8f08b1a7057
Time: 2015-10-06
Author: carsten.uhlig@gmail.com
File Name: nala/learning/taggers.py
Class Name: RelationshipExtractionGeneMutation
Method Name: tag


Project Name: ysig/GraKeL
Commit Name: 6972f0a09dcd30b6eff5057430a612248f417f47
Time: 2018-01-10
Author: y.siglidis@gmail.com
File Name: grakel/graph_kernels.py
Class Name: GraphKernel
Method Name: calculate_kernel_matrix


Project Name: pgmpy/pgmpy
Commit Name: 8e46c0dfb78769a3f97db273e3c608059b74bdfa
Time: 2016-01-05
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/factors/JointProbabilityDistribution.py
Class Name: JointProbabilityDistribution
Method Name: check_independence