tgan.research.evaluation module¶
This module contains functions to evaluate the training results.
-
tgan.research.evaluation.
evaluate_classification
(train_data, test_data, continuous_cols, classifier=DecisionTreeClassifier(ccp_alpha=0.0, class_weight=None, criterion='gini', max_depth=20, max_features=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, min_samples_leaf=1, min_samples_split=2, min_weight_fraction_leaf=0.0, presort='deprecated', random_state=None, splitter='best'), metric=<function accuracy_score>)[source]¶ Score a model with the given data.
- Parameters
train_csv (pandas.DataFrame) – Path to the train csv file.
test_csv (pandas.DataFrame) – Path to the test csv file.
continous_cols (list[str]) – List of labels of continous columns.
classifier (object) – Classifier to evaluate the classification. It have to implement
fit()
andpredict()
methods.metric (callable) – Metric to score the classifier results.
- Returns
score for the given data, classifier and metric.
- Return type
float