result – Learner results

This module includes a few classes and functions for working with results of any Pebl learner.

Configuration Parameters

result.filename

The name of the result output file default=result.pebl

result.format

The format for the pebl result file (pickle or html) default=pickle

result.outdir

Directory for html report. default=result

result.size

Number of top-scoring networks to save. Specify 0 to indicate that all scored networks should be saved. default=1000

Learner Result

class pebl.result.LearnerResult(learner_=None, size=None)

Class for storing any and all output of a learner.

This is a mutable container for networks and scores. In the future, it will also be the place to collect statistics related to the learning task.

add_network(net, score)

Add a network and score to the results.

posterior

Returns a posterior object for this result.

start_run()

Indicates that the learner is starting a new run.

stop_run()

Indicates that the learner is stopping a run.

tofile(filename=None)

Save the result to a python pickle file.

The result can be later read using the result.fromfile function.

tohtml(outdir=None)

Create a html report of the result.

outdir is a directory to create html files inside.

Functions

pebl.result.merge(*args)

Returns a merged result object.

Example:

merge(result1, result2, result3)
results = [result1, result2, result3]
merge(results)
merge(*results)
pebl.result.fromfile(filename)

Loads a learner result from file.

Table Of Contents

Previous topic

prior – Prior models

Next topic

taskcontroller.multiprocess – Multiprocess task controller

This Page