20 lines
518 B
Python
20 lines
518 B
Python
from pprint import pprint
|
|
import json
|
|
from pathlib import Path
|
|
from main import RunResults, Iteration
|
|
|
|
|
|
def main():
|
|
for json_file in Path('.').glob('*.json'):
|
|
with open(json_file, mode='r') as file:
|
|
content = json.load(file)
|
|
|
|
k = content['k']
|
|
wss = content['iterations'][-1]['wss']
|
|
delta = content['iterations'][-1]['cent_move_delta']
|
|
print(f"{k}, {wss:.2f}, {delta:.2f}, {len(content['iterations'])}")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|