classification report to excel
import pandas as pd
def classification_report_csv(report):
report_data = []
lines = report.split('\n')
for line in lines[2:-3]:
row = {}
row_data = line.split(' ')
row['class'] = row_data[0]
row['precision'] = float(row_data[1])
row['recall'] = float(row_data[2])
row['f1_score'] = float(row_data[3])
row['support'] = float(row_data[4])
report_data.append(row)
dataframe = pd.DataFrame.from_dict(report_data)
dataframe.to_csv('classification_report.csv', index = False)
report = classification_report(y_true, y_pred)
classification_report_csv(report)
Also in C:
- how to open a website in c
- slurm array job
- C bitwise integer absolute value
- read a binary file c
- Route::resource
- jframe mittig positionieren
- excel cell blank or zero
- 233 pounds to inr
- print integer to stdout using write or putchar?
- pygame detect click
- even odd numer c
- ModuleNotFoundError: No module named 'cv2'
- donut c code
- classification report to excel
- plt legend top right outside
- como hacer para que una salida en linux aparezca de poco en poco
- c program to find number of days in a month using switch case
- allocating memory for 1Mb text file in C
- strcpy c implementation
- cv2.solvepnpransac too many values to unpack
- es par
- 4k stogram chave
- how to ascii art in c
- how to check where the last char is in a string c