fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684,pyprob/model.py,Model,trace_length_mean,#Model#Any#,205

Before Change



    def trace_length_mean(self, num_traces=1000, *args, **kwargs):
        traces = self._prior_traces(num_traces, trace_mode=TraceMode.RECORD, inference_network=None, *args, **kwargs)
        trace_length_dist = Empirical([trace.length for trace in traces])
        return trace_length_dist.mean

    def trace_length_stddev(self, num_traces=1000, *args, **kwargs):

After Change



    def trace_length_mean(self, num_traces=1000, *args, **kwargs):
        trace_lengths = self._prior_traces(num_traces, trace_mode=TraceMode.RECORD, inference_network=None, map_func=lambda trace: trace.length, *args, **kwargs)
        trace_length_dist = Empirical(trace_lengths)
        return trace_length_dist.mean

    def trace_length_stddev(self, num_traces=1000, *args, **kwargs):
        trace_lengths = self._prior_traces(num_traces, trace_mode=TraceMode.RECORD, inference_network=None, map_func=lambda trace: trace.length, *args, **kwargs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: pyprob/pyprob
Commit Name: fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684
Time: 2018-04-01
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/model.py
Class Name: Model
Method Name: trace_length_mean


Project Name: pyprob/pyprob
Commit Name: fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684
Time: 2018-04-01
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/model.py
Class Name: Model
Method Name: trace_length_min


Project Name: pyprob/pyprob
Commit Name: fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684
Time: 2018-04-01
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/model.py
Class Name: Model
Method Name: trace_length_max


Project Name: pyprob/pyprob
Commit Name: fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684
Time: 2018-04-01
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/model.py
Class Name: Model
Method Name: trace_length_stddev