System, method, and computer program product for target label concentration based ordinal encoding
Patent Information
- Application Number
- EP2023954516
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-08-26
AI Technical Summary
Tree-based machine learning models, such as LightGBM, Random Forest, and Decision Trees, perform poorly with one-hot encoding due to high-dimensional column spaces, leading to longer training times and potential timeouts.
The method involves obtaining a training dataset with categorical variables, calculating a target variable rate for each category, sorting categories by this rate, assigning numerical values, and ordinally encoding the categorical variables to generate an encoded training dataset, which is then used to train a tree-based machine learning model.
This approach reduces the training time for machine learning models by allowing them to make meaningful splits on categorical variables, thereby avoiding timeouts and improving model efficiency.
Smart Images

Figure US2023033706_03042025_PF_FP_ABST
Abstract
Description
SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR TARGET LABEL CONCENTRATION BASED ORDINAL ENCODINGBACKGROUND1. Field
[0001] This disclosure relates to machine learning and, in some non-limiting embodiments or aspects, to systems, methods, and computer program products for label concentration-based ordinal encoding of variables for training machine learning models.2. Technical Considerations
[0002] One hot encoding projects a categorical feature from a lower dimensional space to a higher dimensional space in which a resulting number of projected columns is equivalent to a cardinality of the original column.
[0003] Ordinal encoding converts each category in a column to an integer, maintaining the dimensionality of the column space.
[0004] Tree based ensembles like the LightGBM, Random Forest, Decision tree models don’t perform well with one hot encoding due to higher dimensional column spaces and the inability of the model to form meaningful decision boundaries at each split. Due to this issue the machine learning model training runs may take longer and eventually time out.
[0005] Many categorical variables may not have a natural ordinal relationship.SUMMARY
[0006] Accordingly, provided are improved systems, devices, products, apparatus, and / or methods for target label concentration based ordinal encoding.
[0007] According to some non-limiting embodiments or aspects, provided is a method, including: obtaining, with at least one processor, a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculating, with the at least one processor, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sorting, with the at least one processor, according to the target variable rate for each category, the plurality ofcategories of the at least one categorical variable in an ascending order; assigning, with the at least one processor, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encoding, with the at least one processor, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and training, with the at least one processor, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0008] In some non-limiting embodiments or aspects, calculating, with the at least one processor, based on the plurality of labels, the target variable rate for each category of the plurality of categories includes determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0009] In some non-limiting embodiments or aspects, the plurality of labels includes a plurality of binary labels.
[0010] In some non-limiting embodiments or aspects, training, with the at least one processor, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model includes: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0011] In some non-limiting embodiments or aspects, the tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0012] In some non-limiting embodiments or aspects, the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
[0013] In some non-limiting embodiments or aspects, the method further includes: providing, with the at least one processor, the trained tree-based machine learningmodel; receiving, with the at least one processor, transaction data associated with a transaction currently being processed in the electronic payment network; processing, with the at least one processor, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, denying, with the at least one processor, authorization of the transaction in the electronic payment network.
[0014] According to some non-limiting embodiments or aspects, provided is a system, including: at least one processor coupled to a memory and configured to: obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0015] In some non-limiting embodiments or aspects, the at least one processor is configured to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0016] In some non-limiting embodiments or aspects, the plurality of labels includes a plurality of binary labels.
[0017] In some non-limiting embodiments or aspects, the at least one processor is configured to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-basedmachine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0018] In some non-limiting embodiments or aspects, the tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0019] In some non-limiting embodiments or aspects, the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
[0020] In some non-limiting embodiments or aspects, the at least one processor is further configured to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.
[0021] According to some non-limiting embodiments or aspects, provided is a computer program product including a non-transitory computer readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to: obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0022] In some non-limiting embodiments or aspects, the program instructions, when executed by the at least one processor, cause the at least one processor to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0023] In some non-limiting embodiments or aspects, the plurality of labels includes a plurality of binary labels.
[0024] In some non-limiting embodiments or aspects, the program instructions, when executed by the at least one processor, cause the at least one processor to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0025] In some non-limiting embodiments or aspects, the tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0026] In some non-limiting embodiments or aspects, the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network, and wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.
[0027] Further embodiments or aspects are set forth in the following numbered clauses:
[0028] Clause 1. A method, comprising: obtaining, with at least one processor, a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculating, with the at least one processor, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sorting, with the at least one processor, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assigning, with the at least one processor, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encoding, with the at least one processor, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and training, with the at least one processor, using a treebased machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0029] Clause 2. The method of clause 1 , wherein calculating, with the at least one processor, based on the plurality of labels, the target variable rate for each category of the plurality of categories includes determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0030] Clause 3. The method of any of clauses 1 or 2, wherein the plurality of labels includes a plurality of binary labels.
[0031] Clause 4. The method of any of clauses 1 -3, wherein training, with the at least one processor, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model includes: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0032] Clause 5. The method of any of clauses 1 -4, wherein the tree-based machine learning algorithm includes at least one of the following: a light gradientboosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0033] Clause 6. The method of any of clauses 1 -5, wherein the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
[0034] Clause 7. The method of any of clauses 1 -6, further comprising: providing, with the at least one processor, the trained tree-based machine learning model; receiving, with the at least one processor, transaction data associated with a transaction currently being processed in the electronic payment network; processing, with the at least one processor, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, denying, with the at least one processor, authorization of the transaction in the electronic payment network.
[0035] Clause 8. A system, comprising: at least one processor coupled to a memory and configured to: obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0036] Clause 9. The system of clause 8, wherein the at least one processor is configured to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of theplurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0037] Clause 10. The system of any of clauses 8 or 9, wherein the plurality of labels includes a plurality of binary labels.
[0038] Clause 1 1. The system of any of clauses 8-10, wherein the at least one processor is configured to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the treebased machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0039] Clause 12. The system of any of clauses 8-1 1 , wherein the tree-based machine learning algorithm includes at least one of the following: a light gradientboosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0040] Clause 13. The system of any of clauses 8-12, wherein the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
[0041] Clause 14. The system of any of clause 8-13, wherein the at least one processor is further configured to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.
[0042] Clause 15. A computer program product including a non-transitory computer readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to: obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least onecategorical variable; sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0043] Clause 16. The computer program product of clause 15, wherein the program instructions, when executed by the at least one processor, cause the at least one processor to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
[0044] Clause 17. The computer program product of any of clauses 15 or 16, wherein the plurality of labels includes a plurality of binary labels.
[0045] Clause 18. The computer program product of ay of clauses 15-17, wherein the program instructions, when executed by the at least one processor, cause the at least one processor to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the treebased machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
[0046] Clause 19. The computer program product of claim 15, wherein the treebased machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0047] Clause 20. The computer program product of claim 15, wherein the at least one categorical variable includes at least one transaction parameter associated withat least one historical transaction processed in an electronic payment network, and wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.
[0048] These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structures and the combination of parts and economies of manufacture, will become more apparent upon consideration of the following description and the appended claims with reference to the accompanying drawings, all of which form a part of this specification, wherein like reference numerals designate corresponding parts in the various figures. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of limits. As used in the specification and the claims, the singular form of “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise.BRIEF DESCRIPTION OF THE DRAWINGS AND APPENDICES
[0049] Additional advantages and details are explained in greater detail below with reference to the exemplary embodiments that are illustrated in the accompanying schematic figures, in which:
[0050] FIG. 1 is a diagram of non-limiting embodiments or aspects of an environment in which systems, devices, products, apparatus, and / or methods, described herein, may be implemented;
[0051] FIG. 2 is a diagram of non-limiting embodiments or aspects of components of one or more devices and / or one or more systems of FIG. 1 ;
[0052] FIGS. 3 is a flowchart of non-limiting embodiments or aspects of a process for target label concentration based ordinal encoding;
[0053] FIG. 4A is a table of example training samples including example categorical variables;
[0054] FIG. 4B is a table of example categories of an example categorical variable sorted in an ascending order according to calculated target variable rate; and
[0055] FIG. 4C is a table of example training samples including example ordinally encoded categorical variables.DESCRIPTION
[0056] It is to be understood that the present disclosure may assume various alternative variations and step sequences, except where expressly specified to the contrary. It is also to be understood that the specific devices and processes illustrated in the attached drawings, and described in the following specification, are simply exemplary and non-limiting embodiments or aspects. Hence, specific dimensions and other physical characteristics related to the embodiments or aspects disclosed herein are not to be considered as limiting.
[0057] No aspect, component, element, structure, act, step, function, instruction, and / or the like used herein should be construed as critical or essential unless explicitly described as such. Also, as used herein, the articles “a” and “an” are intended to include one or more items, and may be used interchangeably with “one or more” and “at least one.” Furthermore, as used herein, the term “set” is intended to include one or more items (e.g., related items, unrelated items, a combination of related and unrelated items, etc.) and may be used interchangeably with “one or more” or “at least one.” Where only one item is intended, the term “one” or similar language is used. Also, as used herein, the terms “has,” “have,” “having,” or the like are intended to be open-ended terms. Further, the phrase “based on” is intended to mean “based at least partially on” unless explicitly stated otherwise.
[0058] As used herein, the term “communication” may refer to the reception, receipt, transmission, transfer, provision, and / or the like, of data (e.g., information, signals, messages, instructions, commands, and / or the like). For one unit (e.g., a device, a system, a component of a device or system, combinations thereof, and / or the like) to be in communication with another unit means that the one unit is able to directly or indirectly receive information from and / or transmit information to the other unit. This may refer to a direct or indirect connection (e.g., a direct communication connection, an indirect communication connection, and / or the like) that is wired and / or wireless in nature. Additionally, two units may be in communication with each other even though the information transmitted may be modified, processed, relayed, and / or routed between the first and second unit. For example, a first unit may be in communication with a second unit even though the first unit passively receives information and doesnot actively transmit information to the second unit. As another example, a first unit may be in communication with a second unit if at least one intermediary unit processes information received from the first unit and communicates the processed information to the second unit.
[0059] It will be apparent that systems and / or methods, described herein, can be implemented in different forms of hardware, software, or a combination of hardware and software. The actual specialized control hardware or software code used to implement these systems and / or methods is not limiting of the implementations. Thus, the operation and behavior of the systems and / or methods are described herein without reference to specific software code, it being understood that software and hardware can be designed to implement the systems and / or methods based on the description herein.
[0060] Some non-limiting embodiments or aspects are described herein in connection with thresholds. As used herein, satisfying a threshold may refer to a value being greater than the threshold, more than the threshold, higher than the threshold, greater than or equal to the threshold, less than the threshold, fewer than the threshold, lower than the threshold, less than or equal to the threshold, equal to the threshold, etc.
[0061] As used herein, the term “transaction service provider” may refer to an entity that receives transaction authorization requests from merchants or other entities and provides guarantees of payment, in some cases through an agreement between the transaction service provider and an issuer institution. For example, a transaction service provider may include a payment network such as Visa® or any other entity that processes transactions. The term “transaction processing system” may refer to one or more computing devices operated by or on behalf of a transaction service provider, such as a transaction processing server executing one or more software applications. A transaction processing system may include one or more processors and, in some non-limiting embodiments, may be operated by or on behalf of a transaction service provider.
[0062] As used herein, the term “account identifier” may include one or more primary account numbers (PANs), tokens, or other identifiers associated with a customer account. The term “token” may refer to an identifier that is used as a substitute or replacement identifier for an original account identifier, such as a PAN. Account identifiers may be alphanumeric or any combination of characters and / orsymbols. Tokens may be associated with a PAN or other original account identifier in one or more data structures (e.g., one or more databases and / or the like) such that they may be used to conduct a transaction without directly using the original account identifier. In some examples, an original account identifier, such as a PAN, may be associated with a plurality of tokens for different individuals or purposes.
[0063] As used herein, the terms “issuer institution,” “portable financial device issuer,” “issuer,” or “issuer bank” may refer to one or more entities that provide one or more accounts to a user (e.g., a customer, a consumer, an entity, an organization, and / or the like) for conducting transactions (e.g., payment transactions), such as initiating credit card payment transactions and / or debit card payment transactions. For example, an issuer institution may provide an account identifier, such as a PAN, to a user that uniquely identifies one or more accounts associated with that user. The account identifier may be embodied on a portable financial device, such as a physical financial instrument (e.g., a payment card), and / or may be electronic and used for electronic payments. In some non-limiting embodiments or aspects, an issuer institution may be associated with a bank identification number (BIN) that uniquely identifies the issuer institution. As used herein, the term “issuer institution system” may refer to one or more computer systems operated by or on behalf of an issuer institution, such as a server computer executing one or more software applications. For example, an issuer institution system may include one or more authorization servers for authorizing a payment transaction.
[0064] As used herein, the term “merchant” may refer to an individual or entity that provides goods and / or services, or access to goods and / or services, to users (e.g. customers) based on a transaction (e.g. a payment transaction). As used herein, the terms “merchant” or “merchant system” may also refer to one or more computer systems, computing devices, and / or software application operated by or on behalf of a merchant, such as a server computer executing one or more software applications. A “point-of-sale (POS) system,” as used herein, may refer to one or more computers and / or peripheral devices used by a merchant to engage in payment transactions with users, including one or more card readers, near-field communication (NFC) receivers, radio frequency identification (RFID) receivers, and / or other contactless transceivers or receivers, contact-based receivers, payment terminals, computers, servers, input devices, and / or other like devices that can be used to initiate a payment transaction. A POS system may be part of a merchant system. A merchant system may alsoinclude a merchant plug-in for facilitating online, Internet-based transactions through a merchant webpage or software application. A merchant plug-in may include software that runs on a merchant server or is hosted by a third-party for facilitating such online transactions.
[0065] As used herein, the term “mobile device” may refer to one or more portable electronic devices configured to communicate with one or more networks. As an example, a mobile device may include a cellular phone (e.g., a smartphone or standard cellular phone), a portable computer (e.g., a tablet computer, a laptop computer, etc.), a wearable device (e.g., a watch, pair of glasses, lens, clothing, and / or the like), a personal digital assistant (PDA), and / or other like devices. The terms “client device” and “user device,” as used herein, refer to any electronic device that is configured to communicate with one or more servers or remote devices and / or systems. A client device or user device may include a mobile device, a network- enabled appliance (e.g., a network-enabled television, refrigerator, thermostat, and / or the like), a computer, a POS system, and / or any other device or system capable of communicating with a network.
[0066] As used herein, the term “computing device” may refer to one or more electronic devices configured to process data. A computing device may, in some examples, include the necessary components to receive, process, and output data, such as a processor, a display, a memory, an input device, a network interface, and / or the like. A computing device may be a mobile device. As an example, a mobile device may include a cellular phone (e.g., a smartphone or standard cellular phone), a portable computer, a wearable device (e.g., watches, glasses, lenses, clothing, and / or the like), a PDA, and / or other like devices. A computing device may also be a desktop computer or other form of non-mobile computer.
[0067] As used herein, the term “payment device” may refer to a portable financial device, an electronic payment device, a payment card (e.g., a credit or debit card), a gift card, a smartcard, smart media, a payroll card, a healthcare card, a wristband, a machine-readable medium containing account information, a keychain device or fob, an RFID transponder, a retailer discount or loyalty card, a cellular phone, an electronic wallet mobile application, a PDA, a pager, a security card, a computer, an access card, a wireless terminal, a transponder, and / or the like. In some non-limiting embodiments or aspects, the payment device may include volatile or nonvolatile memory to store information (e.g., an account identifier, a name of the account holder, and / or the like).
[0068] As used herein, the term "server" and / or “processor” may refer to or include one or more computing devices that are operated by or facilitate communication and processing for multiple parties in a network environment, such as the Internet, although it will be appreciated that communication may be facilitated over one or more public or private network environments and that various other arrangements are possible. Further, multiple computing devices (e.g., servers, POS devices, mobile devices, etc.) directly or indirectly communicating in the network environment may constitute a "system.” Reference to “a server” or “a processor,” as used herein, may refer to a previously-recited server and / or processor that is recited as performing a previous step or function, a different server and / or processor, and / or a combination of servers and / or processors. For example, as used in the specification and the claims, a first server and / or a first processor that is recited as performing a first step or function may refer to the same or different server and / or a processor recited as performing a second step or function.
[0069] As used herein, the term “acquirer” may refer to an entity licensed by the transaction service provider and / or approved by the transaction service provider to originate transactions using a portable financial device of the transaction service provider. Acquirer may also refer to one or more computer systems operated by or on behalf of an acquirer, such as a server computer executing one or more software applications (e.g., “acquirer server”). An “acquirer” may be a merchant bank, or in some cases, the merchant system may be the acquirer. The transactions may include original credit transactions (OCTs) and account funding transactions (AFTs). The acquirer may be authorized by the transaction service provider to sign merchants of service providers to originate transactions using a portable financial device of the transaction service provider. The acquirer may contract with payment facilitators to enable the facilitators to sponsor merchants. The acquirer may monitor compliance of the payment facilitators in accordance with regulations of the transaction service provider. The acquirer may conduct due diligence of payment facilitators and ensure that proper due diligence occurs before signing a sponsored merchant. Acquirers may be liable for all transaction service provider programs that they operate or sponsor. Acquirers may be responsible for the acts of its payment facilitators and the merchants it or its payment facilitators sponsor.
[0070] As used herein, the term “payment gateway” may refer to an entity and / or a payment processing system operated by or on behalf of such an entity (e.g., amerchant service provider, a payment service provider, a payment facilitator, a payment facilitator that contracts with an acquirer, a payment aggregator, and / or the like), which provides payment services (e.g., transaction service provider payment services, payment processing services, and / or the like) to one or more merchants. The payment services may be associated with the use of portable financial devices managed by a transaction service provider. As used herein, the term “payment gateway system” may refer to one or more computer systems, computer devices, servers, groups of servers, and / or the like operated by or on behalf of a payment gateway.
[0071] As used herein, the terms “authenticating system” and “authentication system” may refer to one or more computing devices that authenticate a user and / or an account, such as but not limited to a transaction processing system, merchant system, issuer system, payment gateway, a third-party authenticating service, and / or the like.
[0072] As used herein, the terms “request,” “response,” “request message,” and “response message” may refer to one or more messages, data packets, signals, and / or data structures used to communicate data between two or more components or units.
[0073] As used herein, the term “application programming interface” (API) may refer to computer code that allows communication between different systems or (hardware and / or software) components of systems. For example, an API may include function calls, functions, subroutines, communication protocols, fields, and / or the like usable and / or accessible by other systems or other (hardware and / or software) components of systems.
[0074] As used herein, the term “user interface” or “graphical user interface” refers to a generated display, such as one or more graphical user interfaces (GUIs) with which a user may interact, either directly or indirectly (e.g., through a keyboard, mouse, touchscreen, etc.).
[0075] Non-limiting embodiments or aspects of the present disclosure may obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sort, according to the target variable rate for eachcategory, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
[0076] In this way, non-limiting embodiments or aspects of the present disclosure may leverage a label concentration-based technique that incorporates label density encapsulation for categories in categorical or qualitative variables to perform ordinal encoding for the categorical or qualitative variables. Accordingly, non-limiting embodiments or aspects of the present disclosure may help each weak learning decision tree make label concentration based meaningful splits on each categorical or qualitative variables, thereby significantly reducing a time for machine learning model training and / or avoiding time outs during the training.
[0077] Referring now to FIG. 1 , FIG. 1 is a diagram of an example environment 100 in which devices, systems, methods, and / or products described herein, may be implemented. As shown in FIG. 1 , environment 100 includes transaction processing network 101 , which may include merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, issuer system 1 10, user device 1 12, and / or communication network 116. T ransaction processing network 101 , merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, issuer system 1 10, and / or user device 1 12, may interconnect (e.g., establish a connection to communicate, etc.) via wired connections, wireless connections, or a combination of wired and wireless connections.
[0078] Merchant system 102 may include one or more devices capable of receiving information and / or data from payment gateway system 104, acquirer system 106, transaction service provider system 108, issuer system 110, and / or user device 1 12 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to payment gateway system 104, acquirer system 106, transaction service provider system 108, issuer system 1 10, and / or user device 1 12 (e.g., viacommunication network 1 16, etc.). Merchant system 102 may include a device capable of receiving information and / or data from user device 1 12 via a communication connection (e.g., an NFC communication connection, an RFID communication connection, a Bluetooth® communication connection, etc.) with user device 1 12 and / or communicating information and / or data to user device 1 12 via the communication connection. For example, merchant system 102 may include a computing device, such as a server, a group of servers, a client device, a group of client devices, and / or other like devices. In some non-limiting embodiments or aspects, merchant system 102 may be associated with a merchant as described herein. In some non-limiting embodiments or aspects, merchant system 102 may include one or more devices, such as computers, computer systems, and / or peripheral devices capable of being used by a merchant to conduct a payment transaction with a user. For example, merchant system 102 may include a POS device and / or a POS system.
[0079] Payment gateway system 104 may include one or more devices capable of receiving information and / or data from merchant system 102, acquirer system 106, transaction service provider system 108, issuer system 1 10, and / or user device 1 12 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to merchant system 102, acquirer system 106, transaction service provider system 108, issuer system 1 10, and / or user device 1 12 (e.g., via communication network 1 16, etc.). For example, payment gateway system 104 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, payment gateway system 104 is associated with a payment gateway as described herein.
[0080] Acquirer system 106 may include one or more devices capable of receiving information and / or data from merchant system 102, payment gateway system 104, transaction service provider system 108, issuer system 1 10, and / or user device 1 12 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to merchant system 102, payment gateway system 104, transaction service provider system 108, issuer system 1 10, and / or user device 1 12 (e.g., via communication network 1 16, etc.). For example, acquirer system 106 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, acquirer system 106 may be associated with an acquirer as described herein.
[0081] Transaction service provider system 108 may include one or more devices capable of receiving information and / or data from merchant system 102, payment gateway system 104, acquirer system 106, issuer system 110, and / or user device 1 12 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to merchant system 102, payment gateway system 104, acquirer system 106, issuer system 1 10, and / or user device 1 12 (e.g., via communication network 1 16, etc.). For example, transaction service provider system 108 may include a computing device, such as a server (e.g., a transaction processing server, etc.), a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, transaction service provider system 108 may be associated with a transaction service provider as described herein. In some non-limiting embodiments or aspects, transaction service provider 108 may include and / or access one or more internal and / or external databases including transaction data.
[0082] Issuer system 1 10 may include one or more devices capable of receiving information and / or data from merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or user device 1 12 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or user device 1 12 (e.g., via communication network 1 16 etc.). For example, issuer system 1 10 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, issuer system 1 10 may be associated with an issuer institution as described herein. For example, issuer system 1 10 may be associated with an issuer institution that issued a payment account or instrument (e.g., a credit account, a debit account, a credit card, a debit card, etc.) to a user (e.g., a user associated with user device 1 12, etc.).
[0083] In some non-limiting embodiments or aspects, transaction processing network 101 includes a plurality of systems in a communication path for processing a transaction. For example, transaction processing network 101 can include merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or issuer system 1 10 in a communication path (e.g., a communication path, a communication channel, a communication network, etc.) for processing an electronic payment transaction. As an example, transaction processing network 101 can process (e.g., initiate, conduct, authorize, etc.) an electronic paymenttransaction via the communication path between merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or issuer system 1 10.
[0084] User device 1 12 may include one or more devices capable of receiving information and / or data from merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or issuer system 1 10 (e.g., via communication network 1 16, etc.) and / or communicating information and / or data to merchant system 102, payment gateway system 104, acquirer system 106, transaction service provider system 108, and / or issuer system 1 10 (e.g., via communication network 1 16, etc.). For example, user device 1 12 may include a client device and / or the like. In some non-limiting embodiments or aspects, user device 112 may be capable of receiving information (e.g., from merchant system 102, etc.) via a short range wireless communication connection (e.g., an NFC communication connection, an RFID communication connection, a Bluetooth® communication connection, and / or the like), and / or communicating information (e.g., to merchant system 102, etc.) via a short range wireless communication connection. In some nonlimiting embodiments or aspects, user device 1 12 may include an application associated with user device 1 12, such as an application stored on user device 1 12, a mobile application (e.g., a mobile device application, a native application for a mobile device, a mobile cloud application for a mobile device, an electronic wallet application, an issuer bank application, and / or the like) stored and / or executed on user device 1 12. In some non-limiting embodiments or aspects, user device 1 12 may be associated with a sender account and / or a receiving account in a payment network for one or more transactions in the payment network.
[0085] Communication network 1 16 may include one or more wired and / or wireless networks. For example, communication network 1 16 may include a cellular network (e.g., a long-term evolution (LTE) network, a third generation (3G) network, a fourth generation (4G) network, a fifth generation (5G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., the public switched telephone network (PSTN)), a private network, an ad hoc network, an intranet, the Internet, a fiber optic-based network, a cloud computing network, and / or the like, and / or a combination of these or other types of networks.
[0086] The number and arrangement of devices and systems shown in FIG. 1 is provided as an example. There may be additional devices and / or systems, fewer devices and / or systems, different devices and / or systems, or differently arranged devices and / or systems than those shown in FIG. 1 . Furthermore, two or more devices and / or systems shown in FIG. 1 may be implemented within a single device and / or system, or a single device and / or system shown in FIG. 1 may be implemented as multiple, distributed devices and / or systems. Additionally or alternatively, a set of devices and / or systems (e.g., one or more devices or systems) of environment 100 may perform one or more functions described as being performed by another set of devices and / or systems of environment 100.
[0087] Referring now to FIG. 2, FIG. 2 is a diagram of example components of a device 200. Device 200 may correspond to one or more devices of merchant system 102, one or more devices of payment gateway system 104, one or more devices of acquirer system 106, one or more devices of transaction service provider system 108, one or more devices of issuer system 1 10, and / or user device 1 12 (e.g., one or more devices of a system of user device 112, etc.). In some non-limiting embodiments or aspects, one or more devices of merchant system 102, one or more devices of payment gateway system 104, one or more devices of acquirer system 106, one or more devices of transaction service provider system 108, one or more devices of issuer system 1 10, and / or user device 1 12 (e.g., one or more devices of a system of user device 1 12, etc.) may include at least one device 200 and / or at least one component of device 200. As shown in FIG. 2, device 200 may include bus 202, processor 204, memory 206, storage component 208, input component 210, output component 212, and communication interface 214.
[0088] Bus 202 may include a component that permits communication among the components of device 200. In some non-limiting embodiments or aspects, processor 204 may be implemented in hardware, software, or a combination of hardware and software. For example, processor 204 may include a processor (e.g., a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), etc.), a microprocessor, a digital signal processor (DSP), and / or any processing component (e.g., a field-programmable gate array (FPGA), an applicationspecific integrated circuit (ASIC), etc.) that can be programmed to perform a function. Memory 206 may include random access memory (RAM), read-only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magneticmemory, optical memory, etc.) that stores information and / or instructions for use by processor 204.
[0089] Storage component 208 may store information and / or software related to the operation and use of device 200. For example, storage component 208 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, a solid state disk, etc.), a compact disc (CD), a digital versatile disc (DVD), a floppy disk, a cartridge, a magnetic tape, and / or another type of computer-readable medium, along with a corresponding drive.
[0090] Input component 210 may include a component that permits device 200 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, a microphone, etc.). Additionally or alternatively, input component 210 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, an actuator, etc.). Output component 212 may include a component that provides output information from device 200 (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.).
[0091] Communication interface 214 may include a transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, etc.) that enables device 200 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 214 may permit device 200 to receive information from another device and / or provide information to another device. For example, communication interface 214 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi® interface, a cellular network interface, and / or the like.
[0092] Device 200 may perform one or more processes described herein. Device 200 may perform these processes based on processor 204 (e.g., a central processing unit (CPU), a graphics processing unit (GPU), etc.) executing software instructions stored by a computer-readable medium, such as memory 206 and / or storage component 208. A computer-readable medium (e.g., a non-transitory computer- readable medium) is defined herein as a non-transitory memory device. A non- transitory memory device includes memory space located inside of a single physical storage device or memory space spread across multiple physical storage devices.
[0093] Software instructions may be read into memory 206 and / or storage component 208 from another computer-readable medium or from another device via communication interface 214. When executed, software instructions stored in memory 206 and / or storage component 208 may cause processor 204 to perform one or more processes described herein. Additionally or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, embodiments or aspects described herein are not limited to any specific combination of hardware circuitry and software.
[0094] Memory 206 and / or storage component 208 may include data storage or one or more data structures (e.g., a database, etc.). Device 200 may be capable of receiving information from, storing information in, communicating information to, or searching information stored in the data storage or one or more data structures in memory 206 and / or storage component 208.
[0095] The number and arrangement of components shown in FIG. 2 are provided as an example. In some non-limiting embodiments or aspects, device 200 may include additional components, fewer components, different components, or differently arranged components than those shown in FIG. 2. Additionally or alternatively, a set of components (e.g., one or more components) of device 200 may perform one or more functions described as being performed by another set of components of device 200.
[0096] Referring now to FIG. 3, FIG. 3 is a flowchart of non-limiting embodiments or aspects of a process 300 for target label concentration based ordinal encoding. In some non-limiting embodiments or aspects, one or more of the steps of process 300 may be performed (e.g., completely, partially, etc.) by transaction service provider system 108 (e.g., one or more devices of transaction service provider system 108, etc.). In some non-limiting embodiments or aspects, one or more of the steps of process 300 may be performed (e.g., completely, partially, etc.) by another device or a group of devices separate from or including transaction service provider system 108, such as merchant system 102 (e.g., one or more devices of merchant system 102), payment gateway system 104 (e.g., one or more devices of payment gateway system 104), acquirer system 106 (e.g., one or more devices of acquirer system 106), issuer system 110 (e.g., one or more devices of issuer system 110), and / or user device 1 12 (e.g., one or more devices of a system of user device 1 12).
[0097] As shown in FIG. 3, at step 302, process 300 includes obtaining a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories. For example, transaction service provider system 108 may obtain a training dataset including a plurality of labels (e.g., binary labels, etc.) for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories.
[0098] In some non-limiting embodiments or aspects, the plurality of samples may correspond to a plurality of historical transactions processed in transaction processing network 101 (e.g., in an electronic payment network, etc.) For example, a categorical variable may correspond to a transaction parameter associated with the plurality of historical transactions, and / or a label for a transaction may include an indication of whether the transaction was authorized or denied in transaction processing network 101. As an example, a categorical variable may include a transaction parameter associated with a historical transaction processed in transaction processing network 101.
[0099] As shown in FIG. 3, at step 304, process 300 includes calculating, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable. For example, transaction service provider system 108 may calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable.
[0100] Transaction service provider system 108 may calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category. For example, a target variable rate or percentage for a particular category of a categorical variable may include an average of the labels (e.g., the label is what is to be predicted by the model, etc.) for a subset of the samples in which the categorical variable includes that particular category as the value for the categorical sample. As an example, for an example categorical variable associated with categories “low”, “medium”, and “high”, the target variable rate for the category “low” may be calculated as an average of the binary labels for the subset of the samples in which the categorical variable includes the category “low” as the value for the categorical sample. For example, if the binarylabels for the subset of the samples in which the categorical variable includes the category “low” as the value for the categorical sample is {1 , 0, 0, 0}, the target variable rate for the category “low” is 0.25.
[0101] Referring now to FIG. 4A, FIG. 4A is a table of example training samples including example categorical variables. As shown in FIG. 4A, the example training samples 1 -N may include values for example categorical variables 1 -N. For example, a first categorical variable Cat. Var. 1 (e.g., FJSSR, etc.) is shown as including a same category value (e.g., F_ISSR_REGN_LAC, etc.) for each of the example training samples 1 -4 and N, while third categorical variable Cat. Var. 3 (e.g., F_ECMOTO, etc.) is shown as including a same category value (e.g., F_ECMOTO_GRP1 , etc.) for example samples 1 , 3, 4, and N but a different value (e.g., F_ECMOTO_GRP2, etc.) for the example sample 2.
[0102] As shown in FIG. 3, at step 306, process 300 includes sorting, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order. For example, transaction service provider system 108 may sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order.
[0103] Referring now to FIG. 4B, FIG. 4B is a table of example categories of an example categorical variable sorted in an ascending order according to calculated target variable rate. As shown in FIG. 4B, the first example categorical variable Cat. Var. 1 (e.g., FJSSR, etc.) has a cardinality of six (6) (e.g., six (6) possible categories, etc.), and the calculated target variable rate for each of the six (6) categories is shown in the far right column of the table. As further shown in FIG. 4B, the six (6) categories are sorted in ascending order according to the target variable rates of the six (6) categories.
[0104] As shown in FIG. 3, at step 308, process 300 includes assigning the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories. For example, transaction service provider system 108 may assign the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value (e.g., an initial integer value, zero, etc.) to the initial numerical value plus or minus a cardinality of the plurality of categories (e.g., to a cardinality of the plurality of categories, etc.). As an example, and referring again to FIG. 4B, in which the six (6) categories of the first examplecategorical variable Cat. Var. 1 (e.g., FJSSR, etc.) are sorted in ascending order according to the target variable rates of the six (6) categories, the six (6) categories of the first example categorical variable Cat. Var. 1 (e.g., FJSSR, etc.) are assigned a numerical value (Num. Vai.) from an initial integer value (e.g., zero (0), etc.) to the initial integer value plus or minus a cardinality of the plurality of categories (e.g., to zero (0) + six (6) = five (5), etc.). For example, the six (6) categories of the first example categorical variable Cat. Var. 1 (e.g., FJSSR, etc.) may be numbered in ascending order over numerical values in a range defined by the cardinality of the categories.
[0105] As shown in FIG. 3, at step 310, process 300 includes ordinally encoding the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset. For example, transaction service provider system 108 may ordinally encode the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset. As an example, and referring now to FIG. 4C, which is a table of example training samples including example ordinally encoded categorical variables, values of the ordinally encoded first example categorical variable Cat. Var. 1 (e.g., FJSSR, etc.) for each of the example training samples 1 -4 and N are the same (e.g., four (4), etc.) because each of the example training samples 1 -4 and N had the same category value (e.g., FJSSR_REGN_LAC, etc.), which was assigned the numerical value four (4). However, values of the ordinally encoded third categorical variable Cat. Var. 3 (e.g., F_ECMOTO, etc.) for the example samples 1 , 3, 4, and N have a different value than the value of the ordinally encoded third categorical variable Cat. Var. 3 (e.g., F_ECMOTO, etc.) for the example sample 2 because the example training samples 1 , 3, 4, and N had a different category value (e.g., F_ECMOTO_GRP1 , etc.) than the category value for the example sample (e.g., F_ECMOTO_GRP2, etc.), which were assigned the numerical values zero (0) and two (2), respectively.
[0106] As shown in FIG. 3, at step 312, process 300 includes training, using a treebased machine learning algorithm and the encoded training dataset, a tree-based machine learning model. For example, transaction service provider system 108 may train, using a tree-based machine learning algorithm and the encoded training dataset,a tree-based machine learning model. As an example, transaction service provider system 108 may provide, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receive, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimize a loss or objective function (e.g., a misclassification rate function, an expected loss function, a cross-entropy function, etc.) that depends on the plurality of predicted labels and the plurality of labels. In such an example, transaction service provider system 108 may modify, using the loss function, one or more parameters of the tree-based machine learning model.
[0107] In some non-limiting embodiments or aspects, a tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
[0108] As shown in FIG. 3, at step 314, process 300 includes providing the trained tree-based machine learning model. For example, transaction service provider system 108 may provide the trained tree-based machine learning model. As an example, transaction service provider system 108 may store the model in a data structure (e.g., a database, a linked list, a tree, etc.). In some non-limiting embodiments, the data structure is located within transaction service provider system 108 or external (e.g., remote from) transaction service provider system 108.
[0109] As shown in FIG. 3, at step 316, process 300 includes receiving transaction data associated with a transaction currently being processed in the electronic payment network. For example, transaction service provider system 108 may receive transaction data associated with a transaction currently being processed in the electronic payment network (e.g., in transaction processing network 101 , etc.).
[0110] In some non-limiting embodiments or aspects, transaction data may include transaction parameters or variables associated with a transaction, such as an account identifier (e.g., a PAN, etc.), a transaction amount, a transaction date and time, a type of products and / or services associated with the transaction, a conversion rate of currency, a type of currency, a merchant type, a merchant name, a merchant location, a transaction approval (and / or decline) rate, and / or the like. For example, the transaction data may include the at least one categorical variable associated with the transaction. As an example, the at least one categorical variable associated withthe transaction may be ordinally encoded according to the plurality of numerical values assigned to the plurality of categories of the at least one categorical variable.
[0111] As shown in FIG. 3, at step 318, process 300 includes processing, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction. For example, transaction service provider system 108 may process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction. As an example, transaction service provider system 108 may provide, as input to the trained tree-based machine learning model, the transaction data including the at least one ordinally encoded categorical variable associated with the transaction, and receive, as output from the trained tree-based machine learning model, a prediction (e.g., a probability, a likelihood, a yes / no, etc.) of whether to authorize or deny the transaction. In such an example, transaction service provider system 108 may process, using the trained tree-based machine learning model, the transaction data to classify the transaction as a fraudulent or non-fraudulent transaction. As an example, transaction service provider system 108 may provide, as input to the trained treebased machine learning model, the transaction data including the at least one ordinally encoded categorical variable associated with the transaction and receive, as output from the trained machine learning classifier, a prediction (e.g., a probability, a likelihood, a yes / no, etc.) that the transaction is a fraudulent or non-fraudulent transaction.
[0112] As shown in FIG. 3, at step 320, process 300 includes, in response to determining whether to authorize or deny the transaction, authorizing or denying the transaction in the electronic payment network (e.g., in transaction processing network 101 , etc.). For example, transaction service provider system 108 may, in response to determining whether to authorize or deny the transaction, authorize or deny the transaction in the electronic payment network. As an example, transaction service provider system 108 may, in response to classifying the transaction as a fraudulent transaction, deny authorization of the transaction in transaction processing network 101. As an example, transaction service provider system 108 may, in response to classifying the transaction as a non-fraudulent transaction, authorize the transaction in transaction processing network 101.
[0113] Accordingly, because many categorical or qualitative variables do not have a natural ordinal relationship, non-limiting embodiments or aspects of the presentdisclosure may leverage the label concentration-based technique that incorporates label density encapsulation for categories in categorical or qualitative variables to perform ordinal encoding for the categorical or qualitative variables by, for each column or categorical variable, calculating the target variable rate for each category, sorting in ascending order of the target variable rate the categories, and ordinally encoding from fzero (0) to cardinality.
[0114] Although embodiments or aspects have been described in detail for the purpose of illustration and description, it is to be understood that such detail is solely for that purpose and that embodiments or aspects are not limited to the disclosed embodiments or aspects, but, on the contrary, are intended to cover modifications and equivalent arrangements that are within the spirit and scope of the appended claims. For example, it is to be understood that the present disclosure contemplates that, to the extent possible, one or more features of any embodiment or aspect can be combined with one or more features of any other embodiment or aspect. In fact, any of these features can be combined in ways not specifically recited in the claims and / or disclosed in the specification. Although each dependent claim listed below may directly depend on only one claim, the disclosure of possible implementations includes each dependent claim in combination with every other claim in the claim set.
Claims
WHAT IS CLAIMED IS:1 . A method, comprising: obtaining, with at least one processor, a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculating, with the at least one processor, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sorting, with the at least one processor, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assigning, with the at least one processor, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encoding, with the at least one processor, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and training, with the at least one processor, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
2. The method of claim 1 , wherein calculating, with the at least one processor, based on the plurality of labels, the target variable rate for each category of the plurality of categories includes determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
3. The method of claim 2, wherein the plurality of labels includes a plurality of binary labels.
4. The method of claim 1 , wherein training, with the at least one processor, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model includes: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
5. The method of claim 1 , wherein the tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
6. The method of claim 1 , wherein the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
7. The method of claim 6, further comprising: providing, with the at least one processor, the trained tree-based machine learning model; receiving, with the at least one processor, transaction data associated with a transaction currently being processed in the electronic payment network; processing, with the at least one processor, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, denying, with the at least one processor, authorization of the transaction in the electronic payment network.
8. A system, comprising: at least one processor coupled to a memory and configured to:obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable; sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
9. The system of claim 8, wherein the at least one processor is configured to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
10. The system of claim 9, wherein the plurality of labels includes a plurality of binary labels.1 1 . The system of claim 8, wherein the at least one processor is configured to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable;receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
12. The system of claim 8, wherein the tree-based machine learning algorithm includes at least one of the following: a light gradient-boosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
13. The system of claim 8, wherein the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network.
14. The system of claim 13, wherein the at least one processor is further configured to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.
15. A computer program product including a non-transitory computer readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to: obtain a training dataset including a plurality of labels for a plurality of samples, wherein each sample of the plurality of samples includes at least one categorical variable associated with a plurality of categories; calculate, based on the plurality of labels for the plurality of samples, a target variable rate for each category of the plurality of categories of the at least one categorical variable;sort, according to the target variable rate for each category, the plurality of categories of the at least one categorical variable in an ascending order; assign, the plurality of categories sorted in the ascending order to a plurality of numerical values from an initial numerical value to the initial numerical value plus or minus a cardinality of the plurality of categories; ordinally encode, the at least one categorical variable of the plurality of samples of the training data set according to the plurality of numerical values assigned to the plurality of categories sorted in the ascending order to generate an encoded training dataset; and train, using a tree-based machine learning algorithm and the encoded training dataset, a tree-based machine learning model.
16. The computer program product of claim 15, wherein the program instructions, when executed by the at least one processor, cause the at least one processor to calculate, based on the plurality of labels, the target variable rate for each category of the plurality of categories by determining, for each category of the plurality of categories, an average of a subset of the labels of the plurality of labels associated with that category.
17. The computer program product of claim 16, wherein the plurality of labels includes a plurality of binary labels.
18. The computer program product of claim 15, wherein the program instructions, when executed by the at least one processor, cause the at least one processor to train, using the tree-based machine learning algorithm and the encoded training dataset, the tree-based machine learning model by: providing, as input to the tree-based machine learning model, the plurality of samples including the ordinally encoded at least one categorical variable; receiving, as output from the tree-based machine learning model, a plurality of predicted labels for the plurality of samples including the ordinally encoded at least one categorical variable; and optimizing a loss function that depends on the plurality of predicted labels and the plurality of labels.
19. The computer program product of claim 15, wherein the tree-based machine learning algorithm includes at least one of the following: a light gradientboosting machine (LightGBM) algorithm, a random forest algorithm, a decision tree algorithm, or any combination thereof.
20. The computer program product of claim 15, wherein the at least one categorical variable includes at least one transaction parameter associated with at least one historical transaction processed in an electronic payment network, and wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to: provide the trained tree-based machine learning model; receive transaction data associated with a transaction currently being processed in the electronic payment network; process, using the trained tree-based machine learning model, the transaction data to determine whether to authorize or deny the transaction; and in response to determining to deny the transaction, deny authorization of the transaction in the electronic payment network.