CN111797995A - 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
CN111797995A
CN111797995A CN202010603448.8A CN202010603448A CN111797995A CN 111797995 A CN111797995 A CN 111797995A CN 202010603448 A CN202010603448 A CN 202010603448A CN 111797995 A CN111797995 A CN 111797995A
Authority
CN
China
Prior art keywords
features
sample
feature
preset
description information
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.)
Granted
Application number
CN202010603448.8A
Other languages
Chinese (zh)
Other versions
CN111797995B (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

Images

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, relates to the technical field of data analysis, and mainly aims to generate an interpretation report corresponding to a sample while outputting a prediction result aiming at different input samples of a model. 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 characteristics contained in a sample predicted by using a machine learning model, and adding at least part of traversed characteristics into each category in the characteristic set according to the category to which the characteristics belong; respectively obtaining text description information corresponding to the sample for the characteristics of each category in the characteristic set according to a preset description specification; generating an interpretation report for the sample based on the obtained textual 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 technology has gradually become a main tool for modeling, and commonly used Machine learning algorithms include decision trees (decision trees), random forests (random forest), Gradient Boosting Machines (GBM), Support Vector Machines (SVMs), neural networks (neural networks), and the like. The machine learning model can explain complex multidimensional relation, the prediction capability is strong, and the model can achieve good prediction performance results on training data. However, the existing machine learning model does not provide effective explanation for the logic relationship inside the machine learning model, that is, for an input datum, the machine learning model can output a prediction result relatively accurately, but cannot provide a specific reason for obtaining the result. In a practical scenario where a machine learning model is applied, the feature vector dimension that the model needs to analyze is often thousands or even tens of thousands. In such a large number of features, after data with different features are analyzed by the machine learning model, it is possible to obtain similar or even identical prediction results, and for users who need to further know which important features affect the prediction results, the existing machine learning model cannot meet the user requirements.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for generating an interpretation report of a model prediction sample, and a main object of the present invention is to generate an interpretation report corresponding to a sample while outputting a prediction result for different input samples of a model.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in one aspect, the present invention provides a method for generating an interpretation report of a model prediction sample, including:
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 characteristics contained in a sample predicted by using a machine learning model, and adding at least part of traversed characteristics into each category in the characteristic set according to the category to which the characteristics belong;
respectively obtaining text description information corresponding to the sample for the characteristics of each category in the characteristic set according to a preset description specification;
generating an interpretation report for the sample based on the obtained textual description information.
In another aspect, the present invention provides an apparatus for generating an interpretation report of a model prediction sample, including:
the device comprises an initialization unit, a processing unit and a processing unit, wherein the initialization unit is used for initializing a feature set of a sample, and the features of the sample in the feature set are divided into a plurality of categories;
the classification unit is used for traversing the features contained in one sample predicted by using the machine learning model and adding at least part of traversed features into each class in the feature set obtained by the initialization unit according to the class to which the features belong;
the translation unit is used for respectively obtaining text description information corresponding to the sample for the characteristics of each category of the classification unit in the characteristic set according to a preset description specification;
a generating unit configured to generate an interpretation report of the sample based on the text description information obtained by the translating unit.
In another aspect, the present invention provides a storage medium for storing a computer program, where the computer program controls, when running, a device in which 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 for executing a program, where the program executes the method for generating an interpretation report of a model prediction sample described above.
By means of the technical scheme, when a certain sample is predicted, the method and the device for generating the interpretation report of the model prediction sample can output the prediction result of the model, can classify and screen the prediction result according to the characteristics applied by the model during the prediction, and can translate the characteristics with large influence on the prediction result, so that the interpretation report aiming at the sample prediction result is generated. Through the interpretation report, analysts can know the main characteristics influencing the prediction result of the sample, so that the analysis logic of the prediction result can be more accurately understood, and the interpretation requirements of the analysts on the model prediction result are met.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
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 refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for generating an interpretation report of a model prediction sample according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for generating an interpretation report of a model prediction sample according to another embodiment of the present invention;
FIG. 3 is a block diagram illustrating an apparatus for generating an interpretation report of a model prediction sample according to an embodiment of the present invention;
fig. 4 is a block diagram showing another device for generating an interpretation report of model prediction samples 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 invention are shown in the drawings, it should be understood that the invention can 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 explanation report of a model prediction sample, which is applied to the process of predicting the sample by using a machine learning model, generates the explanation report for the prediction result of the sample and helps an analyst to further understand the prediction result of the model. The method comprises the following specific steps as shown in figure 1:
step 101, initializing a feature set of a sample.
The features of the samples in the feature set are classified into a plurality of categories, and different samples may 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 types into which the features in the sample can be classified, such as the attribute class features and the behavior class features, are determined.
Step 102, traversing the features contained in one sample predicted by using the machine learning model, and adding at least part of traversed features into each class in the feature set according to the class to which the features belong.
At present, the features included in a sample refer to specific data describing the sample from different dimensions, and a common sample may contain hundreds of features with different dimensions. The machine learning model analyzes and calculates the characteristics through a specific machine learning algorithm and outputs a corresponding prediction result. In the process, different processing modes are provided for different machine learning algorithms when processing sample features, for example, a decision tree screens different features for analysis according to decision paths thereof, and a neural network algorithm analyzes all the features, so that the machine learning model in the 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 large influence on a prediction result.
In this step, because the machine learning algorithms applied by different models are different, the screening modes of the sample features are different. Therefore, the adding at least part of the features to each category in the feature set according to the category to which the features belong in the step specifically means that in the model prediction process, the features applied by the model are obtained, the categories of the features are identified, and the features are divided into the corresponding categories.
And 103, obtaining text description information of the corresponding sample for the features of each category in the feature set according to a preset description specification.
This step is a process of translating the features obtained in the previous step according to the category to which they belong. The preset description specification can be understood as a preset strategy of translation, different categories have different description specifications, and meanwhile, the preset description specification also has a function of combining the 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.
After the processing of this step, one or more features represented by the text description information can be obtained in different categories of the feature set.
And 104, generating an explanation report of the sample based on the obtained text description information.
In this step, the obtained text description information is processed according to a preset format to generate an interpretation report corresponding to the sample, for example, the interpretation report is displayed in a 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 according to the embodiment of the present invention is to set a plurality of categories for the features of a plurality of dimensions of the sample, then screen and classify the features applied by the model in the prediction process, and then translate and combine the features according to the categories, so as to obtain the text description information for the sample, where the text description information is the text information described by using the features 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 an analyst and the further understanding of the prediction result.
Further, according to the embodiment shown in fig. 1, the important steps of obtaining the interpretation report in the present invention are translation of features and merging of features in the same category, that is, step 103 shown in fig. 1, so that the embodiment of the present invention obtains text description information of a sample for step 103 shown in fig. 1, and provides a preferred embodiment, and implements translation and merging processing of features by using a slot filling technology. The specific process is as follows:
first, features in the same category are identified as combinable features using a groove filling technique.
The slot filling technique in this embodiment is a technique for performing normalized management on feature names, and specifically, a feature name of a sample is generally formed by combining a plurality of fields, and different fields may be descriptions of features in the same dimension or different dimensions. For different slots in the feature frame, a preset description specification is also corresponded, and 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 by a translation configuration file, before the steps of the above embodiment are executed, the translation configuration file needs to be obtained 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 and are mostly letter symbol identifiers, which is convenient for the execution and processing of the computer program, and the text information is text description information and is mostly character identifiers, which is convenient for an analyst to read. The text information corresponding to the field names can be set by an analyst according to actual requirements in a self-defined mode, and can also be configured by a system in a default mode.
In addition, the combinable features refer to the situation that after the feature names of the features are identified by using the feature framework, a large number of identical slots exist among different feature names, particularly the prefix slots of the feature names are identical, and the features can be determined to be combinable.
And secondly, combining 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 more. The specific rule of merging is based on preset strategies corresponding to different slot positions, the preset strategies can be deleting field names, overlapping field names or generating new field names, and the specific strategies need to be set according to different slot positions. The feature merging process generally merges the slots with different field names to generate 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 includes the obtained translation configuration file, and meanwhile, the preset description specification further includes a strategy for performing optimization processing on the text description information obtained through translation, such as adjustment of the expression sequence of the text description information, language touch-up and the like, and the strategy needs preselection setting by an analyst.
Further, as can be seen from the above description, the embodiments of the present invention are not applicable to all machine learning models, but are applicable to machine learning models that have a filter choice for sample features in the prediction process. Therefore, the following embodiment will take a gradient boosting decision tree model (GBDT model) as an example to describe in detail the implementation steps of the method for generating an interpretation report of a model prediction sample according to the present invention, as specifically shown in fig. 2, including:
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.
For example, the user may customize the translation content in the field 'attribute', and when the processing description information of 'attribute' is 'edu', the corresponding text description information is 'education level', and when the processing description information is 'open _ city', the corresponding text description information is 'place of account'. Meanwhile, default field translation contents are also included, for example, in the field 'direction', when the processing description information is 'src', the corresponding text description information is 'principal 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 the sample.
In this embodiment, the category of the sample feature is divided into an attribute class and a behavior class, where the attribute class feature refers to feature information of the sample itself, such as name, age, and gender of a sample user, and the behavior class feature refers to feature information obtained by the sample based on statistical calculation of behavior data, such as an average value of transaction amounts in an abnormal period within 30 days in history: is large; standard deviation of transaction amount in abnormal period within 30 days in history: smaller, and so on. Wherein, the characteristic values of the features of "larger" and "smaller" are obtained by comparison based on the setting label value.
Further, in the behavior class feature, the present embodiment is further divided into a short-term feature, a medium-term feature, and a long-term feature according to the time granularity. For example, short-term features in days, medium-term features in weeks or months, and long-term features in years.
Step 203, at least some features in the sample are determined based on features to which the machine learning model is applied in the prediction process.
Since the machine learning model in this embodiment is a GBDT model, when determining a partial feature, the feature applied in the prediction process is mainly obtained according to the analysis path of the GBDT model, and then the partial feature belonging to the sample is obtained after the obtained feature is deduplicated.
And step 204, adding the partial features into the corresponding categories one by one according to a preset rule.
In the step, feature names of partial features are acquired one by one, whether the partial features are in an attribute class is determined according to a preset naming rule, and if yes, the partial features are added into the attribute class; if not, adding the behavior into the corresponding behavior class according to the time granularity contained in the characteristic name.
In addition, in the present embodiment, since the feature name of the behavior class feature has digital information indicating time, and the number is at the beginning of the feature name in many cases, one simple way to distinguish the attribute class feature from the behavior class feature in this step is to determine whether the feature name starts with a number, and if so, it is the behavior class feature, and otherwise, it is the attribute class feature.
And 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, the features of different categories have different processing modes, specifically:
1. and determining the text description information corresponding to the characteristics according to the description specifications corresponding to the slot positions by using the characteristics 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 specification corresponding to the slot position, and particularly the translation can be carried out according to the corresponding slot position 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 specifications corresponding to the slot positions.
For the behavior class features, the behavior class features can be specifically divided into a plurality of categories such as short-term features, medium-term features, long-term features and the like, so that a large number of features with similar content expressions may exist in the same category, and for the features, the features can be merged based on a preset merging strategy to generate a specific feature and then translated.
The combination of the behavior class characteristics is also realized based on the slot position division of the characteristic names in the slot filling technology. Specifically, the field names of the slots corresponding to the features in the behavior class are obtained according to a preset slot feature frame, then the field names of the slots corresponding to the at least two features are compared, and when the number of the different field names is smaller than a threshold value, a merging strategy of the slots corresponding to the different field names is obtained, wherein the threshold value can be set by self; based on the merging strategy, different field names in at least two characteristics are merged to obtain a specific characteristic; and finally, searching a translation configuration file according to the description specification corresponding to the slot position so as to determine the text description information corresponding to the specific characteristic.
For example, assume that the feature framework of the behavior class feature is "f _ { history _ day } _ history _ op } _ day _ op } _ feature _ frag } _ direction } _ group _ op }, where { } internally represents a slot, where history _ day slot represents a history window span, and specific contents thereof include, for example, y represents a year, d represents a day, etc., e.g., 30d represents 30 days; the history _ op slot represents an aggregation operator of the granularity of the history window; the day _ op slot represents a user-day granularity aggregation operator; and the like, wherein each slot has different contents to represent different characteristic field names, and the field names and the corresponding text description information are recorded in the translation configuration file. Based on the feature framework, the feature of the sample can be represented in a normalized manner according to the slot position, for example, "f _30d _ uniq _ null _ tgt _ accid _ dr _ src _ max", where the represented feature is "the maximum value of the number of the 30-day upstream adversaries of the subject client history in the case", where 30d represents 30 days, uniq represents a unique value of the statistical feature in a history time window, day _ op ═ null represents no consideration of user-day granularity aggregation, tgt _ accid _ dr represents the upstream adversary, and max represents the maximum value in the case. Thus, sample features of the input model can be represented by the feature frame according to the preset slot, and then, by comparing the contents of the slot, it can be determined which features can be combined, for example, short-term features in the behavior class: "average of transaction amounts during unusual periods within 30 days of history: the standard deviation of the transaction amount of the larger "and" abnormal period within 30 days of history: the smaller two characteristics are compared, and only the slot bit history _ op is different (one is the mean value avg, and the other is the standard deviation stddev), and according to the merging strategy corresponding to the slot, the two characteristics can be merged into a larger and stable characteristic, so that a specific characteristic that the transaction amount is larger and stable in the abnormal period within 30 days in history is obtained.
And step 206, generating an interpretation report of the sample based on the obtained text description information.
This step is the same as step 104 in the embodiment shown in fig. 1, and is not described again here.
Further, as an implementation of the method for generating the interpretation report of the model prediction sample, an embodiment of the present invention provides a device for generating the interpretation report of the model prediction sample, where the device is mainly used for generating the interpretation report corresponding to the sample while outputting a prediction result for different input samples of the model. For convenience of reading, details in the foregoing method embodiments are not described in detail again in this apparatus embodiment, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiments. As shown in fig. 3, the apparatus specifically includes:
an initializing unit 31 configured to initialize a feature set of a sample, wherein features of the sample in the feature set are classified into a plurality of categories;
a classification unit 32, configured to traverse features included in one sample predicted by using a machine learning model, and add at least part of the traversed features to each class in the feature set obtained by the initialization unit 31 according to the class to which the traversed features belong;
a translation unit 33, configured to obtain text description information corresponding to the sample for each class of features in the feature set of the classification unit 32 according to a preset description specification;
a generating unit 34, configured to generate 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 identification module 331 is configured to identify combinable features by using a slot filling technology for features in the same category, where one category corresponds to a feature frame formed by preset slot positions, and each slot position corresponds to a preset description specification;
a merging module 332, 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;
the translation module 333 is configured to convert the specific feature obtained by the merging module 332 into the 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:
the obtaining unit 35 is configured to obtain a translation configuration file, where the translation configuration file includes a correspondence between data processing description information of the slot and text description information.
Further, as shown in fig. 4, the classification unit 32 includes:
a determining module 321 for determining the at least part of the features based on features to which the machine learning model is applied in a prediction process;
the classification module 322 is configured to add the partial features determined by the determination module 321 to corresponding categories one by one according to a preset rule.
Further, the machine learning model is a gradient boosting decision tree model, and the determining module 321 is specifically configured to:
acquiring features applied in a prediction process according to the analysis path of the gradient lifting decision tree model;
and de-duplicating the features to obtain the partial features.
Further, the categories included in the feature set include an attribute class and a behavior class; the classification module 322 is specifically configured to:
acquiring feature names of partial features 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;
and if not, adding the behavior type characteristics into the corresponding behavior type according to the time granularity contained in the characteristic name, wherein the behavior type characteristics are divided into short-term characteristics, medium-term characteristics and long-term characteristics 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, according to the description specification corresponding to the slot, the feature in the attribute class, and text description information corresponding to the feature;
the second translation module 335 is configured to merge 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 the slots corresponding to the characteristics in the behavior class according to a preset slot characteristic frame;
comparing the field names of the corresponding slot positions in the at least two characteristics;
when the number of the different field names is smaller than a threshold value, acquiring a merging strategy of the slot positions corresponding to the different field names;
according to the merging strategy, different field names in the at least two characteristics are merged to obtain a specific characteristic;
and determining the text description information corresponding to the specific characteristics according to the description specification corresponding to the slot position.
Further, an embodiment of the present invention further provides a storage medium, where the storage medium is used for storing a computer program, where the computer program controls, when running, a device in which the storage medium is located to execute the method for generating an interpretation report of a model prediction sample.
In addition, the embodiment of the present invention further provides a processor, where the processor is configured to execute a program, where the program executes the method for generating the interpretation report of the model prediction sample when running.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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 above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of generating an interpretation report of a model prediction sample, 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 characteristics contained in a sample predicted by using a machine learning model, and adding at least part of traversed characteristics into each category in the characteristic set according to the category to which the characteristics belong;
respectively obtaining text description information corresponding to the sample for the characteristics of each category in the characteristic set according to a preset description specification;
generating an interpretation report for the sample based on the obtained textual description information.
2. The method according to claim 1, 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 comprises:
identifying combinable features by adopting a slot filling technology for the features in the same category, wherein one category corresponds to a feature frame consisting of preset slot positions, and each slot position corresponds to a preset description specification;
merging the combinable features into a specific feature according to a preset strategy corresponding to a preset slot position;
and converting the specific features into text description information of the sample according to a preset description specification corresponding to the slot position.
3. The method of claim 2, 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.
4. The method of claim 1, wherein adding at least some of the traversed features to each of the classes in the feature set according to the class to which the traversed feature belongs comprises:
determining the at least partial feature based on a feature to which the machine learning model is applied in a prediction process;
and adding the partial features into the corresponding categories one by one according to a preset rule.
5. The method of claim 4, wherein the machine learning model is a gradient boosting 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 features applied in a prediction process according to the analysis path of the gradient lifting decision tree model;
and de-duplicating the features to obtain the partial features.
6. The method of claim 4,
the categories contained in the feature set comprise an attribute category and a behavior category;
adding the partial features to the corresponding categories one by one according to a preset rule, wherein the adding step comprises the following steps:
acquiring feature names of partial features 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;
and if not, adding the behavior type characteristics into the corresponding behavior type according to the time granularity contained in the characteristic name, wherein the behavior type characteristics are divided into short-term characteristics, medium-term characteristics and long-term characteristics according to the time granularity.
7. The method according to claim 6, wherein obtaining the text description information corresponding to the sample for each category of the features in the feature set according to a preset description specification respectively comprises:
determining text description information corresponding to the features according to the description specifications corresponding to the slot positions by using the features in the attribute class;
and combining the features in the behavior classes, and then determining text description information corresponding to the features according to the description specifications corresponding to the slot positions.
8. An apparatus for generating an interpretation report of model prediction samples, the apparatus comprising:
the device comprises an initialization unit, a processing unit and a processing unit, wherein the initialization unit is used for initializing a feature set of a sample, and the features of the sample in the feature set are divided into a plurality of categories;
the classification unit is used for traversing the features contained in one sample predicted by using the machine learning model and adding at least part of traversed features into each class in the feature set obtained by the initialization unit according to the class to which the features belong;
the translation unit is used for respectively obtaining text description information corresponding to the sample for the characteristics of each category of the classification unit in the characteristic set according to a preset description specification;
a generating unit configured to generate an interpretation report of the sample based on the text description information obtained by the translating unit.
9. A storage medium for storing a computer program, wherein the computer program controls a device in which the storage medium is installed when running to perform the method for generating an interpretation report of a model prediction sample according to any one of claims 1 to 7.
10. A processor for executing a computer program, wherein the computer program executes the method for generating an interpretation report of a model prediction sample according to any one of claims 1 to 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 true CN111797995A (en) 2020-10-20
CN111797995B 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)

Cited By (2)

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

Citations (6)

* 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
US20200159925A1 (en) * 2018-11-20 2020-05-21 Siemens Aktiengesellschaft Automated malware analysis that automatically clusters sandbox reports of similar malware samples

Patent Citations (6)

* 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
US20200159925A1 (en) * 2018-11-20 2020-05-21 Siemens Aktiengesellschaft Automated malware analysis that automatically clusters sandbox reports of similar malware samples
CN109615020A (en) * 2018-12-25 2019-04-12 深圳前海微众银行股份有限公司 Characteristic analysis method, device, equipment and medium based on machine learning model

Cited By (4)

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

Also Published As

Publication number Publication date
CN111797995B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
US10296307B2 (en) Method and system for template extraction based on source code similarity
US11093519B2 (en) Artificial intelligence (AI) based automatic data remediation
TWI723528B (en) Computer-executed event risk assessment method and device, computer-readable storage medium and computing equipment
US20190171875A1 (en) Blockwise extraction of document metadata
CN112511546A (en) Vulnerability scanning method, device, equipment and storage medium based on log analysis
US11347619B2 (en) Log record analysis based on log record templates
CN111797995B (en) Method and device for generating interpretation report of model prediction sample
Basso et al. Random sampling and machine learning to understand good decompositions
Olorunnimbe et al. Dynamic adaptation of online ensembles for drifting data streams
CN111241073A (en) Data quality inspection method and device
Thomas et al. Applications of decision trees
US11481692B2 (en) Machine learning program verification apparatus and machine learning program verification method
US20220229854A1 (en) Constructing ground truth when classifying data
CN110019784B (en) Text classification method and device
CN113538154A (en) Risk object identification method and device, storage medium and electronic equipment
US20180239904A1 (en) Assigning classifiers to classify security scan issues
US20200349136A1 (en) Multi-level conflict-free entity clusterings
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
CN113760891A (en) Data table generation method, device, equipment and storage medium
US20210271654A1 (en) Contrasting Document-Embedded Structured Data and Generating Summaries Thereof
CN104933096A (en) Abnormal key recognition method of database, abnormal key recognition device of database and data system
CN110532773B (en) Malicious access behavior identification method, data processing method, device and equipment
CN107430633A (en) The representative content through related optimization being associated to data-storage system
KR101948603B1 (en) Anonymization Device for Preserving Utility of Data and Method thereof

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