fe6d7f916a0e9d1a0f42626f3747ed14f9e3f684,pyprob/model.py,Model,trace_length_stddev,#Model#Any#,210
Before Change
def trace_length_stddev(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.stddev
def trace_length_min(self, num_traces=1000, *args, **kwargs):
traces = self._prior_traces(num_traces, trace_mode=TraceMode.RECORD, inference_network=None, *args, **kwargs)
After Change
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)
trace_length_dist = Empirical(trace_lengths)
return trace_length_dist.stddev
def trace_length_min(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)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
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_stddev
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_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