khiops.core.analysis_results
Submodule of khiops.core
Classes to access Khiops JSON reports
Class Overview
Below we describe with diagrams the relationships of the classes in this modules. They are mostly compositions (has-a relations) and we omit native attributes (str, int, float, etc).
The main class of this module is AnalysisResults and it is largely a composition of sub-reports objects given by the following structure:
AnalysisResults
|- preparation_report |
|- text_preparation_report |-> PreparationReport
|- tree_preparation_report |
|- bivariate_preparation_report -> BivariatePreparationReport
|- modeling_report -> ModelingReport
|- train_evaluation_report |
|- test_evaluation_report |-> EvaluationReport
|- evaluation_report |
These sub-classes in turn use other tertiary classes to represent specific information pieces of each report. The dependencies for the classes PreparationReport and BivariatePreparationReport are:
PreparationReport
|- variables_statistics -> list of VariableStatistics
|- trees -> list of Tree (only for tree_preparation_report)
BivariatePreparationReport
|- variable_pair_statistics -> list of VariablePairStatistics
VariableStatistics
|- data_grid -> DataGrid
|- modl_histograms -> ModlHistograms
VariablePairStatistics
|- data_grid -> DataGrid
Tree
|- target_partition -> TargetPartition
|- nodes -> list of TreeNode
TargetPartition
|- partition -> list of PartInterval
DataGrid
|- dimensions -> list of DataGridDimension
ModlHistograms
|- histograms -> list of Histogram
DataGridDimension
|- partition -> list of PartInterval OR
| list of PartValue OR
| list of PartValueGroup
for class ModelingReport:
ModelingReport
|- trained_predictors -> list of TrainedPredictors
TrainedPredictor
|- selected_variables -> list of SelectedVariable
and for class EvaluationReport:
EvaluationReport
|- predictors_performance -> list of PredictorPerformance
|- classification_lift_curves -> list of PredictorCurve (classification only)
|- regression_rec_curves -> list of PredictorCurve (regression only)
PredictorPerformance
|- confusion_matrix -> ConfusionMatrix (classification only)
To have a complete illustration of the access to the information of all classes in this
module look at their to_dict methods which write Python dictionaries in the
same format as the Khiops JSON reports.
| CLASS | DESCRIPTION |
|---|---|
AnalysisResults |
Main class containing the information of a Khiops JSON file |
PreparationReport |
Univariate data preparation report: discretizations and groupings |
BivariatePreparationReport |
Bivariate data preparation report: 2D grid models |
ModelingReport |
Modeling report of all predictors created in a supervised analysis |
EvaluationReport |
Evaluation report for predictors |
VariableStatistics |
Variable information and statistics |
VariablePairStatistics |
Variable pair information and statistics |
Tree |
A decision tree feature |
TargetPartition |
Target partition details (for regression trees only) |
TreeNode |
A decision tree node |
ModlHistograms |
A histogram density estimation for numerical data |
Histogram |
A histogram |
DataGrid |
A piecewise constant probability density estimation |
DataGridDimension |
A dimension (variable) of a data grid |
PartInterval |
Element of a numerical interval partition in a data grid |
PartValue |
Element of a value partition (singletons) in a data grid |
PartValueGroup |
Element of a categorical partition in a data grid |
TrainedPredictor |
Trained predictor information |
SelectedVariable |
Information about a selected variable in a predictor |
PredictorPerformance |
A predictor's performance evaluation |
ConfusionMatrix |
A classifier's confusion matrix |
PredictorCurve |
A lift curve for a classifier or a REC curve for a regressor |
| FUNCTION | DESCRIPTION |
|---|---|
read_analysis_results_file |
Reads a Khiops JSON report |
Classes
AnalysisResults(json_data=None)
Bases: KhiopsJSONObject
Main class containing the information of a Khiops JSON file
Sub-reports not available in the JSON data are optional (set to None).
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
A dictionary representing the data of a Khiops JSON report file. If not specified it returns an empty instance. Note See also the read_analysis_results_file function to obtain an instance of this class from a Khiops JSON file.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
tool |
Name of the Khiops tool that generated the report.
TYPE:
|
version |
Version of the Khiops tool that generated the report.
TYPE:
|
short_description |
Short description defined by the user.
TYPE:
|
khiops_encoding |
Encoding of the Khiops report file.
TYPE:
|
logs |
2-tuples linking each sub-task name to a list containing the warnings and errors found during the execution of that sub-task. Available only if there were errors or warnings.
TYPE:
|
preparation_report |
A report about the variables' discretizations and groupings.
TYPE:
|
bivariate_preparation_report |
A report of the grid models created from pairs of variables. Available only when pair of variables were created in the analysis.
TYPE:
|
modeling_report |
A report describing the predictor models. Available only in supervised analysis.
TYPE:
|
train_evaluation_report |
An evaluation report of the trained models on the train dataset split. Available only in supervised analysis.
TYPE:
|
test_evaluation_report |
An evaluation report of the trained models on the test dataset split. Available only in supervised analysis and when the test split was not empty.
TYPE:
|
evaluation_report |
An EvaluationReport instance for evaluations created with an explicit evaluation (either with the api.evaluate_predictor core API function or the Evaluate Predictor feature of the Khiops desktop app). Available only when the report was generated with the aforementioned features.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
get_reports |
Returns all available sub-reports |
write_report_file |
Writes a TSV report file with the object's information |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
get_reports()
Returns all available sub-reports
| RETURNS | DESCRIPTION |
|---|---|
list
|
All available sub-reports. |
write_report_file(report_file_path)
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(stream_or_writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
stream_or_writer
|
Output stream or writer.
TYPE:
|
PreparationReport(json_data=None)
Univariate data preparation report: discretizations and groupings
The attributes related to the target variable and null model are available only in the case of a supervised learning task (classification or regression).
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
report_type |
Report type.
TYPE:
|
dictionary |
Name of the training data table dictionary.
TYPE:
|
variable_types |
The different types of variables.
TYPE:
|
variable_numbers |
Number of variables for each type. Synchronized with
TYPE:
|
database |
Path of the main training data table file.
TYPE:
|
sample_percentage |
Percentage of instances used in training.
TYPE:
|
sampling_mode |
Sampling mode used to split the train and datasets.
TYPE:
|
selection_variable |
Name of the variable used to select training instances.
TYPE:
|
selection_value |
Value of
TYPE:
|
constructed_variable_number |
Number of constructed variables.
TYPE:
|
instance_number |
Number of training instances.
TYPE:
|
learning_task |
Name of the associated learning task. Possible values: - "Classification analysis" - "Regression analysis" - "Unsupervised analysis"
TYPE:
|
target_variable |
Target variable name.
TYPE:
|
main_target_value |
Main value of a categorical target variable.
TYPE:
|
target_stats_min |
Minimum of a numerical target variable.
TYPE:
|
target_stats_max |
Maximum of a numerical target variable.
TYPE:
|
target_stats_mean |
Mean of a numerical target variable.
TYPE:
|
target_stats_std_dev |
Standard deviation of a numerical target variable.
TYPE:
|
target_stats_missing_number |
Number of missing values for a numerical or categorical target variable.
TYPE:
|
target_stats_sparse_missing_number |
Number of missing values for a sparse block of numerical or categorical target variables.
TYPE:
|
target_stats_mode |
Mode of a categorical target variable.
TYPE:
|
target_stats_mode_frequency |
Mode frequency of a categorical target variable.
TYPE:
|
target_values |
Values of a categorical target variable.
TYPE:
|
target_value_frequencies |
Frequencies for each target value. Synchronized with
TYPE:
|
evaluated_variable_number |
Number of variables analyzed.
TYPE:
|
informative_variable_number |
Supervised analysis only: Number of informative variables.
TYPE:
|
selected_variable_number |
Number of selected variables.
TYPE:
|
native_variable_number |
Number of native variables.
TYPE:
|
max_constructed_variables |
Maximum number of constructed variable specified for the analysis.
TYPE:
|
max_text_features |
Maximum number of text features specified for the analysis.
TYPE:
|
max_trees |
Maximum number of constructed trees specified for the analysis.
TYPE:
|
max_pairs |
Maximum number of constructed variables pairs specified for the analysis.
TYPE:
|
discretization |
Type of discretization method used.
TYPE:
|
value_grouping |
Type of grouping method used.
TYPE:
|
null_model_construction_cost |
Coding length of the null construction model.
TYPE:
|
null_model_preparation_cost |
Coding length of the null preparation model.
TYPE:
|
null_model_data_cost |
Coding length of the data given the null model.
TYPE:
|
variables_statistics |
Variable statistics for each variable analyzed.
TYPE:
|
trees |
Tree details for each tree built.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
get_variable_names |
Returns the names of the variables analyzed during the preparation |
get_variable_statistics |
Returns the statistics of the specified variable |
get_tree |
Returns the tree with the specified name |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
get_variable_names()
Returns the names of the variables analyzed during the preparation
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
The names of the variables analyzed during the preparation. |
get_variable_statistics(variable_name)
Returns the statistics of the specified variable
| PARAMETER | DESCRIPTION |
|---|---|
variable_name
|
Name of the variable.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
VariableStatistics
|
The statistics of the specified variable. |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If no variable with the specified names exist. |
get_tree(tree_name)
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
BivariatePreparationReport(json_data=None)
Bivariate data preparation report: 2D grid models
The attributes related to the target variable and null model are available only in the case of a supervised learning task (only classification in the bivariate case).
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
report_type |
Report type.
TYPE:
|
dictionary |
Name of the training data table dictionary.
TYPE:
|
variable_types |
The different types of variables.
TYPE:
|
variable_numbers |
The number of variables for each type in
TYPE:
|
database |
Path of the main training data table file.
TYPE:
|
sample_percentage |
Percentage of instances used in training.
TYPE:
|
sampling_mode |
Sampling mode used to split the train and datasets.
TYPE:
|
selection_variable |
Variable used to select instances for training.
TYPE:
|
selection_value |
Value of selection_variable to select instances for training.
TYPE:
|
instance_number |
Number of training instances.
TYPE:
|
learning_task |
Name of the associated learning task. Possible values: - "Classification analysis" - "Regression analysis" - "Unsupervised analysis"
TYPE:
|
target_variable |
Target variable name in supervised analysis.
TYPE:
|
main_target_value |
Main modality of the target variable in supervised case.
TYPE:
|
target_stats_mode |
Mode of a categorical target variable.
TYPE:
|
target_stats_mode_frequency |
Mode frequency of a categorical target variable.
TYPE:
|
target_values |
Values of a categorical target variable.
TYPE:
|
target_value_frequencies |
Frequencies for each value in
TYPE:
|
evaluated_pair_number |
Number of variable pairs evaluated.
TYPE:
|
selected_pair_number |
Number of variable pairs selected.
TYPE:
|
informative_pair_number |
Number of informative variable pairs. A pair is considered informative if its level is greater than the sum of its components' levels.
TYPE:
|
variable_pair_statistics |
Statistics for each analyzed pair of variables.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
get_variable_pair_names |
Returns the pairs of variable names available on this report |
get_variable_pair_statistics |
Returns the statistics of the specified pair of variables |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
get_variable_pair_names()
Returns the pairs of variable names available on this report
| RETURNS | DESCRIPTION |
|---|---|
list of tuple
|
The pair of variable names available on this report |
get_variable_pair_statistics(variable_name_1, variable_name_2)
Returns the statistics of the specified pair of variables
Note
The variable names can be given in any order.
| PARAMETER | DESCRIPTION |
|---|---|
variable_name_1
|
Name of the first variable.
TYPE:
|
variable_name_2
|
Name of the second variable.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
VariablePairStatistics
|
The statistics of the specified pair of variables. |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If no pair with the specified names exist. |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
ModelingReport(json_data=None)
Modeling report of all predictors created in a supervised analysis
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
report_type |
Report type.
TYPE:
|
dictionary |
Name of the training data table dictionary.
TYPE:
|
database |
Path of the main training data table file.
TYPE:
|
sample_percentage |
Percentage of instances used in training.
TYPE:
|
sampling_mode |
Sampling mode used to split the train and datasets.
TYPE:
|
selection_variable |
Variable used to select instances for training.
TYPE:
|
selection_value |
Value of
TYPE:
|
learning_task |
Name of the associated learning task.
TYPE:
|
target_variable |
Name of the target variable.
TYPE:
|
main_target_value |
Main value of the target variable.
TYPE:
|
trained_predictors |
The predictors trained in the task.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
get_predictor |
Returns the specified predictor |
get_snb_predictor |
Returns the Selective Naive Bayes predictor |
get_predictor_names |
Returns the names of the available predictor reports |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
get_predictor(predictor_name)
Returns the specified predictor
| PARAMETER | DESCRIPTION |
|---|---|
predictor_name
|
Name of the predictor.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TrainedPredictor
|
The predictor object for the specified name. |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If there is no predictor with the specified name. |
get_snb_predictor()
Returns the Selective Naive Bayes predictor
| RETURNS | DESCRIPTION |
|---|---|
TrainedPredictor
|
The predictor object for "Selective Naive Bayes". |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If there is no predictor named "Selective Naive Bayes". |
get_predictor_names()
Returns the names of the available predictor reports
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
The names of the available predictor reports. |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
EvaluationReport(json_data=None)
Evaluation report for predictors
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the fields:
- The first two fields are set when doing a supervised analysis: either with the "Train Model" feature of the Khiops app or the api.train_predictor function of the Khiops Python core API. The third field is set when doing an explicit evaluation: either with the Evaluate Predictor feature of the Khiops app or the api.evaluate_predictor function of the Khiops Python core API. If not specified it returns an empty instance.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
report_type |
Report type.
TYPE:
|
evaluation_type |
Evaluation type. The value "" is set when the evaluation was explicit.
TYPE:
|
dictionary |
Name of the training data table dictionary.
TYPE:
|
database |
Path of the main training data table file.
TYPE:
|
sample_percentage |
Percentage of instances used in training.
TYPE:
|
sampling_mode |
Sampling mode used to split the train and datasets.
TYPE:
|
selection_variable |
Variable used to select instances for training.
TYPE:
|
selection_value |
Value of selection_variable to select instances for training.
TYPE:
|
instance_number |
Number of training instances.
TYPE:
|
learning_task |
Type of learning task.
TYPE:
|
target_variable |
Name of the target variable.
TYPE:
|
main_target_value |
Main value of the target variable.
TYPE:
|
predictors_performance |
Performance metrics for each predictor.
TYPE:
|
regression_rec_curves |
REC curves for each regressor.
TYPE:
|
classification_target_values |
Target variable values for which a classifier lift curve was evaluated.
TYPE:
|
classification_lift_curves |
Lift curves for each target value in
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
get_predictor_names |
Returns the names of the available predictors in the report |
get_predictor_performance |
Returns the performance metrics for the specified predictor |
get_snb_performance |
Returns the performance metrics for the Selective Naive Bayes predictor |
get_regressor_rec_curve |
Returns the REC curve for the specified regressor |
get_snb_rec_curve |
Returns the REC curve for the Selective Naive Bayes regressor |
get_classifier_lift_curve |
Returns the lift curve for the specified classifier and target value |
get_snb_lift_curve |
Returns lift curve for the Selective Naive Bayes clf. given a target value |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
get_predictor_names()
Returns the names of the available predictors in the report
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
The names of the available predictors. |
get_predictor_performance(predictor_name)
Returns the performance metrics for the specified predictor
| PARAMETER | DESCRIPTION |
|---|---|
predictor_name
|
A predictor name.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PredictorPerformance
|
The performance metrics for the specified predictor. |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If no predictor with the specified name exists. |
get_snb_performance()
Returns the performance metrics for the Selective Naive Bayes predictor
| RETURNS | DESCRIPTION |
|---|---|
PredictorPerformance
|
The performance metrics for the Selective Naive Bayes predictor. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the Selective Naive Bayes information is not available in the report. |
get_regressor_rec_curve(regressor_name)
Returns the REC curve for the specified regressor
| PARAMETER | DESCRIPTION |
|---|---|
regressor_name
|
Name of a regressor.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PredictorCurve
|
The REC curve for the specified regressor. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If no regressor curves available. ( |
KeyError
|
If no regressor with the specified name exists. |
get_snb_rec_curve()
Returns the REC curve for the Selective Naive Bayes regressor
| RETURNS | DESCRIPTION |
|---|---|
PredictorCurve
|
The REC curve for the Selective Naive Bayes regressor. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the Selective Naive Bayes information is not available in the report. |
get_classifier_lift_curve(classifier_name, target_value)
Returns the lift curve for the specified classifier and target value
| PARAMETER | DESCRIPTION |
|---|---|
classifier_name
|
A name of a classifier.
TYPE:
|
target_value
|
A specific value of the target variable.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PredictorCurve
|
The lift curve for the specified classifier and target value. |
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If no classifier with the specified exists or no target value with the specified name exists. |
get_snb_lift_curve(target_value)
Returns lift curve for the Selective Naive Bayes clf. given a target value
| PARAMETER | DESCRIPTION |
|---|---|
target_value
|
A specific value of the target variable.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PredictorCurve
|
The lift curve of the Selective Naive Bayes classifier for the specified target value. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the Selective Naive Bayes classifier information is not available. |
KeyError
|
If no target value with the specified name exists. |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer object.
TYPE:
|
VariableStatistics(json_data=None)
Variable information and statistics
Note
The statistics in this class are for both numerical and categorical data.
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the list found at the
Note The
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
rank |
Variable rank with respect to its level. Lower Rank = Higher Level.
TYPE:
|
name |
Variable name.
TYPE:
|
type |
Variable type. There are only two valid values for a prepared variable : - "Numerical" - "Categorical"
TYPE:
|
level |
Variable predictive importance.
TYPE:
|
target_part_number |
TYPE:
|
part_number |
Number of parts of the variable partition.
TYPE:
|
value_number |
Number of distinct values of the variable.
TYPE:
|
min |
Minimum value of the variable.
TYPE:
|
max |
Maximum value of the variable.
TYPE:
|
mean |
Mean value of the variable.
TYPE:
|
std_dev |
Standard deviation of the variable.
TYPE:
|
missing_number |
Number of missing values of the variable.
TYPE:
|
sparse_missing_number |
Number of sparse missing values of the variable.
TYPE:
|
mode |
Most common value.
TYPE:
|
mode_frequency |
Frequency of the most common value.
TYPE:
|
input_values |
Different values taken by the variable. If there are too many values only the more frequent will be available.
TYPE:
|
input_value_frequencies |
The frequencies for each input value. Synchronized with
TYPE:
|
construction_cost |
Construction cost of the variable. More complex variables cost more.
TYPE:
|
preparation_cost |
Partition model cost. More complex partitions cost more.
TYPE:
|
data_cost |
Negative log-likelihood of the variable given a preparation model and a construction model.
TYPE:
|
derivation_rule |
If the variable is not native it is Khiops dictionary function to derive it.
Otherwise is set to
TYPE:
|
data_grid |
A density estimation of the partitioned variable with respect to the target.
TYPE:
|
modl_histograms |
MODL optimal histograms for for numerical variables. Only for unsupervised analysis.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
init_details |
Initializes the details' attributes from a Python JSON object |
is_detailed |
Returns True if the report contains any detailed information |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_header_line |
Writes the header line of a TSV report into a writer object |
write_report_line |
Writes a line of the TSV report into a writer object |
write_report_details |
Writes the details' attributes into a writer object |
Methods:
init_details(json_data=None)
Initializes the details' attributes from a Python JSON object
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the list found at the
TYPE:
|
is_detailed()
Returns True if the report contains any detailed information
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the report contains any detailed information. |
to_dict(details=False)
Transforms this instance to a dict with the Khiops JSON file structure
write_report_header_line(writer)
Writes the header line of a TSV report into a writer object
The header is the same for all variable types.
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_details(writer)
Writes the details' attributes into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
VariablePairStatistics(json_data=None)
Variable pair information and statistics
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the list found at the Note The
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
rank |
Variable rank with respect to its level. Lower Rank = Higher Level.
TYPE:
|
name1 |
Name of the pair's first variable.
TYPE:
|
name2 |
Name of the pair's second variable.
TYPE:
|
level |
Predictive importance of the pair.
TYPE:
|
level1 |
Predictive importance of the first variable.
TYPE:
|
level2 |
Predictive importance of the second variable.
TYPE:
|
delta_level |
Difference between the pair's level and the sum of those of its components
(
TYPE:
|
variable_number |
Number of active variables in the pair: - 0 means that there is no information in any of the variables - 1 means that the pair information reduces to that of any of its components - 2 means that the two variables are jointly informative
TYPE:
|
part_number1 |
Number of parts of the first variable partition.
TYPE:
|
part_number2 |
Number of parts of the second variable partition.
TYPE:
|
cell_number |
Number of cells generated of the pair grid.
TYPE:
|
construction_cost |
Advanced: Construction cost of the variable. More complex variables cost more.
TYPE:
|
preparation_cost |
Advanced: Partition model cost. More complex partitions cost more.
TYPE:
|
data_cost |
Advanced: Negative log-likelihood of the variable given a preparation model and a construction model.
TYPE:
|
data_grid |
A density estimation of the partitioned pair of variable with respect to the target.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
init_details |
Initializes the details' attributes from a Python JSON object |
is_detailed |
Returns True if the report contains any detailed information |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_header_line |
Writes the header line of a TSV report into a writer object |
write_report_line |
Writes a line of the TSV report into a writer object |
write_report_details |
Writes the details' attributes into a writer object |
Methods:
init_details(json_data=None)
Initializes the details' attributes from a Python JSON object
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the list found at
the
TYPE:
|
is_detailed()
Returns True if the report contains any detailed information
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the report contains any detailed information. |
to_dict(details=False)
Transforms this instance to a dict with the Khiops JSON file structure
write_report_header_line(writer)
Writes the header line of a TSV report into a writer object
The header is the same for all variable types.
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_details(writer)
Writes the details' attributes into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
Tree(json_data=None)
A decision tree feature
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of a value associated to the rank key in the object found at the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Name of the tree.
TYPE:
|
variable_number |
Number of variables in the tree.
TYPE:
|
depth |
Depth of the tree.
TYPE:
|
target_partition |
Summary of the target partition. For regression only.
TYPE:
|
nodes |
Nodes of the tree.
TYPE:
|
"See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
TargetPartition(json_data=None)
Target partition details (for regression trees only)
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
variable |
Variable name.
TYPE:
|
type |
Variable type.
TYPE:
|
partition_type |
Partition type.
TYPE:
|
partition |
The dimension parts. The list objects are of type PartInterval, as
TYPE:
|
frequencies |
Frequencies of the intervals in the target partition.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
TreeNode(json_data=None, parent_id=None)
A decision tree node
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of either:
If not specified it returns an empty instance
TYPE:
|
parent_id
|
Identifier of the parent
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
Identifier of the
TYPE:
|
parent_id |
Value of the
TYPE:
|
variable |
Name of the tree variable.
TYPE:
|
type |
Khiops type of the tree variable.
TYPE:
|
partition |
The tree variable partition.
TYPE:
|
default_group_index |
The index of the default variable group.
TYPE:
|
target_values |
Values of a categorical tree target variable.
TYPE:
|
target_value_frequencies |
Frequencies of each tree target value. Synchronized with
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
ModlHistograms(json_data=None)
A histogram density estimation for numerical data
A MODL histogram is a regularized piecewise-constant estimation of the probability density for numerical data. It has various refinement levels to ease exploratory analysis tasks.
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data at a
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
histogram_number |
Number of available histograms.
TYPE:
|
interpretable_histogram_number |
Number of interpretable histograms. Can be equal to either
TYPE:
|
truncation_epsilon |
Truncation epsilon used by the truncation heuristic implemented in Khiops. Equals 0 if no truncation is detected in the input data.
TYPE:
|
removed_singular_interval_number |
Number of singular intervals removed from the finest-grained histogram to obtain the first interpretable histogram.
TYPE:
|
granularities |
Histogram granularities, sorted in increasing order.
Synchronized with
TYPE:
|
interval_numbers |
Histogram interval numbers, sorted in increasing order.
Synchronized with
TYPE:
|
peak_interval_numbers |
Histogram peak interval numbers, sorted in increasing order.
Synchronized with
TYPE:
|
spike_interval_numbers |
Histogram spike interval numbers, sorted in increasing order.
Synchronized with
TYPE:
|
empty_interval_numbers |
Histogram empty interval numbers, sorted in increasing order.
Synchronized with
TYPE:
|
levels |
List of histogram levels, sorted in increasing order.
Synchronized with
TYPE:
|
information_rates |
Histogram information rates, sorted in increasing order. Between 0 and
100 for interpretable histograms.
Synchronized with
TYPE:
|
histograms |
The MODL histograms.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
Histogram(json_data=None)
A histogram
Represents one of the refinement levels of a ModlHistograms object.
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element at the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
bounds |
Interval bounds.
TYPE:
|
frequencies |
Interval frequencies.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
DataGrid(json_data=None)
A piecewise constant probability density estimation
A data grid represents one or many variables referred to as "dimensions" to differentiate them from the original data variables. Each dimension can be partitioned by:
- Intervals for numerical variables
- Values (singletons) / Value groups for categorical variables
The Cartesian product of the unidimensional partitions provides a multivariate partition of cells whose frequencies allow to estimate the multivariate probability density.
In the univariate case, the data grid is simply an histogram. In the case of multiple variables, the data grid may be supervised or not. If supervised, the target variable is the last one, and the data grid represents the conditional density estimator of the source variable with respect to the target. Otherwise, it represents a joint density estimator.
In case of an unsupervised data grid, the cells are described by their index on the variable partitions, together with their frequencies. For a supervised data grid, the cells are described by their index on the input variables partitions, and a vector of target frequencies is associated to each cell.
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data at a
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
is_supervised |
TYPE:
|
dimensions |
The dimensions of the data grid.
TYPE:
|
frequencies |
Unsupervised only: Frequencies for each part.
TYPE:
|
part_interests |
Supervised univariate only: Prediction interests for each part of the input
dimension. Synchronized with
TYPE:
|
part_target_frequencies |
Supervised univariate only: List of frequencies per target value for each part
of the input dimension. Synchronized with
TYPE:
|
cell_ids |
Multivariate only: Unique identifiers of the grid's cells.
TYPE:
|
cell_part_indexes |
Multivariate only: List of dimension indexes defining each cell. Synchronized
with
TYPE:
|
cell_frequencies |
Unsupervised multivariate only: Frequencies for each cell. Synchronized with
TYPE:
|
cell_target_frequencies |
Supervised multivariate only: List of frequencies per target value for each
cell. Synchronized with
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
DataGridDimension(json_data=None)
A dimension (variable) of a data grid
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element at the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
variable |
Variable name
TYPE:
|
type |
Variable type.
TYPE:
|
partition_type |
Partition type.
TYPE:
|
partition |
The dimension parts. The list objects are of type:
- PartInterval: If
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
PartInterval(json_data=None)
Element of a numerical interval partition in a data grid
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
lower_bound |
The lower bound of the interval.
TYPE:
|
upper_bound |
The upper bound of the interval.
TYPE:
|
is_missing |
True if it is the missing values part (bounds are
TYPE:
|
is_left_open |
True if the interval has no minimum.
TYPE:
|
is_right_open |
True if the interval has no maximum.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
__str__ |
Returns a human readable string representation |
part_type |
Type of this part |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_line |
Writes a line of the TSV report into a writer object |
Methods:
__str__()
Returns a human readable string representation
part_type()
Type of this part
| RETURNS | DESCRIPTION |
|---|---|
str
|
Only possible value: "Interval". |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
PartValue(json_data=None)
Element of a value partition (singletons) in a data grid
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
The value contained in this singleton part. If not specified it returns an empty object.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
value |
A representation of the value defining the singleton.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
__str__ |
Returns a readable string representation |
part_type |
Type of the instance |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_line |
Writes a line of the TSV report into a writer object |
Methods:
__str__()
Returns a readable string representation
part_type()
Type of the instance
| RETURNS | DESCRIPTION |
|---|---|
str
|
Only possible value: "Value". |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
PartValueGroup(json_data=None)
Element of a categorical partition in a data grid
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
The list of values of the group. If not specified it returns an empty instance.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
values |
The group's values.
TYPE:
|
is_default_part |
True if this part is dedicated to all unknown values.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
__str__ |
Returns a human readable string representation |
part_type |
Type of the instance |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_line |
Writes a line of the TSV report into a writer object |
Methods:
__str__()
Returns a human readable string representation
part_type()
Type of the instance
| RETURNS | DESCRIPTION |
|---|---|
str
|
Only possible value: "Value group". |
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
TrainedPredictor(json_data=None)
Trained predictor information
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the list found at the Note The
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
family |
Predictor family name. Valid values are found in the
TYPE:
|
type |
Predictor type. Valid values are found in the
TYPE:
|
name |
Human readable predictor name.
TYPE:
|
variable_number |
Number of variables used by the predictor.
TYPE:
|
selected_variables |
Variables used by the predictor. Only for type "Selective Naive Bayes".
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
init_details |
Initializes the details' attributes from a Python JSON object |
is_detailed |
Returns True if the report contains any detailed information |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_header_line |
Writes the header line of a TSV report into a writer object |
write_report_line |
Writes a line of the TSV report into a writer object |
write_report_details |
Writes the details of the TSV report into a writer object |
Methods:
init_details(json_data=None)
Initializes the details' attributes from a Python JSON object
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the dictionary found at the
TYPE:
|
is_detailed()
Returns True if the report contains any detailed information
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the report contains any detailed information. |
to_dict(details=False)
Transforms this instance to a dict with the Khiops JSON file structure
write_report_header_line(writer)
Writes the header line of a TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
The header is the same for all variable types.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_details(writer)
Writes the details of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
SelectedVariable(json_data=None)
Information about a selected variable in a predictor
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data representing an element of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Human readable variable name.
TYPE:
|
prepared_name |
Internal variable name.
TYPE:
|
level |
Variable level.
TYPE:
|
weight |
Variable weight in the model.
TYPE:
|
importance |
A measure of overall importance of the variable in the model. It is the geometric mean of the level and weight.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_header_line |
Writes the header line of a TSV report into a writer object |
write_report_line |
Writes a line of the TSV report into a writer object |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report_header_line(writer)
Writes the header line of a TSV report into a writer object
The header is the same for all variable types.
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
PredictorPerformance(json_data=None)
A predictor's performance evaluation
This class describes the performance of a predictor (classifier or regressor).
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the dictionary found at the Note The
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
rank |
An string index representing the order in the report.
TYPE:
|
type |
Type of the predictor.
TYPE:
|
name |
Human readable name.
TYPE:
|
data_grid |
Data grid representing the distribution of the target values per part of the descriptive variable in the evaluated dataset.
TYPE:
|
accuracy |
Classifier only: Accuracy.
TYPE:
|
compression |
Classifier only: Compression rate.
TYPE:
|
auc |
Classifier only: Area under the ROC curve.
TYPE:
|
confusion_matrix |
Classifier only: Confusion matrix.
TYPE:
|
rmse |
Regressor only: Root mean square error.
TYPE:
|
mae |
Regressor only: Mean absolute error.
TYPE:
|
nlpd |
Regressor only: Negative log predictive density.
TYPE:
|
rank_rmse |
Regressor only: Root mean square error on the target's value rank.
TYPE:
|
rank_mae |
Regressor only: Mean absolute error on the target's value rank.
TYPE:
|
rank_nlpd |
Regressor only: Negative log predictive density on the target's value rank.
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
init_details |
Initializes the details' attributes from a python JSON object |
is_detailed |
Returns True if the report contains any detailed information |
get_metric_names |
Returns the available univariate metrics |
get_metric |
Returns the value of the specified metric |
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report_header_line |
Writes the header line of a TSV report into a writer object |
write_report_line |
Writes a line of the TSV report into a writer object |
write_report_details |
Writes the details of the TSV report into a writer object |
Methods:
init_details(json_data=None)
Initializes the details' attributes from a python JSON object
is_detailed()
Returns True if the report contains any detailed information
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the report contains any detailed information. |
get_metric_names()
Returns the available univariate metrics
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
The names of the available metrics. |
get_metric(metric_name)
Returns the value of the specified metric
Note
The available metrics is available via the method get_metric_names.
| PARAMETER | DESCRIPTION |
|---|---|
metric_name
|
A metric name (case insensitive).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
The value of the specified metric. |
to_dict(details=False)
Transforms this instance to a dict with the Khiops JSON file structure
write_report_header_line(writer)
Writes the header line of a TSV report into a writer object
The header is the same for all variable types.
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_line(writer)
Writes a line of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
write_report_details(writer)
Writes the details of the TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
ConfusionMatrix(json_data=None)
A classifier's confusion matrix
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
values |
Values of the target variable.
TYPE:
|
matrix |
Matrix of predicted frequencies vs target frequencies. This list is synchornized
with
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
to_dict |
Transforms this instance to a dict with the Khiops JSON file structure |
write_report |
Writes the instance's TSV report into a writer object |
Methods:
to_dict()
Transforms this instance to a dict with the Khiops JSON file structure
write_report(writer)
Writes the instance's TSV report into a writer object
Warning
This method is deprecated since Khiops 11.0.0 and will be removed in Khiops 12. Use the to_dict method instead.
| PARAMETER | DESCRIPTION |
|---|---|
writer
|
Output writer.
TYPE:
|
PredictorCurve(json_data=None)
A lift curve for a classifier or a REC curve for a regressor
| PARAMETER | DESCRIPTION |
|---|---|
json_data
|
JSON data of an element of the
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
type |
Type of predictor curve.
TYPE:
|
name |
Name of evaluated predictor.
TYPE:
|
values |
The curve's y-axis values.
TYPE:
|
See class docstring
Methods:
Functions:
read_analysis_results_file(json_file_path)
Reads a Khiops JSON report
| PARAMETER | DESCRIPTION |
|---|---|
json_file_path
|
Path of the JSON report file.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AnalysisResults
|
An instance of AnalysisResults containing the report's information. |
Examples:
See the following functions of the samples.py documentation script:
- samples.access_predictor_evaluation_report()
- samples.train_predictor_with_cross_validation()
- samples.multiple_train_predictor()