CN111797995B - Method and device for generating interpretation report of model prediction sample - Google Patents

Method and device for generating interpretation report of model prediction sample Download PDF

Info

Publication number
CN111797995B
CN111797995B CN202010603448.8A CN202010603448A CN111797995B CN 111797995 B CN111797995 B CN 111797995B CN 202010603448 A CN202010603448 A CN 202010603448A CN 111797995 B CN111797995 B CN 111797995B
Authority
CN
China
Prior art keywords
features
sample
feature
preset
slots
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010603448.8A
Other languages
Chinese (zh)
Other versions
CN111797995A (en
Inventor
郑佳尔
梁大卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
4Paradigm Beijing Technology Co Ltd
Original Assignee
4Paradigm Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 4Paradigm Beijing Technology Co Ltd filed Critical 4Paradigm Beijing Technology Co Ltd
Priority to CN202010603448.8A priority Critical patent/CN111797995B/en
Publication of CN111797995A publication Critical patent/CN111797995A/en
Application granted granted Critical
Publication of CN111797995B publication Critical patent/CN111797995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2431Multiple classes

Abstract

The invention discloses a method and a device for generating an interpretation report of a model prediction sample, which relate to the technical field of data analysis and mainly aim at generating the interpretation report corresponding to different input samples of a model while outputting a prediction result. The main technical scheme of the invention is as follows: initializing a feature set of a sample, wherein features of the sample in the feature set are classified into a plurality of categories; traversing the features contained in a sample predicted by using a machine learning model, and adding at least part of the traversed features into each category in the feature set according to the category to which the traversed features belong; respectively obtaining text description information corresponding to the sample according to preset description specifications for each category of features in the feature set; an interpretation report of the sample is generated based on the obtained text description information.

Description

Method and device for generating interpretation report of model prediction sample
Technical Field
The invention relates to the technical field of data analysis, in particular to a method and a device for generating an interpretation report of a model prediction sample.
Background
With the development and popularization of internet technology, big data machine learning and deep data mining technologies have gradually become main tools for modeling, and common machine learning algorithms include decision trees (decision trees), random forests (random forest), gradient props (Gradient Boosting Machine, GBM), support vector machines (Support Vector Machine, SVM), neural networks (neural networks), and the like. The machine learning model can explain complex multidimensional relation, has strong prediction capability, and can achieve good prediction performance result on training data. However, for the logical relationships inside the machine learning model, the existing machine learning model cannot give an effective explanation, that is, for an input data, the machine learning model can output a predicted result relatively accurately, but cannot give a specific reason for obtaining the result. In the actual scenario where the machine learning model is applied, the feature vector dimension that the model needs to analyze is often thousands or even tens of thousands. Among such a large number of features, it is possible that the prediction results obtained after the analysis of the machine learning model are approximately even the same, and the existing machine learning model cannot meet the user requirements for users who need to further understand what important features affect the prediction results.
Disclosure of Invention
In view of the above problems, the present invention provides a method and apparatus for generating an interpretation report of a model prediction sample, and is mainly aimed at generating an interpretation report corresponding to different input samples of a model while outputting a prediction result.
In order to achieve the above purpose, the present invention mainly provides the following technical solutions:
in one aspect, the present invention provides a method for generating an interpretation report of a model prediction sample, which specifically includes:
initializing a feature set of a sample, wherein features of the sample in the feature set are classified into a plurality of categories;
traversing the features contained in a sample predicted by using a machine learning model, and adding at least part of the traversed features into each category in the feature set according to the category to which the traversed features belong;
respectively obtaining text description information corresponding to the sample according to preset description specifications for each category of features in the feature set;
an interpretation report of the sample is generated based on the obtained text description information.
On the other hand, the invention provides a device for generating an interpretation report of a model prediction sample, which specifically comprises the following steps:
an initializing unit, configured to initialize a feature set of a sample, where features of the sample in the feature set are classified into a plurality of categories;
the classifying unit is used for traversing the characteristics contained in a sample predicted by the machine learning model, and adding at least part of the traversed characteristics into each category in the characteristic set obtained by the initializing unit according to the category to which the traversed characteristics belong;
the translation unit is used for respectively obtaining text description information corresponding to the sample according to preset description specifications for the characteristics of each category in the characteristic set of the classification unit;
and the generation unit is used for generating an interpretation report of the sample based on the text description information obtained by the translation unit.
In another aspect, the present invention provides a storage medium, where the storage medium is used for storing a computer program, where the computer program controls, when running, a device where the storage medium is located to execute the method for generating the interpretation report of the model prediction sample.
In another aspect, the present invention provides a processor, where the processor is configured to run a program, and the program executes the method for generating an interpretation report of model prediction samples as described above.
By means of the technical scheme, when a certain sample is predicted, the prediction result of the model can be output, and meanwhile, classification and screening can be carried out according to the characteristics applied by the model in the prediction process, and the characteristics with large influence on the prediction result can be translated, so that the interpretation report for the prediction result of the sample is generated. The analysis report can enable an analyst to know the main characteristics affecting the sample prediction result, so that the analysis logic of the prediction result can be understood more accurately, and the analysis requirements of the analyst on the model prediction result are met.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for generating an interpretation report of model prediction samples according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for generating an interpretation report of another model predictive sample in accordance with an embodiment of the invention;
FIG. 3 is a block diagram showing the construction of an interpretation report generation apparatus for model prediction samples according to an embodiment of the present invention;
fig. 4 shows a block diagram of an interpretation report generating apparatus of another model prediction sample according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a method for generating an interpretation report of a model prediction sample, which is applied to the process of predicting the sample by using a machine learning model, and is used for generating the interpretation report for the prediction result of the sample so as to help an analyst to further understand the prediction result of the model. The specific steps of the method are shown in fig. 1, and the method comprises the following steps:
step 101, initializing a feature set of a sample.
Wherein the features of the samples in the feature set are divided into a plurality of categories, and different samples can correspond to a plurality of different categories. Therefore, the feature set is set according to the application field and the actual scene of the sample, that is, when a certain sample is processed, the feature set corresponding to the sample can be determined according to the information of the sample, such as the sample category, by initialization, that is, the category type of the feature in the sample, such as the attribute type feature, the behavior type feature, and the like, can be determined.
Step 102, traversing the features contained in a sample predicted by using the machine learning model, and adding at least part of the traversed features into each category in the feature set according to the category.
Currently, the features contained in a sample refer to specific data describing the sample from different dimensions, and a common sample may contain hundreds or thousands of features of different dimensions. The machine learning model analyzes and calculates the characteristics through a specific machine learning algorithm and outputs a corresponding prediction result. In this process, different machine learning algorithms have different processing manners when processing sample features, for example, a decision tree is used for analyzing different features according to its decision path, and a neural network algorithm is used for analyzing all features, so that the machine learning model in this step mainly refers to a machine learning algorithm with feature selection when analyzing sample features, and thus, it is necessary to analyze which features have a larger influence on the prediction result.
In this step, the screening methods of the sample features are different due to the different machine learning algorithms applied by the different models. Therefore, at least part of the features are added to each category in the feature set according to the category, specifically, in the model prediction process, the features applied by the model are acquired, the categories of the features are identified, and the features are divided into corresponding categories.
And step 103, respectively obtaining text description information of the corresponding sample according to the preset description specification for the characteristics of each category in the characteristic set.
This step is a process of translating the feature obtained in the previous step according to the category to which it belongs. The preset description specification can be understood as a translated preset strategy, different categories have different description specifications, and meanwhile, the preset description specification also has a function of combining approximate features in the same category, so that the display of the approximate features is reduced, and the analysis personnel can conveniently view and understand the approximate features.
Through the processing of this step, one or more features represented by text description information are obtained in different categories of feature sets.
Step 104, generating an interpretation report of the sample based on the obtained text description information.
The text description information is processed according to a preset format to generate an interpretation report of the corresponding sample, for example, the interpretation report is displayed in sequence according to the influence degree of the characteristics on the prediction result, so that an analyst can quickly understand the content of the interpretation report.
As can be seen from the steps in the embodiment shown in FIG. 1, the method for generating the interpretation report of the model prediction sample provided by the embodiment of the invention is to firstly set a plurality of categories for the characteristics of a plurality of dimensions of the sample, then to screen and classify the characteristics applied to the model in the prediction process, and then to translate and combine the characteristics according to the categories, so as to obtain text description information for the sample, wherein the text description information is from different categories, and finally the text description information is visually output and displayed in the form of the interpretation report, so as to facilitate the reading of analysts and the further understanding of the prediction result.
Further, as can be seen from the embodiment shown in fig. 1, the important steps for obtaining the interpretation report in the present invention are the translation of the features and the merging of the features in the same category, i.e. step 103 shown in fig. 1, so that the embodiment of the present invention obtains the text description information of the sample for step 103 shown in fig. 1, and gives a preferred embodiment, and the translation and the merging of the features are implemented by using the slot filling technology. The specific process is as follows:
first, features in the same category are identified as combinable features using a fill-in technique.
In the slot filling technology of this embodiment, the field names contained in the features in the same category are defined as slots, and then the feature naming templates corresponding to the category are obtained according to a certain combination sequence, that is, this embodiment needs to set a feature frame composed of preset slots for each category according to the category in the feature set, and the feature frame can identify different fields contained in the feature names by using the slots therein. And for different slots in the feature frame, a preset description specification is also corresponding, wherein the description specification is used for translating the field name into text information readable by an analyst.
It should be noted that, the field names in the slots and the text information corresponding to the translation are preset, and are generally set through a translation configuration file, before executing the steps in the above embodiment, the translation configuration file needs to be acquired first, the field names of the slots and the corresponding text information are recorded in the translation configuration file, the field names are data processing description information, most of the field names are letter symbol identifiers, so that the execution and the processing of the computer program are convenient, and the text information is text description information, most of the text identifiers are text identifiers, so that the reading of the analyst is convenient. The text information corresponding to the field name can be set by an analyst in a self-defining way according to the actual requirement, and can be configured by a system in a default way.
In addition, for the combinable features, after feature names of the features are identified by the feature frame, a plurality of identical slots are determined among different feature names, and particularly, in the case that prefix slots of the feature names are identical, the features can be determined to be the combinable features.
And secondly, merging the combinable features into a specific feature according to a preset strategy corresponding to the preset slot position.
The combinable features are not limited to a specific number, and may be one or a plurality. The specific rule of merging is based on preset strategies corresponding to different slots, wherein the preset strategies can be deleting field names, superposing field names or generating new field names, and the specific strategies need to be set according to different slots. The feature merging process generally merges slots with different field names, thereby generating a new specific feature.
And finally, converting the specific characteristics into text description information of the sample according to a preset description specification corresponding to the slot position.
The preset description specification comprises the obtained translation configuration file, and also has a strategy for optimizing the text description information obtained by translation, such as adjustment of the expression sequence of the text description information, color rendering of language and the like, and the strategy needs to be pre-set by an analyst.
Further, based on the above description, the embodiments of the present invention are not applicable to all machine learning models, but to machine learning models in which there is a filtering trade-off for sample features in the prediction process. Therefore, the following embodiments will take a gradient boost decision tree model (GBDT model) as an example, and describe in detail the implementation steps of a method for generating an interpretation report of a model prediction sample according to the present invention, as shown in fig. 2, and include:
step 201, obtaining a translation configuration file.
The translation configuration file comprises the corresponding relation between the data processing description information and the text description information of the slot position.
For example, the user can customize the translation content in the field 'attribute', when the processing description information of 'attribute' is 'edu', the corresponding text description information is 'educational level', and when the processing description information is 'open_city', the corresponding text description information is 'account opening'. Meanwhile, the method also comprises default field translation content of the system, such as a field 'direction', when the processing description information is 'src', the corresponding text description information is 'subject client', when the processing description information is 'tgt', the corresponding text description information is 'transaction opponent', and the like.
Step 202, initializing a feature set of a sample.
In this embodiment, the classification of the sample features is divided into an attribute class and a behavior class, where the attribute class features refer to feature information of the sample itself, such as name, age, gender, etc. of the sample user, and the behavior class features refer to feature information obtained by statistical calculation of the sample based on the behavior data, such as average value of transaction amounts in abnormal time periods within 30 days: larger; standard deviation of transaction amount for abnormal period over 30 days of history: smaller, etc. The characteristic values of the characteristics of larger and smaller are obtained by comparing the values based on the set labeling values.
Further, in the behavior class feature, the present embodiment is further classified into a short-term feature, a mid-term feature, and a long-term feature according to the time granularity. For example, it belongs to short-term features in days, mid-term features in weeks or months, and long-term features in years.
Step 203, determining at least part of the features in the sample based on the features applied by the machine learning model in the prediction process.
Because the machine learning model in this embodiment is a GBDT model, when determining a part of features, the features applied in the prediction process are mainly obtained according to the analysis path of the GBDT model, and then the obtained features are de-duplicated to obtain the part of features belonging to the sample.
Step 204, adding part of the features into the corresponding categories one by one according to a preset rule.
In the step, feature names of partial features are obtained one by one, whether the partial features are attribute classes is determined according to a preset naming rule, and if yes, the partial features are added into the attribute classes; if not, adding the time granularity contained in the feature name into the corresponding behavior class.
In addition, in the present embodiment, since the feature names of the behavior class features have digital information indicating time, and the numbers are often at the beginning of the feature names, one simple way to distinguish the attribute class features from the behavior class features in this step is to determine whether the feature names begin with numbers, if so, the feature names are behavior class features, and if not, the feature names are attribute class features.
Step 205, obtaining text description information of the corresponding sample for each category of features in the feature set according to a preset description specification.
For this step, in this embodiment, different types of features have different processing manners, specifically:
1. and determining text description information corresponding to the features according to the description specifications corresponding to the slots by the features in the attribute class.
Because the features in the attribute class have obvious differences and the merging possibility is extremely low, the features in the attribute class are directly translated by using the description specifications corresponding to the slots, and the translation can be specifically performed according to the corresponding slots by searching the translation configuration file.
2. And merging the features in the behavior class, and determining text description information corresponding to the features according to the description specification corresponding to the slot positions.
For behavior characteristics, the behavior characteristics can be specifically classified into a plurality of categories such as short-term characteristics, medium-term characteristics, long-term characteristics and the like, so that a plurality of characteristics similar to content expression can exist in the same category, and the characteristics can be combined based on a preset combining strategy to generate a specific characteristic and then translated.
The combination of behavior class features is also realized based on the slot division of feature names in the slot filling technology. Specifically, firstly, obtaining field names of slots corresponding to features in a behavior class according to a preset slot feature framework, then comparing the field names of the corresponding slots in at least two features, and obtaining merging strategies of the slots corresponding to different field names when the number of the different field names is smaller than a threshold value, wherein the threshold value can be set by self; combining different field names in at least two features based on the combination strategy to obtain a specific feature; and finally, searching the translation configuration file according to the description specification corresponding to the slot position to determine text description information corresponding to the specific feature.
For example, assume that the feature framework of the behavior class feature is "f_ { history_day } { history_op } _ { day_op } _ { feature_fraud } _ { direction } _ group_op }", where { internal represents a slot, wherein the history_day slot represents a history window span, the specific content of which includes that y represents a year, d represents a day, etc., for example, 30d represents 30 days; the history_op slot represents an aggregation operator of historical window granularity; the day_op slot represents a user-day granularity aggregation operator; and the like, wherein each slot position contains different contents to represent different characteristic field names, and the field names and corresponding text description information are recorded in the translation configuration file. Based on the feature framework, the features of the sample can be normalized according to the slot, for example, "f_30d_uniq_null_tgt_accid_dr_src_max", the feature is represented as "maximum value of 30 days upstream opponents of the history of the subject client in the scenario", wherein 30d represents 30 days, uniq represents the unique value of the statistical feature in the history time window, day_op=null represents the aggregation of granularity of the user-day is not considered, tgt_accid_dr represents the upstream opponents, and max represents the maximum value in the scenario. Thus, the sample features of the input model can be represented by the feature frames according to preset slots, and then, by comparing the contents of the slots, it can be determined which features can be combined, for example, short-term features in behavior classes: "average of transaction amounts over unusual period of 30 days in history: greater and history standard deviation of transaction amount for unusual periods within 30 days: after the comparison of the smaller two features, only the slot positions are different in history_op (one is the average avg and the other is the standard deviation stddev), and the two features can be combined into larger and stable according to the combination strategy corresponding to the slot positions, so that the specific feature of larger and stable transaction amount in the abnormal period of 30 days in history is obtained.
Step 206, generating an interpretation report of the sample based on the obtained text description information.
This step is the same as step 104 of the embodiment shown in fig. 1, and will not be described here again.
Further, as an implementation of the method for generating the interpretation report of the model prediction sample, the embodiment of the invention provides a device for generating the interpretation report of the model prediction sample, which is mainly used for generating the interpretation report corresponding to different input samples of the model while outputting the prediction result. For convenience of reading, the details of the foregoing method embodiment are not described one by one in the embodiment of the present apparatus, but it should be clear that the apparatus in this embodiment can correspondingly implement all the details of the foregoing method embodiment. The device is shown in fig. 3, and specifically comprises:
an initializing unit 31, configured to initialize a feature set of a sample, where features of the sample in the feature set are classified into a plurality of categories;
a classification unit 32, configured to traverse the features included in a sample predicted by the machine learning model, and add at least part of the traversed features to each category in the feature set obtained by the initialization unit 31 according to the category to which the traversed features belong;
a translation unit 33, configured to obtain text description information corresponding to the sample for each category of features in the feature set of the classification unit 32 according to a preset description specification;
a generating unit 34 for generating an interpretation report of the sample based on the text description information obtained by the translating unit 33.
Further, as shown in fig. 4, the translation unit 33 includes:
the identifying module 331 is configured to identify combinable features by using a slot filling technology on features in the same category, where one category corresponds to a feature frame formed by preset slots, and each slot corresponds to a preset description specification;
the merging module 332 is configured to merge the combinable features determined by the identifying module 331 into a specific feature according to a preset policy corresponding to a preset slot position;
and a translation module 333, configured to convert the specific feature obtained by the merging module 332 into text description information of the sample according to a preset description specification corresponding to the slot.
Further, as shown in fig. 4, the apparatus further includes:
and an obtaining unit 35, configured to obtain a translation configuration file, where the translation configuration file includes a correspondence between data processing description information and text description information of a slot.
Further, as shown in fig. 4, the classifying unit 32 includes:
a determination module 321 for determining the at least partial features based on features to which the machine learning model is applied in a prediction process;
and the classification module 322 is configured to add the partial features determined by the determination module 321 to the corresponding classes one by one according to a preset rule.
Further, the machine learning model is a gradient lifting decision tree model, and the determining module 321 is specifically configured to:
acquiring characteristics applied in a prediction process according to an analysis path of the gradient lifting decision tree model;
and de-duplicating the characteristic to obtain the partial characteristic.
Further, the categories included in the feature set include attribute categories and behavior categories; the classification module 322 is specifically configured to:
the feature names of part of the features are obtained one by one;
determining whether the partial features are attribute classes according to a preset naming rule;
if yes, adding the partial features into the attribute class;
if not, adding the time granularity contained in the feature names into corresponding behavior classes, wherein the behavior class features are classified into short-term features, medium-term features and long-term features according to the time granularity.
Further, as shown in fig. 4, the translation unit 33 further includes:
the first translation module 334 is configured to determine text description information corresponding to a feature in an attribute class according to a description specification corresponding to a slot;
and the second translation module 335 is configured to combine the features in the behavior class and determine text description information corresponding to the features according to the description specification corresponding to the slot.
Further, the second translation module 335 is specifically configured to:
acquiring field names of all slots corresponding to the features in the behavior class according to a preset slot feature frame;
comparing field names of corresponding slots in at least two features;
when the number of the different field names is smaller than a threshold value, acquiring a merging strategy of the slots corresponding to the different field names;
combining different field names in the at least two features according to the combination strategy to obtain a specific feature;
and determining text description information corresponding to the specific features according to the description specification corresponding to the slots.
Further, the embodiment of the invention also provides a storage medium, which is used for storing a computer program, wherein the computer program controls equipment where the storage medium is located to execute the method for generating the interpretation report of the model prediction sample when running.
In addition, the embodiment of the invention also provides a processor, which is used for running a program, wherein the program runs to execute the method for generating the interpretation report of the model prediction sample.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the methods and apparatus described above may be referenced to one another. In addition, the "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent the merits and merits of the embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
Furthermore, the memory may include volatile memory, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), in a computer readable medium, the memory including at least one memory chip.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (16)

1. A method of generating an interpretation report of model predictive samples, the method comprising:
initializing a feature set of a sample, wherein features of the sample in the feature set are classified into a plurality of categories;
traversing the features contained in a sample predicted by using a machine learning model, and adding at least part of the traversed features into each category in the feature set according to the category to which the traversed features belong, wherein the machine learning model is a machine learning model for screening and selecting sample features in the prediction process;
identifying combinable features by adopting a slot filling technology on features in the same category, wherein one category corresponds to a feature frame formed by preset slots, each slot corresponds to a preset description specification, combining the combinable features into a specific feature according to a preset strategy corresponding to the preset slots, and converting the specific feature into text description information of the sample according to the preset description specification corresponding to the slots;
generating an interpretation report of the sample based on the obtained text description information, the interpretation report including primary features affecting the sample prediction result;
outputting the interpretation report.
2. The method of claim 1, the method further comprising:
and acquiring a translation configuration file, wherein the translation configuration file comprises the corresponding relation between the data processing description information and the text description information of the slot position.
3. The method of claim 1, wherein adding at least some of the traversed features to each category in the feature set in terms of category to which they belong comprises:
determining the at least partial feature based on features to which the machine learning model applies during a prediction process;
and adding the partial features into the corresponding categories one by one according to a preset rule.
4. The method of claim 3, wherein the machine learning model is a gradient-lifting decision tree model, and wherein determining the partial features based on features to which the machine learning model is applied in a prediction process comprises:
acquiring characteristics applied in a prediction process according to an analysis path of the gradient lifting decision tree model;
and de-duplicating the characteristic to obtain the partial characteristic.
5. The method of claim 3, wherein the step of,
the categories contained in the feature set comprise attribute categories and behavior categories;
the step of adding the partial features one by one into the corresponding categories according to a preset rule comprises the following steps:
the feature names of part of the features are obtained one by one;
determining whether the partial features are attribute classes according to a preset naming rule;
if yes, adding the partial features into the attribute class;
if not, adding the time granularity contained in the feature names into corresponding behavior classes, wherein the behavior class features are classified into short-term features, medium-term features and long-term features according to the time granularity.
6. The method according to claim 5, wherein obtaining text description information corresponding to the sample for each category of features in the feature set according to a preset description specification, respectively, includes:
determining text description information corresponding to the features according to description specifications corresponding to the slots by the features in the attribute class;
and merging the features in the behavior class, and determining text description information corresponding to the features according to the description specification corresponding to the slot positions.
7. The method of claim 6, wherein the step of merging the features in the behavior class and determining text description information corresponding to the features according to the description specification corresponding to the slots comprises:
acquiring field names of all slots corresponding to the features in the behavior class according to a preset slot feature frame;
comparing field names of corresponding slots in at least two features;
when the number of the different field names is smaller than a threshold value, acquiring a merging strategy of the slots corresponding to the different field names;
combining different field names in the at least two features according to the combination strategy to obtain a specific feature;
and determining text description information corresponding to the specific features according to the description specification corresponding to the slots.
8. An apparatus for generating an interpretation report of model predictive samples, the apparatus comprising:
an initializing unit, configured to initialize a feature set of a sample, where features of the sample in the feature set are classified into a plurality of categories;
the classifying unit is used for traversing the characteristics contained in a sample predicted by using a machine learning model, and adding at least part of the traversed characteristics into each category in the characteristic set obtained by the initializing unit according to the category, wherein the machine learning model is used for screening and selecting sample characteristics in the predicting process;
the translation unit is used for identifying combinable features by adopting a slot filling technology for the features in the same category, wherein one category corresponds to a feature frame formed by preset slots, each slot corresponds to a preset description specification, the combinable features are combined into a specific feature according to a preset strategy corresponding to the preset slots, and the specific feature is converted into text description information of the sample according to the preset description specification corresponding to the slots;
a generation unit configured to generate an interpretation report of the sample based on the text description information obtained by the translation unit, the interpretation report including a main feature affecting a prediction result of the sample;
and the output unit is used for outputting the interpretation report.
9. The apparatus of claim 8, further comprising:
the device comprises an acquisition unit, a translation configuration file and a text description unit, wherein the translation configuration file comprises the corresponding relation between the data processing description information and the text description information of the slot position.
10. The apparatus of claim 8, wherein the classification unit comprises:
a determining module for determining the at least partial feature based on a feature to which the machine learning model is applied in a prediction process;
and the classification module is used for adding the partial features determined by the determination module into the corresponding categories one by one according to a preset rule.
11. The apparatus of claim 10, wherein the machine learning model is a gradient-lifting decision tree model, and wherein the determining module is specifically configured to:
acquiring characteristics applied in a prediction process according to an analysis path of the gradient lifting decision tree model;
and de-duplicating the characteristic to obtain the partial characteristic.
12. The apparatus of claim 10, wherein the device comprises a plurality of sensors,
the categories contained in the feature set comprise attribute categories and behavior categories;
the classification module is specifically configured to:
the feature names of part of the features are obtained one by one;
determining whether the partial features are attribute classes according to a preset naming rule;
if yes, adding the partial features into the attribute class;
if not, adding the time granularity contained in the feature names into corresponding behavior classes, wherein the behavior class features are classified into short-term features, medium-term features and long-term features according to the time granularity.
13. The apparatus of claim 12, wherein the translation unit further comprises:
the first translation module is used for determining text description information corresponding to the features according to the description specifications corresponding to the slots by the features in the attribute class;
and the second translation module is used for merging the features in the behavior class and determining text description information corresponding to the features according to the description specification corresponding to the slot positions.
14. The apparatus of claim 13, wherein the second translation module is specifically configured to:
acquiring field names of all slots corresponding to the features in the behavior class according to a preset slot feature frame;
comparing field names of corresponding slots in at least two features;
when the number of the different field names is smaller than a threshold value, acquiring a merging strategy of the slots corresponding to the different field names;
combining different field names in the at least two features according to the combination strategy to obtain a specific feature;
and determining text description information corresponding to the specific features according to the description specification corresponding to the slots.
15. A storage medium for storing a computer program, wherein the computer program when run controls a device in which the storage medium is located to perform the method for generating an interpretation report of model predictive samples as claimed in any one of claims 1-7.
16. A processor for executing a computer program, wherein the computer program when executed performs the method of generating an interpretation report of model predictive samples as claimed in any of claims 1-7.
CN202010603448.8A 2020-06-29 2020-06-29 Method and device for generating interpretation report of model prediction sample Active CN111797995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010603448.8A CN111797995B (en) 2020-06-29 2020-06-29 Method and device for generating interpretation report of model prediction sample

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010603448.8A CN111797995B (en) 2020-06-29 2020-06-29 Method and device for generating interpretation report of model prediction sample

Publications (2)

Publication Number Publication Date
CN111797995A CN111797995A (en) 2020-10-20
CN111797995B true CN111797995B (en) 2024-01-26

Family

ID=72804709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010603448.8A Active CN111797995B (en) 2020-06-29 2020-06-29 Method and device for generating interpretation report of model prediction sample

Country Status (1)

Country Link
CN (1) CN111797995B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766415B (en) * 2021-02-09 2023-01-24 第四范式(北京)技术有限公司 Method, device and system for explaining artificial intelligence model
CN115796405B (en) * 2023-02-03 2023-05-02 阿里巴巴达摩院(杭州)科技有限公司 Solution report generation method and computing device for optimization model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017186048A1 (en) * 2016-04-27 2017-11-02 第四范式(北京)技术有限公司 Method and device for presenting prediction model, and method and device for adjusting prediction model
CN108021984A (en) * 2016-11-01 2018-05-11 第四范式(北京)技术有限公司 Determine the method and system of the feature importance of machine learning sample
CN108376220A (en) * 2018-02-01 2018-08-07 东巽科技(北京)有限公司 A kind of malice sample program sorting technique and system based on deep learning
CN109615020A (en) * 2018-12-25 2019-04-12 深圳前海微众银行股份有限公司 Characteristic analysis method, device, equipment and medium based on machine learning model
CN109887577A (en) * 2017-11-06 2019-06-14 北京昆仑医云科技有限公司 System, method and the medium of report are generated for the medical image based on patient

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11580222B2 (en) * 2018-11-20 2023-02-14 Siemens Aktiengesellschaft Automated malware analysis that automatically clusters sandbox reports of similar malware samples

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017186048A1 (en) * 2016-04-27 2017-11-02 第四范式(北京)技术有限公司 Method and device for presenting prediction model, and method and device for adjusting prediction model
CN108021984A (en) * 2016-11-01 2018-05-11 第四范式(北京)技术有限公司 Determine the method and system of the feature importance of machine learning sample
CN109887577A (en) * 2017-11-06 2019-06-14 北京昆仑医云科技有限公司 System, method and the medium of report are generated for the medical image based on patient
CN108376220A (en) * 2018-02-01 2018-08-07 东巽科技(北京)有限公司 A kind of malice sample program sorting technique and system based on deep learning
CN109615020A (en) * 2018-12-25 2019-04-12 深圳前海微众银行股份有限公司 Characteristic analysis method, device, equipment and medium based on machine learning model

Also Published As

Publication number Publication date
CN111797995A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
US10296307B2 (en) Method and system for template extraction based on source code similarity
TWI723528B (en) Computer-executed event risk assessment method and device, computer-readable storage medium and computing equipment
US11093519B2 (en) Artificial intelligence (AI) based automatic data remediation
US20190278853A1 (en) Extracting Structure and Semantics from Tabular Data
CN111797995B (en) Method and device for generating interpretation report of model prediction sample
CN114819186A (en) Method and device for constructing GBDT model, and prediction method and device
US11347619B2 (en) Log record analysis based on log record templates
Olorunnimbe et al. Dynamic adaptation of online ensembles for drifting data streams
CN111222994A (en) Client risk assessment method, device, medium and electronic equipment
US11481692B2 (en) Machine learning program verification apparatus and machine learning program verification method
US20180239904A1 (en) Assigning classifiers to classify security scan issues
US11188648B2 (en) Training a security scan classifier to learn an issue preference of a human auditor
CN112100400A (en) Node recommendation method and device based on knowledge graph
CN111611419B (en) Sub-graph identification method and device
KR20210143460A (en) Apparatus for feature recommendation and method thereof
CN110532773B (en) Malicious access behavior identification method, data processing method, device and equipment
CN112905443A (en) Test case generation method, device and storage medium
CN107430633A (en) The representative content through related optimization being associated to data-storage system
JPWO2018235841A1 (en) Graph structure analysis device, graph structure analysis method, and program
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN110210030B (en) Statement analysis method and device
JP2021152751A (en) Analysis support device and analysis support method
KR102382017B1 (en) Apparatus and method for malware lineage inference system with generating phylogeny
US20230252325A1 (en) Artificial intelligence system providing interactive model interpretation and enhancement tools
Mahalle et al. Data-Centric AI

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant