WO2017143914A1 - 一种利用训练数据训练模型的方法和训练系统 - Google Patents

一种利用训练数据训练模型的方法和训练系统 Download PDF

Info

Publication number
WO2017143914A1
WO2017143914A1 PCT/CN2017/073340 CN2017073340W WO2017143914A1 WO 2017143914 A1 WO2017143914 A1 WO 2017143914A1 CN 2017073340 W CN2017073340 W CN 2017073340W WO 2017143914 A1 WO2017143914 A1 WO 2017143914A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
value
training
columns
feature columns
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.)
Ceased
Application number
PCT/CN2017/073340
Other languages
English (en)
French (fr)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2017143914A1 publication Critical patent/WO2017143914A1/zh
Priority to US16/112,592 priority Critical patent/US11615346B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2137Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on criteria of topology preservation, e.g. multidimensional scaling or self-organising maps
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2148Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models

Definitions

  • the present application relates to the field of data processing, and in particular, to a method and a training system for training a model using training data.
  • the CTR estimate is a key link in Internet computing advertising, and the accuracy of the forecast directly affects the company's advertising revenue.
  • the CTR estimation uses a specific algorithm model.
  • the training data input into the algorithm model may reach a scale of 100 billion, and the characteristic dimension of each training data may reach a scale of 10 billion. In such a large-scale input algorithm model, it is easy to cause the calculation difficulty and efficiency of the machine learning algorithm model to be reduced.
  • LR Logistic Regression
  • a certain amount of data can be processed by the above method, but for the scale of 10 billion features * 100 billion data, the total amount of data may exceed the PB level, which is beyond the calculation range of the general computing cluster. Even if the calculation can be performed using a very large-scale computing cluster, the time to obtain the final optimal result is very long, resulting in low operational efficiency and failing to meet the update requirements of the business.
  • the training data may have problems of too low a dimension and too small a data volume. It also affects the training accuracy of the machine learning model.
  • embodiments of the present application have been made in order to provide a method and training system for training a model using training data that overcomes the above problems or at least partially solves the above problems.
  • an embodiment of the present application discloses a method for training a model by using training data, where the training data includes a plurality of samples, each sample includes N features, and corresponding features of the plurality of samples constitute N Feature column, the training method includes:
  • the M feature columns are subjected to dimensionality reduction processing to generate P feature columns, where M ⁇ N, and P ⁇ M;
  • the training data including the (N-M+P) feature columns is input to a machine learning algorithm model, and the machine learning algorithm model is trained.
  • Another embodiment of the present application discloses a method for training a model by using training data, where the training data includes a plurality of samples, each sample includes N features, and corresponding features of the plurality of samples constitute N feature columns.
  • the training methods include:
  • the Q feature columns are subjected to a dimensioning process to generate R feature columns, where R>Q, and Q ⁇ N;
  • the training data including the (R+N-Q) feature columns is input to a machine learning algorithm model, and the machine learning algorithm model is trained.
  • a further embodiment of the present application discloses a system for training a model by using training data, where the training data includes a plurality of samples, each sample includes N features, and corresponding features of the plurality of samples constitute N feature columns.
  • the training system includes:
  • a first calculation module configured to calculate an importance level value of each feature column
  • a first determining module configured to determine whether an importance level value of each feature column is less than a corresponding threshold
  • a first dimension reduction module configured to perform dimension reduction processing on the M feature columns to generate P feature columns when determining that an importance degree value of the M feature columns in the N feature columns is less than a corresponding threshold value Where M ⁇ N and P ⁇ M;
  • a first merging module configured to combine (N-M) feature columns whose importance value is greater than or equal to a corresponding threshold value and P feature columns generated after dimension reduction processing to obtain (N-M+P) feature columns;
  • a first training module configured to input training data including the (N-M+P) feature columns into a machine learning algorithm model, and train the machine learning algorithm model.
  • Yet another embodiment of the present application discloses a system for training a model by using training data, the training data including a plurality of samples, each sample including N features, and corresponding features of the plurality of samples constitute N feature columns,
  • the training system includes:
  • a second calculation module configured to calculate an importance level value of each feature column
  • a second determining module configured to determine whether an importance level value of each feature column is greater than a corresponding threshold
  • a dimension-up module configured to perform a dimensioning process on the Q feature columns to generate R feature columns, when it is determined that the importance degree value of the Q feature columns in the N feature columns is greater than a corresponding threshold value, where R>Q, and Q ⁇ N;
  • a second merging module configured to combine the R feature columns generated after the up-dimensional processing and the (N-Q) feature columns whose importance degree values are less than or equal to the corresponding threshold value, to obtain (R+N-Q) feature columns;
  • a second training module configured to input training data including the (R+N-Q) feature columns into a machine learning algorithm model, and train the machine learning algorithm model.
  • the embodiment of the present application distinguishes the important features and the auxiliary features by determining the importance value of each feature column, adopts a method of retaining important features, reducing the auxiliary features, or correspondingly adopting a method of upgrading important features.
  • the dimension of the training data with high feature dimension can be reduced.
  • the training feature parameters can be controlled, and the training data is greatly reduced.
  • the purpose of operational efficiency improvement because the important features are retained in the method of the embodiment of the present application, the auxiliary features are reduced in dimension, and the degree of reduction of the prediction accuracy of the model is minimized.
  • the embodiment of the present application can determine the importance level of each feature column, and can increase the dimension of the training data with higher importance value for the smaller-scale training data, and can achieve controllable training parameter parameters and improve model training. The problem of accuracy.
  • FIG. 1 is a schematic diagram of training data in an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for training a model using training data according to a first embodiment of the present application
  • FIG. 3 is a schematic diagram showing the result of the importance level value output of the feature column of the embodiment of the present application.
  • FIG. 4 is a flowchart of a method for training a model using training data according to a second embodiment of the present application
  • FIG. 5 is a flowchart of a method for training a model using training data according to a third embodiment of the present application.
  • FIG. 6 is a block diagram of a system for training a model using training data according to a fourth embodiment of the present application.
  • FIG. 7 is a block diagram of a system for training a model using training data according to a fifth embodiment of the present application.
  • Figure 8 is a block diagram of a system for training a model using training data in a sixth embodiment of the present application.
  • One of the core ideas of the present application is to propose a method and system for training a model using training data, in which a feature column selection is first performed, by calculating the importance value of each feature column and judging each feature column. If the importance value is less than the corresponding threshold, the important feature column and the auxiliary feature column are selected. Then, multiple auxiliary feature columns are subjected to dimensionality reduction processing. Finally, the important feature columns and the auxiliary feature columns after dimensionality reduction are combined, and the machine learning algorithm model is input to train the machine learning algorithm model.
  • the first embodiment of the present application provides a method for training a model by using training data
  • FIG. 1 is a schematic diagram of training data according to an embodiment of the present application.
  • 2 is a flow chart of a method of training a model using training data.
  • the method for training a model using the training data proposed by the first embodiment of the present application can be used to train various machine learning algorithm models.
  • the method for training a model using the training data proposed in the first embodiment of the present application can be applied to a high-dimensional Training data for sparse features.
  • the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns.
  • the method for training a model using the training data in the first embodiment of the present application may include the following steps:
  • the importance value is used to assess the importance of the feature column to the prediction accuracy of the model after training.
  • the importance value may be an information value IV (Information Value, hereinafter referred to as IV value) or an information gain IG (Information Gain, hereinafter referred to as IG value).
  • the importance level is the information value IV of the feature column, for example, taking the binary model as an example, it can be calculated by the following formula:
  • the binary model can be a credit card scoring model widely used abroad.
  • the binary model is widely used especially in the field of credit risk assessment and financial risk control.
  • the principle is to discretize the model variable WoE encoding method and then use the logistic regression model.
  • each training data is information for each credit card user, and the training data includes a plurality of characteristics, such as the age, occupation, gender, etc. of the credit card user.
  • Each training data corresponds to a tag value. When the credit card user is a default user, the tag value is recorded as 1, and when the credit card user is a normal user, the tag value is recorded as 0.
  • WoE is a weight of Evidence, and the WoE value calculation is first required before calculating the IV value.
  • the pctlGood and pctlBad in the formula (1) are respectively calculated by the features in the feature columns of the plurality of training data and the tag values corresponding to each of the data.
  • pctlGood indicates that a certain feature column (for example, "age of credit card user") is discretely processed, and the number of credit card users corresponding to the tag value of 1 in each interval and the credit card user corresponding to the tag value of 1 in all the intervals
  • the number of pctlBad indicates the number of credit card users whose corresponding tag value is 0 in each interval and the number of credit card users whose tag value is 0 in all intervals.
  • Table 1 shows the WoE value corresponding to each age range obtained by discretely processing the age of the credit card user.
  • the MIV value for each age range is calculated by the formula (2), and the sum of the MIV values of each age range is calculated by the formula (3), thereby obtaining the entire age range of the feature column.
  • the IV value is calculated by the formula (2), and the sum of the MIV values of each age range is calculated by the formula (3), thereby obtaining the entire age range of the feature column.
  • the information gain Gain(S, A) is defined as:
  • Entropy(S) is the entropy of the data set S
  • V(A) is the set of all possible values of a certain feature column A
  • Sv is the value of a characteristic column A in S.
  • the weight is a ratio of a certain feature column Sv to the original sample S
  • Figure 3 shows a schematic diagram of the output.
  • col is the feature name
  • IV is the information value
  • IG is the information gain.
  • the calculation method of the IV value and the IG value of each feature column is described above by way of example. It should be clear to those skilled in the art that there are other various values in the art that can be used to evaluate the importance of the feature column to the prediction accuracy of the model after training, and the calculation method is also various. The type and calculation method of the importance value are not particularly limited.
  • Step S102 determining whether the importance level value of each feature column is less than a corresponding threshold
  • step S101 for example, whether the importance level value is smaller than the corresponding threshold value may be determined according to the importance degree value of each feature column calculated in step S101.
  • the IV value of each feature column may be determined according to the IV value of each feature column calculated in step S101 whether the IV value is less than a corresponding threshold.
  • the threshold corresponding to the IV value of the feature column is, for example, a first threshold B, and in this step, the IV value of each feature column is compared with the first threshold B.
  • a corresponding threshold may be determined according to the IG value of each feature column calculated in step S101.
  • the threshold corresponding to the IG value of the feature column is, for example, a second threshold C, and in this step, the IG value of each feature column is compared with the second threshold C.
  • the IV value and the IG value of each feature column are simultaneously smaller than the corresponding threshold. For example, for each feature column, it is determined whether the IV value of the feature column is smaller than the first threshold B, and it is determined whether the IG value of the feature column is smaller than the second threshold C.
  • Step S103 when it is determined that the importance degree value of the M feature columns in the N feature columns is less than a corresponding threshold, the M feature columns are subjected to dimensionality reduction processing to generate P feature columns, where M ⁇ N And P ⁇ M;
  • this step by comparing the information value and/or the information gain with the corresponding threshold, it can be determined which features are listed as important features and which are listed as auxiliary features. That is, which feature columns have a greater influence on the prediction accuracy of the model after training, that is, can be regarded as an important feature, and which feature columns have little influence on the prediction accuracy of the model after training, that is, can be regarded as an auxiliary feature.
  • the comparison is performed only by the IV value, it can be considered that the feature column whose IV value is smaller than the above-described first threshold B is an auxiliary feature, and the feature column whose IV value is greater than or equal to the above-described first threshold B is an important feature.
  • the comparison is performed only by the IG value, it can be considered that the feature column whose IG value is smaller than the above-described second threshold C is an auxiliary feature, and the feature column whose IG value is greater than or equal to the above-described second threshold C is an important feature.
  • the feature column whose IV value is smaller than the first threshold B described above may be regarded as an auxiliary feature, or the feature column whose IG value is smaller than the second threshold C described above is an auxiliary feature, and only the IV value A feature column greater than or equal to the first threshold B described above and having an IG value greater than or equal to the second threshold C described above may be considered an important feature.
  • the following describes, by way of an example, a step of performing dimensionality reduction processing on the feature columns in which the M information values and/or information gains are smaller than the corresponding threshold.
  • a training data consists of three samples, each of which includes N features, three of which are:
  • A3 (a 31 , a 32 , a 33 , ... a 3N )
  • the step of calculating the importance level value of each feature column in step S101 is, for example, calculating the information value and/or information gain of the feature column formed by a 11 , a 21 , a 31 , a 12 , a 22 , a 32 Information value and/or information gain of the feature column, information value and/or information gain of the feature column formed by a 13 , a 23 , a 33 until the information value of the feature column composed of a 1N , a 2N , a 3N and/ Or information gain.
  • step S103 according to whether the importance degree value of each feature column obtained in step S102 is less than a corresponding threshold value, the plurality of feature columns are divided into important features and auxiliary features.
  • important features are, for example, a feature column composed of (a 11 , a 21 , a 31 ), and a feature column composed of (a 12 , a 22 , a 32 ).
  • the auxiliary feature is the last M column (a 1 (N-M+1) , a 2 (N-M+1) , a 3 (N- M+1) )
  • the characteristic column formed by ... until (a 1N , a 2N , a 3N ) constitutes a feature column.
  • step S103 the M importance degree values are smaller than the threshold value auxiliary features, and the P features are converted into P feature columns. That is, the original (a 1(N-M+1) , a 1(N-M+2) ... a 1N ), (a 2(N-M+1) , a 2(N-M+2) ...a 2N ), (a 3(N-M+1) , a 3(N-M+2) ...
  • This step S103 can be implemented, for example, by the minwise hashing algorithm.
  • step S103 is not limited to being performed by a minwise hashing algorithm, and principal component analysis algorithm (PCA), Linear Discriminant Analysis (LDa), local linear embedding (LLE), Laplace may also be used.
  • PCA principal component analysis algorithm
  • LDa Linear Discriminant Analysis
  • LLE local linear embedding
  • Laplace may also be used.
  • Algorithms such as feature maps (Laplacian Eigenmaps) are not particularly limited herein.
  • Step S104 combining (N-M) feature columns whose importance degree value is greater than or equal to the corresponding threshold value and P feature columns generated after the dimensionality reduction process, to obtain (N-M+P) feature columns;
  • the (NM) feature columns whose importance degree value determined in step S102 is greater than or equal to the corresponding threshold value may be merged with the P feature columns generated after the dimensionality reduction process to obtain the inclusion (N-M+).
  • the (N-M) feature columns whose importance is greater than or equal to the corresponding threshold are, for example:
  • auxiliary features generated after the above dimension reduction processing are:
  • A1" (a 11 , a 12 , ... a 1 (NM) , ... a 1 (N-M + P) )
  • A2" (a 21 , a 22 , ... a 2 (NM) , ... a 2 (N-M + P) )
  • A3" (a 31 , a 32 , ... a 3 (NM) , ... a 3 (N-M + P) )
  • the training data generated after the above combination may be referred to as a feature fingerprint.
  • the combined samples are input into a machine learning algorithm model, the machine learning algorithm model is trained, or a machine learning algorithm model is used for prediction.
  • the machine learning algorithm model may be a classification algorithm model or a regression algorithm model, such as a logistic regression (LR) algorithm model, a random forest algorithm model, a Gradient Boost Decision Tree algorithm model, and the like, which is not limited thereto.
  • the original feature dimension is reduced by retaining important features and reducing the dimension of the auxiliary features.
  • the dimension of the higher training data can achieve the purpose of controllable training characteristic parameters, greatly reduced training data, and improved operational efficiency when the dimensioned training data is input into the model for training.
  • the auxiliary features are reduced in dimension, and the degree of reduction of the prediction accuracy of the model is minimized.
  • the method of using the training data training model proposed by the present application is particularly effective in the training data of high-dimensional sparse features. For example, in the advertisement CTR data, through the above-mentioned changes, the AUC is compared on the 100 million feature data of the advertising CTR. The total training is increased by 2 ⁇ , and the data size is 1% of the original data.
  • FIG. 4 is a flowchart of a method for training a model using training data according to a second embodiment of the present application.
  • the method for training a model using the training data proposed in the second embodiment of the present application can be used to train various machine learning algorithm models.
  • the method for training a model using the training data proposed in the present application can be applied to training with high dimensional sparse features. data.
  • a high-dimensional sparse matrix such as a ratio of a total dimension to a dimension with a value of 100:1 or more than 1000:1.
  • the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns.
  • the method for training a model using training data may include the following steps:
  • the information value (Information Value, hereinafter referred to as IV value) or information gain (Information Gain, hereinafter referred to as IG value) can evaluate the importance of the feature column to the prediction accuracy of the model after training.
  • IV value Information Value
  • IG value information gain
  • the formula (1) to the formula (3) listed in step S101 can be used to calculate the IV by the above method.
  • the calculated IV value and/or IG value can be output.
  • Figure 3 shows a schematic diagram of the output.
  • col is the feature name
  • IV is the information value
  • IG is the information gain.
  • Step S202 determining whether the information value and/or the information gain of each feature column is less than a corresponding threshold
  • step S201 for example, whether the information value and/or the information gain is smaller than the corresponding threshold may be determined according to the information value and/or the information gain of each feature column calculated in step S201.
  • the IV value of each feature column may be determined according to the IV value of each feature column calculated in step S201 whether the IV value is less than a corresponding threshold.
  • the threshold corresponding to the IV value of the feature column is, for example, a first threshold B, and in this step, the IV value of each feature column is compared with the first threshold B.
  • a corresponding threshold may be determined according to the IG value of each feature column calculated in step S201.
  • the threshold corresponding to the IG value of the feature column is, for example, a second threshold C, and in this step, the IG value of each feature column is compared with the second threshold C.
  • the IV value and the IG value of each feature column are simultaneously smaller than the corresponding threshold. For example, for each feature column, it is determined whether the IV value of the feature column is smaller than the first threshold B, and it is determined whether the IG value of the feature column is smaller than the second threshold C.
  • Step S203 when it is determined that the information value and/or the information gain of the M feature columns in the N feature columns are smaller than When the threshold is corresponding, the M feature columns are subjected to dimensionality reduction processing to generate P feature columns, where M ⁇ N, and P ⁇ M;
  • this step by comparing the information value and/or the information gain with the corresponding threshold, it can be determined which features are listed as important features and which are listed as auxiliary features. That is, which feature columns have a greater influence on the prediction accuracy of the model after training, that is, can be regarded as an important feature, and which feature columns have little influence on the prediction accuracy of the model after training, that is, can be regarded as an auxiliary feature.
  • the comparison is performed only by the IV value, it can be considered that the feature column whose IV value is smaller than the above-described first threshold B is an auxiliary feature, and the feature column whose IV value is greater than or equal to the above-described first threshold B is an important feature.
  • the comparison is performed only by the IG value, it can be considered that the feature column whose IG value is smaller than the above-described second threshold C is an auxiliary feature, and the feature column whose IG value is greater than or equal to the above-described second threshold C is an important feature.
  • the feature column whose IV value is smaller than the first threshold B described above may be regarded as an auxiliary feature, or the feature column whose IG value is smaller than the second threshold C described above is an auxiliary feature, and only the IV value A feature column greater than or equal to the first threshold B described above and having an IG value greater than or equal to the second threshold C described above may be considered an important feature.
  • This step S203 can be implemented, for example, by the minwise hashing algorithm.
  • Step S204 combining (N-M) feature columns whose importance degree value is greater than or equal to the corresponding threshold value and P feature columns generated after the dimensionality reduction process, to obtain (N-M+P) feature columns;
  • the (NM) feature columns whose information value and/or information gain determined in step S202 are greater than or equal to the corresponding threshold value may be merged with the P feature columns generated after the dimensionality reduction process to obtain a new one. Training data.
  • the (N-M) feature columns whose information value and/or information gain is greater than or equal to the corresponding threshold are, for example:
  • auxiliary features generated after the above dimension reduction processing are:
  • A1" (a 11 , a 12 , ... a 1 (NM) , ... a 1 (N-M + P) )
  • A2" (a 21 , a 22 , ... a 2 (NM) , ... a 2 (N-M + P) )
  • A3" (a 31 , a 32 , ... a 3 (NM) , ... a 3 (N-M + P) )
  • the training data generated after the above combination may be referred to as a feature fingerprint.
  • the feature dimensions of the training data generated after the combination are (N-M+P), which is shorter than the original N.
  • the feature fingerprint can still fully reflect the original training data, and does not reduce the accuracy of the training.
  • the combined samples are input into a machine learning algorithm model, the machine learning algorithm model is trained, or a machine learning algorithm model is used for prediction.
  • the machine learning algorithm model may be a classification algorithm model or a regression algorithm model, such as a logistic regression (LR) algorithm model, a random forest algorithm model, a Gradient Boost Decision Tree algorithm model, and the like, which is not limited thereto.
  • the original feature dimension is reduced by retaining important features and reducing the dimension of the auxiliary features.
  • the dimension of the higher training data can achieve the purpose of controllable training characteristic parameters, greatly reduced training data, and improved operational efficiency when the dimensioned training data is input into the model for training.
  • the important features are retained in the method of the embodiment of the present application, and the auxiliary features are reduced in dimension, the feature fingerprint can still fully reflect the original training data, and the degree of reduction of the prediction accuracy of the model is minimized.
  • the method of using the training data training model proposed by the present application is particularly effective in the training data of high-dimensional sparse features.
  • the AUC is compared on the 100 million feature data of the advertising CTR.
  • the total training is increased by 2 ⁇ , and the data size is 1% of the original data.
  • the third embodiment of the present application provides a method for training a model using training data
  • FIG. 5 is a flowchart of a method for training a model using training data according to a third embodiment of the present application.
  • the method for training a model using the training data proposed in the third embodiment of the present application can be used to train various machine learning algorithm models.
  • the method for training a model using the training data proposed in the present application can be applied to training with high dimensional sparse features. data.
  • a high-dimensional sparse matrix such as a ratio of a total dimension to a dimension with a value of 100:1 or more than 1000:1.
  • the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns.
  • the method for training a model using training data may include the following steps:
  • the steps S301 and S305 may be the same as or similar to the steps S201 and S205 in the second embodiment, and details are not described herein again.
  • step S302 compared with step S102, in this embodiment, it is determined whether the importance level value is greater than the corresponding threshold value, and the specific determination manner is similar to step S102, and details are not described herein again.
  • step S303 for example, referring to the method in step S103, according to whether the importance degree value of each feature column obtained in step S302 is greater than a corresponding threshold, the plurality of feature columns are divided into important features and auxiliary features.
  • important features are, for example, a feature column composed of (a 11 , a 21 , a 31 ), and a feature column composed of (a 12 , a 22 , a 32 ).
  • the auxiliary feature is a characteristic column composed of the latter NQ column (a 1 (Q+1) , a 2 (Q+2) , a 3 (Q+3) )... until (a 1N , a 2N , a 3N ) constitutes a characteristic column.
  • step S303 the important features of the Q importance degree values greater than the threshold value may be subjected to the dimensioning process and converted into R feature columns. That is, the original (a 11 , a 12 ... a 1Q ), (a 21 , a 22 ... a 2Q ), (a 31 , a 32 ... a 3Q ) can be respectively subjected to the dimensioning process and converted into (a ' 11 , a' 12 ?? a' 1R ), (a' 21 , a' 22 ?? a' 2R ), (a' 31) , a' 32 ...... a' 3R ).
  • This step S303 can be implemented, for example, by the minwise hashing algorithm.
  • step S103 For the implementation of the algorithm, reference may be made to step S103, and details are not described herein again.
  • step S304 for example, the R feature columns generated after the dimensioning process and the (N-Q) feature columns whose importance value is less than or equal to the corresponding threshold value may be combined, and reference may be made to step S103, and details are not described herein again.
  • the above importance level value may be the information value or the information gain in the second embodiment. I will not repeat them here.
  • the method may further include:
  • step S304 the step of combining the R feature columns generated by the dimensioning process and the feature columns whose importance degree value is less than or equal to the corresponding threshold value may include, for example:
  • the R feature columns generated after the dimensioning process and the P feature columns generated after the dimension reduction process are combined to generate (R+P) feature columns.
  • step S305 for example, the combined (R+P) feature column training data may be input to a machine learning algorithm model, and the machine learning algorithm model may be trained.
  • the method for training a model using the training data proposed in the third embodiment of the present application by determining the importance value of each feature column, the method of upgrading the important features is adopted, and the importance level can be increased for the training data of a smaller scale. The higher the value of the training data, the problem of improving the accuracy of the model training.
  • a fourth embodiment of the present application discloses a system for training a model by using training data.
  • the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns, such as FIG. 6 is a schematic diagram showing a system for training a model using training data and training data according to a fourth embodiment of the present application.
  • the training system 400 includes:
  • a first calculation module 401 configured to calculate an importance degree value of each feature column
  • the first determining module 402 is configured to determine whether the importance level value of each feature column is less than a corresponding threshold
  • the first dimension reduction module 403 is configured to perform dimension reduction processing on the M feature columns to generate P features when determining that the importance degree value of the M feature columns in the N feature columns is less than a corresponding threshold value Column, where M ⁇ N, and P ⁇ M;
  • a first merging module 404 configured to combine (N-M) feature columns whose importance value is greater than or equal to a corresponding threshold value and P feature columns generated after the dimension reduction process;
  • the first training module 405 is configured to input the merged plurality of samples into a machine learning algorithm model, and train the machine learning algorithm model.
  • the system for training a training model is used to determine the importance level value of each feature column, and the method of retaining important features and reducing the dimension of the auxiliary features is used to reduce the training of the original feature dimension.
  • the dimension of the data when the training data of the dimensionality reduction is input into the model for training, can achieve the purpose of controllable training characteristic parameters, greatly reduced training data, and improved operational efficiency.
  • the important features are retained in the method of the embodiment of the present application, and the auxiliary features are reduced in dimension, the reduced-dimensional data can minimize the degree of reduction of the prediction accuracy of the model.
  • a fifth embodiment of the present application discloses a system for training a model by using training data.
  • the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns, such as FIG. 7 is a schematic diagram showing a system for training a model using training data and training data according to a fifth embodiment of the present application.
  • the training system 500 includes:
  • a first calculation module 501 configured to calculate an importance degree value of each feature column
  • the first determining module 502 is configured to determine whether the importance level value of each feature column is less than a corresponding threshold
  • the first dimension reduction module 503 is configured to perform dimension reduction processing on the M feature columns to generate P features when determining that the importance degree value of the M feature columns in the N feature columns is less than a corresponding threshold value Column, where M ⁇ N, and P ⁇ M;
  • the first merging module 504 is configured to combine (N-M) feature columns whose importance degree value is greater than or equal to the corresponding threshold value and P feature columns generated after the dimension reduction process;
  • the first training module 505 is configured to input the merged plurality of samples into a machine learning algorithm model, and train the machine learning algorithm model.
  • the training data further includes a tag value corresponding to each sample, the importance level being an information value and/or an information gain, and the calculating module 501 includes:
  • the information value calculation module 51 is configured to calculate the information value of the feature column by using the tag value corresponding to each sample and the plurality of features in the feature column; and/or
  • An information gain calculation module 52 configured to utilize a label value corresponding to each sample and a plurality of special features in the feature column The information gain of the feature column is calculated.
  • the threshold corresponding to the information value is a first threshold
  • the threshold corresponding to the information gain is a second threshold
  • the dimensionality reduction module is used to:
  • the machine learning algorithm model is a classification algorithm model or a regression algorithm model.
  • the system for training a training model is used to determine the information value and/or the information gain of each feature column, and the original feature dimension is reduced by retaining important features and reducing the auxiliary features.
  • the dimension of the higher training data can achieve the purpose of controllable training characteristic parameters, greatly reduced training data, and improved operational efficiency when the dimensioned training data is input into the model for training.
  • the important features are retained in the method of the embodiment of the present application, and the auxiliary features are reduced in dimension, the feature fingerprint can still fully reflect the original training data, and the degree of reduction of the prediction accuracy of the model is minimized.
  • the method of using the training data training model proposed by the present application is particularly effective in the training data of high-dimensional sparse features. For example, in the advertisement CTR data, through the above-mentioned changes, the AUC is compared on the 100 million feature data of the advertising CTR. The total training is increased by 2 ⁇ , and the data size is 1% of the original data.
  • a sixth embodiment of the present application discloses a system for training a model by using training data, where the training data includes a plurality of samples, each of which includes N features, and corresponding features of the plurality of samples constitute N feature columns, such as FIG. 8 is a schematic diagram showing a system for training a model using training data and training data according to a sixth embodiment of the present application.
  • the training system 600 includes:
  • a second calculation module 601 configured to calculate an importance degree value of each feature column
  • the second determining module 602 is configured to determine whether the importance level value of each feature column is less than a corresponding threshold value
  • the dimension-up module 603 is configured to perform the dimension-up processing on the Q feature columns to generate R feature columns when it is determined that the importance degree value of the Q feature columns in the N feature columns is greater than a corresponding threshold value.
  • a second merging module 604 configured to combine the R feature columns generated after the up-dimensional processing and the (N-Q) feature columns whose importance degree value is less than or equal to the corresponding threshold value, to obtain (R+N-Q) feature columns;
  • the second training module 605 is configured to input training data including the (R+N-Q) feature columns into a machine learning algorithm model, and train the machine learning algorithm model.
  • the dimensioning module 603 is configured to:
  • the machine learning algorithm model is a classification algorithm model or a regression algorithm model.
  • system further includes:
  • the second dimension reduction module 602a is configured to perform dimension reduction processing on the M feature columns to generate P features when determining that the importance degree value of the M feature columns in the N feature columns is less than a corresponding threshold value Column, where M ⁇ N, and P ⁇ M;
  • the second merge module 604 is configured to:
  • the R feature columns generated after the dimensioning process and the P feature columns generated after the dimension reduction process are combined.
  • the system for training a model using training data can improve the importance of small-scale training data by judging the importance value of each feature column and adopting a method of upgrading important features. The higher the value of the training data, the problem of improving the accuracy of the model training.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can 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, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology for signal storage.
  • the signals can be computer readable instructions, data structures, modules of programs, 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 storage.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technology
  • CD-ROM compact disc
  • DVD digital versatile disc
  • magnetic tape cartridge magnetic tape storage or other magnetic storage device or any other non-transporting medium that can be used to store signals that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Algebra (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Electrically Operated Instructional Devices (AREA)
  • Complex Calculations (AREA)

Abstract

一种利用训练数据训练模型的方法和训练系统,所述训练数据包括多个样本,每个样本包括N个特征,每个样本中的特征构成N个特征列,所述方法包括:计算每个特征列的重要程度值(S101);判断每个特征列的重要程度值是否小于对应的阈值(S102);当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M(S103);将重要程度值大于或等于对应的阈值的特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列(S104);将包括 (N-M+P)个特征列的训练数据输入机器学习算法模型,训练机器学习算法模型(S105)。本方法和系统能够对重要特征和辅助特征进行区别处理,达到训练特征参数可控,并提高模型训练的准确性的目的。

Description

一种利用训练数据训练模型的方法和训练系统
本申请要求2016年02月25日递交的申请号为201610105840.3、发明名称为“一种利用训练数据训练模型的方法和训练系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理领域,尤其涉及一种利用训练数据训练模型的方法和训练系统。
背景技术
在数据挖掘的业务场景中,经常需要利用大规模的训练数据训练机器学习算法模型,进行分类或者回归计算。只有用大量数据训练该机器学习算法模型之后,才有可能获得预测精度较高的该算法模型,进而才能在后续根据输入的数据进行各种行为的预测。
在当前互联网的环境下,训练数据的数据规模经常达到数十亿甚至上千亿,每个训练数据的特征规模随着业务扩展,也会到一个非常大的数量级。
以CTR(Click-Through Rate)预估为例,CTR预估是互联网计算广告中的关键环节,预估准确性直接影响公司广告收入。CTR预估使用特定的算法模型,输入该算法模型进行计算的训练数据可能达到千亿规模,每个训练数据的特征维度也可能达到百亿的规模。如此庞大的规模输入算法模型中,容易造成机器学习算法模型的计算难度增大、效率降低。
为了减少计算难度并提高计算的效率,常规的解决方案是使用并行计算的方式处理训练数据,例如使用LR(Logistic Regression)模型进行处理。LR是广义线性模型,可以进行并行化处理,即将原本海量的训练数据分发到N个不同的计算处理器(worker)中计算,每个计算处理器处理的数据量为总数据量的1/N。
利用上述方式可以对一定数量级的数据进行处理,但是对于百亿特征*千亿数据的规模下,数据总量可能超过PB级别,超出了一般计算集群的计算范围。即使可以利用超大规模的计算集群进行计算,得到最终最优结果的时间也非常长,导致运行效率低,满足不了业务的更新需求。
另外,在一种相反的情况下,训练数据可能会存在维度过低、数据量过小的问题, 同样影响机器学习模型的训练精度。
发明内容
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的利用训练数据训练模型的方法和训练系统。
为解决上述问题,本申请一实施例公开一种利用训练数据训练模型的方法,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,所述训练方法包括:
计算每一个特征列的重要程度值;
判断每一个特征列的重要程度值是否小于对应的阈值;
当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;以及
将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
本申请另一实施例公开一种利用训练数据训练模型的方法,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,所述训练方法包括:
计算每一个特征列的重要程度值;
判断每一个特征列的重要程度值是否大于对应的阈值;
当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的(N-Q)个特征列合并,得到(R+N-Q)个特征列;以及
将包括所述(R+N-Q)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
本申请再一实施例公开一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,所述训练系统包括:
第一计算模块,用于计算每一个特征列的重要程度值;
第一判断模块,用于判断每一个特征列的重要程度值是否小于对应的阈值;
第一降维模块,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
第一合并模块,用于将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;以及
第一训练模块,用于将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
本申请再另一实施例公开一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,所述训练系统包括:
第二计算模块,用于计算每一个特征列的重要程度值;
第二判断模块,用于判断每一个特征列的重要程度值是否大于对应的阈值;
升维模块,用于当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
第二合并模块,用于将将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的(N-Q)个特征列合并,得到(R+N-Q)个特征列;以及
第二训练模块,用于将包括所述(R+N-Q)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
本申请实施例至少具有以下优点:
本申请实施例通过判断每一个特征列的重要程度值,对重要特征和辅助特征进行区别处理,采用保留重要特征、将辅助特征进行降维的方式,或者对应地采用将重要特征升维的方式,对于较大规模的训练数据,能够降低原本特征维度较高的训练数据的维度,在将该降维后的训练数据输入模型进行训练时,能够达到训练特征参数可控、训练数据大幅降低、运行效率提升的目的。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,最大限度地减小了该模型的预测准确度的降低程度。同时,本申请实施例通过判断每一个特征列的重要程度值,对于较小规模的训练数据,能够升高重要程度值较高的训练数据的维度,能够达到训练特征参数可控、提高模型训练的准确性的问题。
附图说明
图1是本申请实施例的训练数据的示意图;
图2是本申请第一实施例的利用训练数据训练模型的方法的流程图;
图3是本申请实施例的特征列的重要程度值输出的结果的示意图;
图4是本申请第二实施例的利用训练数据训练模型的方法的流程图;
图5是本申请第三实施例的利用训练数据训练模型的方法的流程图;
图6是本申请第四实施例的利用训练数据训练模型的系统的方框图;
图7是本申请第五实施例的利用训练数据训练模型的系统的方框图;
图8是本申请第六实施例的利用训练数据训练模型的系统的方框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的核心思想之一在于,提出一种利用训练数据训练模型的方法和系统,该方法或系统中首先进行特征列选择,通过计算每一个特征列的重要程度值并判断每一个特征列的重要程度值是否小于对应的阈值,选择出重要特征列和辅助特征列。之后将多个辅助特征列进行降维处理,最后将重要特征列和降维处理后的辅助特征列合并,并输入机器学习算法模型,对机器学习算法模型进行训练。
第一实施例
本申请第一实施例提出一种利用训练数据训练模型的方法,图1是本申请一实施例的训练数据的示意图。图2是利用训练数据训练模型的方法的流程图。本申请第一实施例提出的利用训练数据训练模型的方法可以用于训练各种机器学习算法模型,特别地,本申请第一实施例提出的利用训练数据训练模型的方法可以应用于具有高维稀疏特征的训练数据。如图1所示,所述的训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列。
如图2所示,本申请第一实施例的利用训练数据训练模型的方法可以包括如下步骤:
S101,计算每一个特征列的重要程度值;
在这一步骤中,该重要程度值用于评估该特征列对该模型在训练后的预测准确度的重要程度。举例来说,该重要程度值可以是该特征列的信息值IV(Information Value,后称IV值)或信息增益IG(Information Gain,后称IG值)。
当该重要程度值为该特征列的信息值IV时,举例来说,以二分模型为例,可以通过如下公式计算:
WoE=ln(pctlGood/pctlbad)       (1)
MIV=WoE*(pctlGood-pctlbad)  (2)
IV∑MIV              (3)
该二分模型可以为国外广泛使用的信用卡评分模型,该二分模型尤其在信用风险评估以及金融风险控制领域更是得到了广泛的使用,其原理是将模型变量WoE编码方式离散化之后运用logistic回归模型进行的一种二分类变量的广义线性模型。在该模型中,每一个训练数据即是每一个信用卡用户的信息,该训练数据包括多个特征,例如信用卡用户的年龄、职业、性别等。每一个训练数据对应一个标签值,当该信用卡用户为违约用户时,该标签值记为1,当该信用卡用户为正常用户时,该标签值记为0。
在上述公式(1)中,WoE为显著性权重(Weight of Evidence),计算IV值之前首先需要进行WoE值计算。
公式(1)中的pctlGood和pctlBad分别是通过多个训练数据的特征列中的特征以及每一个数据对应的标签值计算得出。其中pctlGood表示将某一特征列(例如“信用卡用户的年龄”)进行离散处理后,每一个区间内对应的标签值为1的信用卡用户个数与全部区间内对应的标签值为1的信用卡用户个数,pctlBad表示每一个区间内对应的标签值为0的信用卡用户个数与全部区间内对应的标签值为0的信用卡用户个数。
例如,表1所示为将信用卡用户的年龄进行离散处理后获得的每个年龄区间对应的WoE值。
Age #Good #Bad WoE
0-10 50 200 =ln((50/100)/(200/1000))=ln((50/200)/(100/1000))
10-18 20 200 =ln((20/100)/(200/1000))=ln((20/200)/(100/1000))
18-35 5 200 =ln((5/100)/(200/1000))=ln((5/200)/(100/1000))
35-50 15 200 =ln((15/100)/(200/1000))=ln((15/200)/(100/1000))
50以上 10 200 =ln((10/100)/(200/1000))=ln((10/200)/(100/1000))
汇总 100 1000  
表1
在完成WoE计算之后,通过公式(2)计算出针对每个年龄区间的MIV值,再通过公式(3)计算出每个年龄区间的MIV值的总和,从而得出该特征列的全部年龄区间的IV值。
当该重要程度值为该特征列的信息增益IG时,该信息增益Gain(S,A)被定义为:
Figure PCTCN2017073340-appb-000001
在上述公式(4)中,其中Entropy(S)为数据集合S的熵,V(A)是某一特征列A所有可能值的集合,Sv是S中某一特征列A的值为v的子集,权值为某一特征列Sv的样例占原始样例S的比例|Sv|/|S|,即Gain(S,A)是由于给定特征列A的值而得到的关于目标函数值的信息。
在计算出IV值和/或IG值之后,可以对计算获得的IV值和/或IG值进行输出。图3所示为输出的结果的示意图,图3中,col列为特征名,IV为信息值,IG为信息增益。
以上对每一个特征列的IV值和IG值的计算方法进行了举例描述。本领域技术人员应当可以明确的是,本领域还有其他多种能够用于评估该特征列对该模型在训练后的预测准确度的重要程度的值,并且计算方法也多种多样,本申请并不特别限制该重要程度值的类型和计算方法。
步骤S102,判断每一个特征列的重要程度值是否小于对应的阈值;
在这一步骤中,举例来说,可以根据步骤S101中计算出的每一个特征列的重要程度值,判断该重要程度值是否小于对应的阈值。
例如,可以根据步骤S101中计算出的每一特征列的IV值,判断该IV值是否小于对应的阈值。特征列的IV值对应的阈值例如为第一阈值B,在这一步骤中,用每一个特征列的IV值与该第一阈值B进行比较。
同样地,可以根据步骤S101中计算出的每一特征列的IG值,判断该IG值是否小于对应的阈值。特征列的IG值对应的阈值例如为第二阈值C,在这一步骤中,用每一个特征列的IG值与该第二阈值C进行比较。
此外,还可以同时判断每一个特征列的IV值和IG值是否同时小于对应的阈值。例如,针对每一个特征列,判断该特征列的IV值是否小于上述的第一阈值B,再判断该特征列的IG值是否小于上述的第二阈值C。
步骤S103,当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
在这一步骤中,通过信息值和/或信息增益与对应的阈值比较,可以确定哪些特征列为重要特征,哪些特征列为辅助特征。即,哪些特征列对该模型在训练后的预测准确度影响较大,即可以视为重要特征,哪些特征列对该模型在训练后的预测准确度影响较小,即可以视为辅助特征。
如果仅用IV值进行比较,则可以认为IV值小于上述的第一阈值B的特征列为辅助特征,IV值大于或等于上述的第一阈值B的特征列为重要特征。
如果仅用IG值进行比较,则可以认为IG值小于上述的第二阈值C的特征列为辅助特征,IG值大于或等于上述的第二阈值C的特征列为重要特征。
如果同时用IV值和IG值进行比较,则可以认为IV值小于上述的第一阈值B的特征列为辅助特征,或者IG值小于上述的第二阈值C的特征列为辅助特征,只有IV值大于或等于上述的第一阈值B,且IG值大于或等于上述的第二阈值C的特征列才可以认为是重要特征。
以下通过一个示例,描述将所述M个信息值和/或信息增益小于对应阈值的特征列进行降维处理的步骤。
某个训练数据包括三个样本,每个样本包括N个特征,三个样本分别为:
A1(a11,a12,a13,……a1N)
A2(a21,a22,a23,……a2N)
A3(a31,a32,a33,……a3N)
在步骤S101中计算每一个特征列的重要程度值的步骤,例如是计算a11,a21,a31构成的特征列的信息值和/或信息增益、a12,a22,a32构成的特征列的信息值和/或信息增益、a13,a23,a33构成的特征列的信息值和/或信息增益,直到a1N,a2N,a3N构成的特征列的信息值和/或信息增益。
在步骤S103中,根据步骤S102中得出的每一个特征列的重要程度值是否小于对应的阈值,将多个特征列分为重要特征和辅助特征。在本示例中,重要特征例如是(a11,a21,a31)构成的特征列,以及(a12,a22,a32)构成的特征列…..直到(a1(N-M),a2(N-M),a3(N-M))构成的特征列;辅助特征是后M列即(a1(N-M+1),a2(N-M+1),a3(N-M+1))构成的特征列……直到(a1N,a2N,a3N)构成的特征列。
在步骤S103中,可以将M个重要程度值小于阈值得辅助特征进行降维处理,转换 成P个特征列。即,原先的(a1(N-M+1),a1(N-M+2)……a1N)、(a2(N-M+1),a2(N-M+2)……a2N)、(a3(N-M+1),a3(N-M+2)……a3N)可以分别经过降维处理,转换为(a’1(N-M+1),a’1(N-M+2)……a’1 (N-M+P))、(a’2(N-M+1),a’2(N-M+2)……a’2(N-M+P))、(a’3(N-M+1),a’3(N-M+2)……a’3(N-M+P))。
这一步骤S103例如可以通过minwise hashing算法实现。minwise hashing算法广泛的应用于海量数据下的信息检索,在这一算法中,将(b=64位)缩小到b位,降低了存储空间和计算时间。
该算法的实现例如为:
Figure PCTCN2017073340-appb-000002
通过minwise hashing算法后,原先辅助特征被转化为一个k*2b维度的向量,其中k,b为算法指定参数,即,步骤S103中的P=k*2b
另外,正如本领域技术人员所知,步骤S103并不限于通过minwise hashing算法完成,同样可以使用主成分分析算法(PCA)、Linear Discriminant Analysis(LDa)、局部线性嵌入(LLE)、拉普拉斯特征映射(Laplacian Eigenmaps)等算法,在此并不特别限定。
步骤S104,将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;
在这一步骤中,可以将步骤S102中判断出的重要程度值大于或等于对应的阈值的(N-M)个特征列与降维处理后生成的P个特征列合并,得到包括(N-M+P)个特征列的新的训练数据。
举例来说,重要程度大于或等于对应阈值的(N-M)个特征列例如为:
A1”(a11,a12……a1(N-M))
A2”(a21,a22……a2(N-M))
A3”(a31,a32……a3(N-M)),
上述降维处理后生成的辅助特征为:
A1”’(a’1(N-M+1),a’1(N-M+2)……a’1(N-M+P))
A2”’(a’2(N-M+1),a’2(N-M+2)……a’2(N-M+P))
A3”’(a’3(N-M+1),a’3(N-M+2)……a’3(N-M+P))
将上述重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并的结果为:
A1””(a11,a12,……a1(N-M),……a1(N-M+P))
A2””(a21,a22,……a2(N-M),……a2(N-M+P))
A3””(a31,a32,……a3(N-M),……a3(N-M+P))
上述合并后生成的训练数据可以称为特征指纹。合并后生成的训练数据的特征维度为(N-M+P)个,短于原先的N个。以训练数据包括1亿特征列为例,取k=200,b=12,重要特征取前10000个特征列,所生成特征列为
2000*2^12+10000=829100个,降维比约为829100/1000000000=0.008292,特征和数据不到原先的1%。
S105,将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
在这一步骤中,将合并后的多个样本输入机器学习算法模型,对机器学习算法模型进行训练,或者使用机器学习算法模型进行预测。机器学习算法模型可以是分类算法模型或回归算法模型,例如逻辑回归(LR)算法模型、随机森林算法模型、Gradient Boost Decision Tree算法模型等等,本申请并不以此为限。
根据本申请第一实施例提出的利用训练数据训练模型的方法,通过判断每一个特征列的信息值和/或信息增益,采用保留重要特征、将辅助特征进行降维的方式,降低原本特征维度较高的训练数据的维度,在将该降维后的训练数据输入模型进行训练时,能够达到训练特征参数可控、训练数据大幅降低、运行效率提升的目的。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,最大限度地减小了该模型的预测准确度的降低程度。本申请提出的利用训练数据训练模型的方法应用在高维稀疏特征的训练数据中的效果尤其明显,例如在广告CTR数据中,通过上述的改动,在广告CTR的1亿特征数据上,AUC较全量训练提升2‰,数据大小为原先数据量1%。
第二实施例
本申请第二实施例提出一种利用训练数据训练模型的方法,图4所示为本申请第二实施例的利用训练数据训练模型的方法的流程图。本申请第二实施例提出的利用训练数据训练模型的方法可以用于训练各种机器学习算法模型,特别地,本申请提出的利用训练数据训练模型的方法可以应用于具有高维稀疏特征的训练数据。高维稀疏矩阵,例如总维度与有数值的维度的比例为100:1或者1000:1以上。所述的训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列。
如图4所示,本申请第二实施例的利用训练数据训练模型的方法可以包括如下步骤:
S201,计算每一个特征列的信息值和/或信息增益;
在这一步骤中,该信息值(Information Value,后称IV值)或信息增益(Information Gain,后称IG值)均能够评估该特征列对该模型在训练后的预测准确度的重要程度。
当该重要程度值为该特征列的信息值IV时,举例来说,以二分模型为例,可以通过步骤S101中列出的公式(1)至公式(3)计算,通过上述方法计算出IV值和/或IG值之后,可以对计算获得的IV值和/或IG值进行输出。图3所示为输出的结果的示意图,图3中,col列为特征名,IV为信息值,IG为信息增益。
步骤S202,判断每一个特征列的信息值和/或信息增益是否小于对应的阈值;
在这一步骤中,举例来说,可以根据步骤S201中计算出的每一个特征列的信息值和/或信息增益,判断该信息值和/或信息增益是否小于对应的阈值。
例如,可以根据步骤S201中计算出的每一特征列的IV值,判断该IV值是否小于对应的阈值。特征列的IV值对应的阈值例如为第一阈值B,在这一步骤中,用每一个特征列的IV值与该第一阈值B进行比较。
同样地,可以根据步骤S201中计算出的每一特征列的IG值,判断该IG值是否小于对应的阈值。特征列的IG值对应的阈值例如为第二阈值C,在这一步骤中,用每一个特征列的IG值与该第二阈值C进行比较。
此外,还可以同时判断每一个特征列的IV值和IG值是否同时小于对应的阈值。例如,针对每一个特征列,判断该特征列的IV值是否小于上述的第一阈值B,再判断该特征列的IG值是否小于上述的第二阈值C。
步骤S203,当判断出所述N个特征列中的M个特征列的信息值和/或信息增益小于 对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
在这一步骤中,通过信息值和/或信息增益与对应的阈值比较,可以确定哪些特征列为重要特征,哪些特征列为辅助特征。即,哪些特征列对该模型在训练后的预测准确度影响较大,即可以视为重要特征,哪些特征列对该模型在训练后的预测准确度影响较小,即可以视为辅助特征。
如果仅用IV值进行比较,则可以认为IV值小于上述的第一阈值B的特征列为辅助特征,IV值大于或等于上述的第一阈值B的特征列为重要特征。
如果仅用IG值进行比较,则可以认为IG值小于上述的第二阈值C的特征列为辅助特征,IG值大于或等于上述的第二阈值C的特征列为重要特征。
如果同时用IV值和IG值进行比较,则可以认为IV值小于上述的第一阈值B的特征列为辅助特征,或者IG值小于上述的第二阈值C的特征列为辅助特征,只有IV值大于或等于上述的第一阈值B,且IG值大于或等于上述的第二阈值C的特征列才可以认为是重要特征。
这一步骤S203例如可以通过minwise hashing算法实现。minwise hashing算法广泛的应用于海量数据下的信息检索,在这一算法中国,将(b=64位)缩小到b位,降低了存储空间和计算时间。
该算法可以使用与第一实施例提出的具体实现方式来实现,在此不再赘述。
通过minwise hashing算法后,原先辅助特征被转化为一个k*2b维度的向量,其中k,b为算法指定参数,即,步骤S203中的P=k*2b
步骤S204,将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;
在这一步骤中,可以将步骤S202中判断出的信息值和/或信息增益大于或等于对应的阈值的(N-M)个特征列与降维处理后生成的P个特征列合并,得到新的训练数据。
举例来说,信息值和/或信息增益大于或等于对应阈值的(N-M)个特征列例如为:
A1”(a11,a12……a1(N-M))
A2”(a21,a22……a2(N-M))
A3”(a31,a32……a3(N-M)),
上述降维处理后生成的辅助特征为:
A1”’(a’1(N-M+1),a’1(N-M+2)……a’1(N-M+P))
A2”’(a’2(N-M+1),a’2(N-M+2)……a’2(N-M+P))
A3”’(a’3(N-M+1),a’3(N-M+2)……a’3(N-M+P))
将上述信息值和/或信息增益大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并的结果为:
A1””(a11,a12,……a1(N-M),……a1(N-M+P))
A2””(a21,a22,……a2(N-M),……a2(N-M+P))
A3””(a31,a32,……a3(N-M),……a3(N-M+P))
上述合并后生成的训练数据可以称为特征指纹。合并后生成的训练数据的特征维度为(N-M+P)个,短于原先的N个。以训练数据包括1亿特征列为例,取k=200,b=12,重要特征取前10000个特征列,所生成特征列为2000*2^12+10000=829100个,降维比约为829100/1000000000=0.008292,特征和数据不到原先的1%。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,该特征指纹仍然可以全面反映原先的训练数据,并不会降低训练的准确度。
S205,将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
在这一步骤中,将合并后的多个样本输入机器学习算法模型,对机器学习算法模型进行训练,或者使用机器学习算法模型进行预测。机器学习算法模型可以是分类算法模型或回归算法模型,例如逻辑回归(LR)算法模型、随机森林算法模型、Gradient Boost Decision Tree算法模型等等,本申请并不以此为限。
根据本申请第二实施例提出的利用训练数据训练模型的方法,通过判断每一个特征列的信息值和/或信息增益,采用保留重要特征、将辅助特征进行降维的方式,降低原本特征维度较高的训练数据的维度,在将该降维后的训练数据输入模型进行训练时,能够达到训练特征参数可控、训练数据大幅降低、运行效率提升的目的。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,该特征指纹仍然可以全面反映原先的训练数据,最大限度地减小了该模型的预测准确度的降低程度。本申请提出的利用训练数据训练模型的方法应用在高维稀疏特征的训练数据中的效果尤其明显,例如在广告CTR数据中,通过上述的改动,在广告CTR的1亿特征数据上,AUC较全量训练提升2‰,数据大小为原先数据量1%。
第三实施例
本申请第三实施例提出一种利用训练数据训练模型的方法,图5所示为本申请第三实施例的利用训练数据训练模型的方法的流程图。本申请第三实施例提出的利用训练数据训练模型的方法可以用于训练各种机器学习算法模型,特别地,本申请提出的利用训练数据训练模型的方法可以应用于具有高维稀疏特征的训练数据。高维稀疏矩阵,例如总维度与有数值的维度的比例为100:1或者1000:1以上。所述的训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列。
如图5所示,本申请第三实施例的利用训练数据训练模型的方法可以包括如下步骤:
S301,计算每一个特征列的重要程度值;
S302,判断每一个特征列的重要程度值是否大于对应的阈值;
S303,当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
S304,将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的特征列合并;以及
S305,将合并的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
其中,步骤S301和步骤S305可与第二实施例中的步骤S201和S205相同或相似,在此不再赘述。
在步骤S302中,相比于步骤S102,本实施例中是判断重要程度值是否大于对应的阈值,具体的判断方式与步骤S102相似,在此不再赘述。
在步骤S303中,例如可以参考步骤S103中的方法,根据步骤S302中得出的每一个特征列的重要程度值是否大于对应的阈值,将多个特征列分为重要特征和辅助特征。在本示例中,重要特征例如是(a11,a21,a31)构成的特征列,以及(a12,a22,a32)构成的特征列…..直到(a1Q,a2Q,a3Q)构成的特征列;辅助特征是后N-Q列即(a1(Q+1),a2(Q+2),a3(Q+3))构成的特征列……直到(a1N,a2N,a3N)构成的特征列。
在步骤S303中,可以将Q个重要程度值大于阈值的重要特征进行升维处理,转换成R个特征列。即,原先的(a11,a12……a1Q)、(a21,a22……a2Q)、(a31,a32……a3Q)可以分别经过升维处理,转换为(a’11,a’12……a’1R)、(a’21,a’22……a’2R)、(a’31),a’32……a’3R)。
这一步骤S303例如可以通过minwise hashing算法实现。minwise hashing算法广泛的应用于海量数据下的信息检索,在这一算法中,通过参数的设定,将(b=64位)扩大到b位,提升重要特征的维度。
该算法的实现可以参考步骤S103所述,在此不再赘述。
在S304中,例如可以将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的(N-Q)个特征列合并,可以参考步骤S103,在此不再赘述。
另外,在步骤S303中,当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,可以利用minwise Hashing算法对所述Q个特征列进行升维处理,生成R个特征列,其中R=k*2b,k和b为算法指定参数。
优选地,上述重要程度值可以为第二实施例中的信息值或信息增益。在此不再赘述。
另外,在步骤S302之后,该方法还可以包括:
S302a,当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
步骤S304即将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的特征列合并的步骤例如可以包括:
将升维处理后生成的R个特征列和所述降维处理后生成的P个特征列合并,生成(R+P)个特征列。
在步骤S305中,例如,可以将上述合并的(R+P)个特征列训练数据输入机器学习算法模型,训练所述机器学习算法模型。
根据本申请第三实施例提出的利用训练数据训练模型的方法,通过判断每一个特征列的重要程度值,采用将重要特征升维的方式,对于较小规模的训练数据,能够升高重要程度值较高的训练数据的维度,提高模型训练的准确性的问题。
第四实施例
本申请第四实施例公开一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,如图6所示为本申请第四实施例的利用训练数据训练模型的系统以及训练数据的示意图。所述训练系统400包括:
第一计算模块401,用于计算每一个特征列的重要程度值;
第一判断模块402,用于判断每一个特征列的重要程度值是否小于对应的阈值;
第一降维模块403,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
第一合并模块404,用于将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并;以及
第一训练模块405,用于将合并后的所述多个样本输入机器学习算法模型,训练所述机器学习算法模型。
根据本申请第四实施例提出的利用训练数据训练模型的系统,通过判断每一个特征列的重要程度值,采用保留重要特征、将辅助特征进行降维的方式,降低原本特征维度较高的训练数据的维度,在将该降维后的训练数据输入模型进行训练时,能够达到训练特征参数可控、训练数据大幅降低、运行效率提升的目的。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,降维后的数据能够最大限度地减小了该模型的预测准确度的降低程度。
第五实施例
本申请第五实施例公开一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,如图7所示为本申请第五实施例的利用训练数据训练模型的系统以及训练数据的示意图。所述训练系统500包括:
第一计算模块501,用于计算每一个特征列的重要程度值;
第一判断模块502,用于判断每一个特征列的重要程度值是否小于对应的阈值;
第一降维模块503,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
第一合并模块504,用于将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并;以及
第一训练模块505,用于将合并后的所述多个样本输入机器学习算法模型,训练所述机器学习算法模型。
在一优选实施例中,所述训练数据还包括对应于每一个样本的标签值,所述重要程度值为信息值和/或信息增益,所述计算模块501包括:
信息值计算模块51,用于利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息值;和/或
信息增益计算模块52,用于利用每一个样本对应的标签值和所述特征列中的多个特 征,计算出所述特征列的信息增益。
在一优选实施例中,所述信息值对应的阈值为第一阈值,所述信息增益对应的阈值为第二阈值。
在一优选实施例中,所述降维模块用于:
利用minwise Hashing算法对所述M个特征列进行降维处理,生成P个特征列,其中P=k*2b,k和b为算法指定参数。
在一优选实施例中,所述机器学习算法模型为分类算法模型或回归算法模型。
根据本申请第五实施例提出的利用训练数据训练模型的系统,通过判断每一个特征列的信息值和/或信息增益,采用保留重要特征、将辅助特征进行降维的方式,降低原本特征维度较高的训练数据的维度,在将该降维后的训练数据输入模型进行训练时,能够达到训练特征参数可控、训练数据大幅降低、运行效率提升的目的。同时由于本申请实施例的方法中保留了重要特征,而对辅助特征进行降维,该特征指纹仍然可以全面反映原先的训练数据,最大限度地减小了该模型的预测准确度的降低程度。本申请提出的利用训练数据训练模型的方法应用在高维稀疏特征的训练数据中的效果尤其明显,例如在广告CTR数据中,通过上述的改动,在广告CTR的1亿特征数据上,AUC较全量训练提升2‰,数据大小为原先数据量1%。
第六实施例
本申请第六实施例公开一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,如图8所示为本申请第六实施例的利用训练数据训练模型的系统以及训练数据的示意图。所述训练系统600包括:
第二计算模块601,用于计算每一个特征列的重要程度值;
第二判断模块602,用于判断每一个特征列的重要程度值是否小于对应的阈值;
升维模块603,用于当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
第二合并模块604,用于将将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的(N-Q)个特征列合并,得到(R+N-Q)个特征列;以及
第二训练模块605,用于将包括所述(R+N-Q)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
在一优选实施例中,所述升维模块603用于:
利用minwise Hashing算法对所述Q个特征列进行升维处理,生成R个特征列,其中R=k*2b,k和b为算法指定参数。
在一优选实施例中,所述机器学习算法模型为分类算法模型或回归算法模型。
在一优选实施例中,所述系统还包括:
第二降维模块602a,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
所述第二合并模块604用于:
所述将升维处理后生成的R个特征列和所述降维处理后生成的P个特征列合并。
根据本申请第六实施例提出的利用训练数据训练模型的系统,通过判断每一个特征列的重要程度值,采用将重要特征升维的方式,对于较小规模的训练数据,能够升高重要程度值较高的训练数据的维度,提高模型训练的准确性的问题。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信号存储。信号可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储 器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信号。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备 中还存在另外的相同要素。
以上对本申请所提供的一种利用训练数据训练模型的方法和系统,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (18)

  1. 一种利用训练数据训练模型的方法,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,其特征在于,所述训练方法包括:
    计算每一个特征列的重要程度值;
    判断每一个特征列的重要程度值是否小于对应的阈值;
    当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
    将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;以及
    将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
  2. 如权利要求1所述的训练模型的方法,其特征在于,当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述多个特征列进行降维处理,生成P个特征列的步骤包括:
    当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,利用minwise Hashing算法对所述M个特征列进行降维处理,生成P个特征列,其中P=k*2b,k和b为算法指定参数。
  3. 如权利要求1所述的训练模型的方法,其特征在于,所述训练数据还包括对应于每一个样本的标签值,所述计算每一个特征列的重要程度值的步骤包括:
    利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息值和/或信息增益,以所述信息值和/或信息增益作为重要程度值。
  4. 如权利要求3所述的训练模型的方法,其特征在于,所述信息值对应的阈值为第一阈值,所述信息增益对应的阈值为第二阈值。
  5. 如权利要求1所述的训练模型的方法,其特征在于,所述机器学习算法模型为分类算法模型或回归算法模型。
  6. 一种利用训练数据训练模型的方法,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,其特征在于,所述训练方法包括:
    计算每一个特征列的重要程度值;
    判断每一个特征列的重要程度值是否大于对应的阈值;
    当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
    将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的特征列合并;以及
    将合并的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
  7. 如权利要求6所述的训练模型的方法,其特征在于,当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列的步骤包括:
    当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,利用minwise Hashing算法对所述Q个特征列进行升维处理,生成R个特征列,其中R=k*2b,k和b为算法指定参数。
  8. 如权利要求6所述的训练模型的方法,其特征在于,所述训练数据还包括对应于每一个样本的标签值,所述计算每一个特征列的重要程度值的步骤包括:
    利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息值和/或信息增益,以所述信息值和/或信息增益作为重要程度值。
  9. 如权利要求6所述的训练模型的方法,其特征在于,所述判断每一个特征列的重要程度值是否大于对应的阈值的步骤之后,所述方法还包括:
    当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
    所述将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的特征列合并的步骤包括:
    将升维处理后生成的R个特征列和所述降维处理后生成的P个特征列合并。
  10. 一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,其特征在于,所述训练系统包括:
    第一计算模块,用于计算每一个特征列的重要程度值;
    第一判断模块,用于判断每一个特征列的重要程度值是否小于对应的阈值;
    第一降维模块,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M; 第一合并模块,用于将重要程度值大于或等于对应的阈值的(N-M)个特征列和降维处理后生成的P个特征列合并,得到(N-M+P)个特征列;以及
    第一训练模块,用于将包括所述(N-M+P)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
  11. 如权利要求10所述的训练模型的系统,其特征在于,所述降维模块用于:
    利用minwise Hashing算法对所述M个特征列进行降维处理,生成P个特征列,其中P=k*2b,k和b为算法指定参数。
  12. 如权利要求10所述的训练模型的系统,其特征在于,所述训练数据还包括对应于每一个样本的标签值,所述第一计算模块包括:
    信息值计算模块,用于利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息值,以所述信息值作为所述重要程度值;和/或
    信息增益计算模块,用于利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息增益,以所述信息增益作为所述重要程度值。
  13. 如权利要求12所述的训练模型的系统,其特征在于,所述信息值对应的阈值为第一阈值,所述信息增益对应的阈值为第二阈值。
  14. 如权利要求10所述的训练模型的系统,其特征在于,所述机器学习算法模型为分类算法模型或回归算法模型。
  15. 一种利用训练数据训练模型的系统,所述训练数据包括多个样本,每一个样本包括N个特征,所述多个样本中对应的特征构成N个特征列,其特征在于,所述训练系统包括:
    第二计算模块,用于计算每一个特征列的重要程度值;
    第二判断模块,用于判断每一个特征列的重要程度值是否大于对应的阈值;
    升维模块,用于当判断出所述N个特征列中的Q个特征列的重要程度值大于对应的阈值时,将所述Q个特征列进行升维处理,生成R个特征列,其中R>Q,且Q<N;
    第二合并模块,用于将将升维处理后生成的R个特征列和重要程度值小于或等于对应的阈值的(N-Q)个特征列合并,得到(R+N-Q)个特征列;以及
    第二训练模块,用于将包括所述(R+N-Q)个特征列的训练数据输入机器学习算法模型,训练所述机器学习算法模型。
  16. 如权利要求15所述的训练模型的系统,其特征在于,所述升维模块用于:
    利用minwise Hashing算法对所述Q个特征列进行升维处理,生成R个特征列,其 中R=k*2b,k和b为算法指定参数。
  17. 如权利要求15所述的训练模型的系统,其特征在于,所述训练数据还包括对应于每一个样本的标签值,所述计算模块包括:
    信息值计算模块,用于利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息值,以所述信息值作为所述重要程度值;和/或
    信息增益计算模块,用于利用每一个样本对应的标签值和所述特征列中的多个特征,计算出所述特征列的信息增益,以所述信息增益作为所述重要程度值。
  18. 如权利要求15所述的训练模型的系统,其特征在于,所述系统还包括:
    第二降维模块,用于当判断出所述N个特征列中的M个特征列的重要程度值小于对应的阈值时,将所述M个特征列进行降维处理,生成P个特征列,其中M<N,且P<M;
    所述第二合并模块用于:
    所述将升维处理后生成的R个特征列和所述降维处理后生成的P个特征列合并。
PCT/CN2017/073340 2016-02-25 2017-02-13 一种利用训练数据训练模型的方法和训练系统 Ceased WO2017143914A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/112,592 US11615346B2 (en) 2016-02-25 2018-08-24 Method and system for training model by using training data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610105840.3 2016-02-25
CN201610105840.3A CN107122327B (zh) 2016-02-25 2016-02-25 一种利用训练数据训练模型的方法和训练系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/112,592 Continuation US11615346B2 (en) 2016-02-25 2018-08-24 Method and system for training model by using training data

Publications (1)

Publication Number Publication Date
WO2017143914A1 true WO2017143914A1 (zh) 2017-08-31

Family

ID=59685834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073340 Ceased WO2017143914A1 (zh) 2016-02-25 2017-02-13 一种利用训练数据训练模型的方法和训练系统

Country Status (4)

Country Link
US (1) US11615346B2 (zh)
CN (1) CN107122327B (zh)
TW (1) TWI740891B (zh)
WO (1) WO2017143914A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111353626A (zh) * 2018-12-21 2020-06-30 阿里巴巴集团控股有限公司 数据的审核方法、装置及设备
US11615346B2 (en) 2016-02-25 2023-03-28 Alibaba Group Holding Limited Method and system for training model by using training data

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021986A (zh) * 2017-10-27 2018-05-11 平安科技(深圳)有限公司 电子装置、多模型样本训练方法和计算机可读存储介质
CN108108848B (zh) * 2017-12-29 2019-08-13 英特尔产品(成都)有限公司 缺陷率预测模型的训练方法、装置及系统
EP3935581A4 (en) 2019-03-04 2022-11-30 Iocurrents, Inc. DATA COMPRESSION AND COMMUNICATION USING MACHINE LEARNING
CN110335134A (zh) * 2019-04-15 2019-10-15 梵界信息技术(上海)股份有限公司 一种基于woe转换实现信贷客户资质分类的方法
JP7215324B2 (ja) * 2019-05-17 2023-01-31 富士通株式会社 予測プログラム、予測方法及び予測装置
CN112085205B (zh) * 2019-06-14 2026-02-24 第四范式(北京)技术有限公司 用于自动训练机器学习模型的方法和系统
CN112541776B (zh) * 2019-09-20 2024-08-16 北京达佳互联信息技术有限公司 数据处理方法、装置、电子设备及存储介质
CN110852443B (zh) * 2019-09-26 2023-02-21 支付宝(杭州)信息技术有限公司 特征稳定性检测方法、设备及计算机可读介质
CN110825966B (zh) 2019-10-31 2022-03-04 广州市百果园信息技术有限公司 一种信息推荐的方法、装置、推荐服务器和存储介质
CN115039110B (zh) * 2020-02-07 2025-10-24 瑞典爱立信有限公司 使用数据优先级的数据传输
GB2606792A (en) * 2020-03-26 2022-11-23 Shenzhen Inst Adv Tech Time series data generation method and device based on multi-condition constraints, and medium
CN114090601B (zh) * 2021-11-23 2023-11-03 北京百度网讯科技有限公司 一种数据筛选方法、装置、设备以及存储介质
KR20230115752A (ko) * 2022-01-27 2023-08-03 삼성전자주식회사 애플리케이션을 백그라운드 프로세스에서 실행하는 전자 장치 및 그 동작 방법
EP4369194A4 (en) 2022-01-27 2025-01-15 Samsung Electronics Co., Ltd. Electronic device for executing application in background process, and operation method thereof
CN116304707A (zh) * 2022-12-02 2023-06-23 平安银行股份有限公司 模型训练、保费预测方法、电子设备及计算机存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096849A1 (en) * 2006-02-20 2007-08-30 University College Cork - National University Of Ireland, Cork A voltammetric analysis system
CN102609714A (zh) * 2011-12-31 2012-07-25 哈尔滨理工大学 基于信息增益和在线支持向量机的新型分类器及分类方法
CN104050242A (zh) * 2014-05-27 2014-09-17 哈尔滨理工大学 基于最大信息系数的特征选择、分类方法及其装置
CN104239485A (zh) * 2014-09-05 2014-12-24 中国科学院计算机网络信息中心 一种基于统计机器学习的互联网暗链检测方法
CN104715021A (zh) * 2015-02-27 2015-06-17 南京邮电大学 一种基于哈希方法的多标记学习的设计方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169735A1 (en) * 2001-03-07 2002-11-14 David Kil Automatic mapping from data to preprocessing algorithms
IL226747B (en) * 2013-06-04 2019-01-31 Verint Systems Ltd A system and method for studying malware detection
CN104239351B (zh) * 2013-06-20 2017-12-19 阿里巴巴集团控股有限公司 一种用户行为的机器学习模型的训练方法及装置
US9082084B2 (en) * 2013-06-28 2015-07-14 Linkedin Corporation Facilitating machine learning in an online social network
US8957984B2 (en) * 2013-06-30 2015-02-17 Konica Minolta Laboratory U.S.A., Inc. Ghost artifact detection and removal in HDR image processsing using multi-scale normalized cross-correlation
US9305358B2 (en) * 2013-07-01 2016-04-05 Kabushiki Kaisha Toshiba Medical image processing
CN104680121B (zh) * 2013-11-27 2022-06-03 腾讯科技(深圳)有限公司 一种人脸图像的处理方法及装置
WO2015134665A1 (en) * 2014-03-04 2015-09-11 SignalSense, Inc. Classifying data with deep learning neural records incrementally refined through expert input
CN104376326B (zh) * 2014-11-02 2017-06-16 吉林大学 一种用于图像场景识别的特征提取方法
CN105243139B (zh) * 2015-10-10 2018-10-23 天津大学 一种基于深度学习的三维模型检索方法及其检索装置
CN107122327B (zh) 2016-02-25 2021-06-29 阿里巴巴集团控股有限公司 一种利用训练数据训练模型的方法和训练系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096849A1 (en) * 2006-02-20 2007-08-30 University College Cork - National University Of Ireland, Cork A voltammetric analysis system
CN102609714A (zh) * 2011-12-31 2012-07-25 哈尔滨理工大学 基于信息增益和在线支持向量机的新型分类器及分类方法
CN104050242A (zh) * 2014-05-27 2014-09-17 哈尔滨理工大学 基于最大信息系数的特征选择、分类方法及其装置
CN104239485A (zh) * 2014-09-05 2014-12-24 中国科学院计算机网络信息中心 一种基于统计机器学习的互联网暗链检测方法
CN104715021A (zh) * 2015-02-27 2015-06-17 南京邮电大学 一种基于哈希方法的多标记学习的设计方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11615346B2 (en) 2016-02-25 2023-03-28 Alibaba Group Holding Limited Method and system for training model by using training data
CN111353626A (zh) * 2018-12-21 2020-06-30 阿里巴巴集团控股有限公司 数据的审核方法、装置及设备
CN111353626B (zh) * 2018-12-21 2023-05-26 阿里巴巴集团控股有限公司 数据的审核方法、装置及设备

Also Published As

Publication number Publication date
CN107122327A (zh) 2017-09-01
TWI740891B (zh) 2021-10-01
US11615346B2 (en) 2023-03-28
US20180365521A1 (en) 2018-12-20
TW201738780A (zh) 2017-11-01
CN107122327B (zh) 2021-06-29

Similar Documents

Publication Publication Date Title
WO2017143914A1 (zh) 一种利用训练数据训练模型的方法和训练系统
US11809993B2 (en) Systems and methods for determining graph similarity
CN114298417A (zh) 反欺诈风险评估方法、训练方法、装置及可读存储介质
US10504005B1 (en) Techniques to embed a data object into a multidimensional frame
US20220367051A1 (en) Methods and systems for estimating causal effects from knowledge graphs
WO2019114412A1 (zh) 一种基于图结构模型的信用风险控制方法、装置以及设备
CN107391545B (zh) 一种对用户进行分类的方法、输入方法及装置
US20220414766A1 (en) Computing system and method for creating a data science model having reduced bias
CN111143578B (zh) 基于神经网络抽取事件关系的方法、装置和处理器
WO2017148269A1 (zh) 一种信用分的获取、特征向量值的输出方法及其装置
CN113837635A (zh) 风险检测处理方法、装置及设备
US20240126730A1 (en) Schema Validation with Data Synthesis
CN113887821A (zh) 一种用于风险预测的方法和装置
EP4584717A1 (en) Synthetic time-series data generation and its use in survival analysis and selection of drug for further development
CN116304891A (zh) 基于多源数据迁移学习的类别预测方法和装置
CN114969253A (zh) 市场主体与政策的匹配方法、装置、计算设备及介质
Li et al. Weight‐Selected Attribute Bagging for Credit Scoring
US20250227464A1 (en) Method for implementing private set intersection protocol using oblivious pseudo-random function based on minicrypt, and terminal device using same
CN107016028B (zh) 数据处理方法及其设备
CN116821720B (zh) 用户聚类方法、装置、计算机设备和存储介质
WO2025193116A1 (ru) Cпособ и устройство для определения мошеннических транзакций пользователя
CN116467521A (zh) 账户推荐模型的训练方法、账户推荐方法、装置和设备
US12437237B2 (en) Sequential synthesis and selection for feature engineering
RU2839053C1 (ru) Способ и устройство для определения мошеннических транзакций пользователя
HK1243517B (zh) 一种利用训练数据训练模型的方法和训练系统

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17755743

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17755743

Country of ref document: EP

Kind code of ref document: A1