SimpleTournamentResults
- class negmas.tournaments.SimpleTournamentResults(scores, details, scores_summary, final_scores, path=None)[source]
Bases:
object
Attributes Summary
All negotiation results
A list of negotiators and their final scores sorted from highest (winner) to lowest score
Location at which the logs are stored
All scores per negotiator
All score statistics summarized per type
Methods Summary
combine
(paths[, recursive, recalc_details, ...])Combines the results of multiple tournaments stored on disk
from_records
([scores, results, type_scores, ...])Creates SimpleTournamentResults from records of results
from_result_records
(path[, verbosity, ...])- rtype:
load
(path[, must_have_details])Loads results from the given path
save
(path[, exist_ok])Save all results to the given path
Attributes Documentation
-
details:
DataFrame
All negotiation results
-
final_scores:
DataFrame
A list of negotiators and their final scores sorted from highest (winner) to lowest score
-
scores:
DataFrame
All scores per negotiator
-
scores_summary:
DataFrame
All score statistics summarized per type
Methods Documentation
- classmethod combine(paths, recursive=True, recalc_details=True, recalc_scores=False, must_have_details=False, verbosity=1, final_score_stat=('advantage', 'mean'), add_tournament_column=True)[source]
Combines the results of multiple tournaments stored on disk
- Parameters:
paths (
Union
[Path
,Iterable
[Path
]]) – Paths to look for results withinrecursive (
bool
) – Check children of given paths recursivelyrecalc_details (
bool
) – Recalculate detailed results from thenegotiations
folderrecalc_scores (
bool
) – Recalculate scores from detailed negotiation resultsmust_have_details (
bool
) – Raise an exception if detailed negotiation results cannot be foundverbosity (
int
) – Verbosity levelfinal_score_stat (
tuple
[str
,str
]) – Used to calculate the final scores. Seecartesian_tournament
for details.add_tournament_column (
bool
) – Add a column called tournament with tournament name in detailed and scores.
- Raises:
FileNotFoundError – If a needed file is not found
- Return type:
- Returns:
A newly constructed SimpleTournamentResults with the combined results of all tournaments
- classmethod from_records(scores=None, results=None, type_scores=None, final_scores=None, final_score_stat=('advantage', 'mean'), path=None)[source]
Creates SimpleTournamentResults from records of results
- Parameters:
scores (
list
[dict
[str
,Any
]] |DataFrame
|None
) – The scores of negotiators in all negotiations (If not given,results
can be used to calculate it).results (
list
[dict
[str
,Any
]] |DataFrame
|None
) – Results of all negotiations (If not given, the resulting SimpleTournamentResults object will lack details)type_scores (
DataFrame
|None
) – Optionally, type-scores. If not given, it will be calculated from scoresfinal_scores (
DataFrame
|None
) – Optionally, final scores. If not given,final_scoer_stat
will be used to calculate themfinal_score_stat (
tuple
[str
,str
]) – A tuple of the measure used and the statistic applied to it for calculating final score. Seecartesian_tournament
for more detailspath (
Path
|None
) – The path in which the data for this tournament is stored.
- Raises:
ValueError – If no scores or results are given
- Return type:
- Returns:
A new SimpleTournamentResults with the given data
- classmethod from_result_records(path, verbosity=1, final_score_stat=('advantage', 'mean'))[source]
- Return type: