-
Notifications
You must be signed in to change notification settings - Fork 1
/
form_table.py
61 lines (30 loc) · 1.48 KB
/
form_table.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 7 23:00:39 2021
@author: Sameitos
"""
from ..utils.imp_split_form import _classif_form_table, _rgr_form_table, multiform_table
def form_table(scores, learning_method = 'classif',path = 'score_path.csv'):
'''
Description:
This function saves performance results to a .csv file.
Parameters:
scores: A dictionary that includes set and their scores
learning_method: {'classif,'rgr}, default = 'classif', Type of
learnign method classification or regression
path: default = 'score_path.csv', A destination where scores are
saved. It must be .csv file.
'''
form_methods = {'classif':_classif_form_table,'rgr':_rgr_form_table}
form_methods[learning_method](scores = scores, score_path = path)
def multiple_form_table(score_dict, score_path = 'score_path.csv'):
'''
Description:
This function is automatically forming score table
by multiple input. No suitable for single input.
Parameters:
score_dict: A dict of scores includes results of multiple data,
score_path: 'score_path.csv', A destination where scores are
saved. It must be .csv file.
'''
multiform_table(score_dict, score_path)