saealib.core.contracts.ProposalBatch#

class saealib.core.contracts.ProposalBatch(*, proposal_id, candidates, relations, requirements, metadata=<factory>)[ソース]#

ベースクラス: object

A candidate population plus its relations and feedback requirement.

パラメータ:
  • proposal_id (int)

  • candidates (CandidatePopulation)

  • relations (ProposalRelations)

  • requirements (FeedbackRequirement)

  • metadata (Mapping[str, float | int | bool | str | ndarray | Mapping[str, object] | Sequence[object]])

Methods

__init__

from_allocator

Allocate the proposal id explicitly from an existing allocator.

take

Take the same candidate rows and relation rows together.

Method Details

ProposalBatch.__init__(*, proposal_id, candidates, relations, requirements, metadata=<factory>)#
パラメータ:
  • proposal_id (int)

  • candidates (CandidatePopulation)

  • relations (ProposalRelations)

  • requirements (FeedbackRequirement)

  • metadata (Mapping[str, float | int | bool | str | ndarray | Mapping[str, object] | Sequence[object]])

戻り値の型:

None

classmethod ProposalBatch.from_allocator(allocator, **kwargs)[ソース]#

Allocate the proposal id explicitly from an existing allocator.

パラメータ:
  • allocator (IDAllocator)

  • kwargs (Any)

戻り値の型:

ProposalBatch

ProposalBatch.take(indices)[ソース]#

Take the same candidate rows and relation rows together.

パラメータ:

indices (Any)

戻り値の型:

ProposalBatch