CPC G06N 20/00 (2019.01) [G11C 13/004 (2013.01); G11C 13/0069 (2013.01); G11C 2013/0045 (2013.01)] | 11 Claims |
1. A method for training a classifier comprising a plurality of logistic regression classifiers on a dataset, each element of the dataset being represented by a vector x of M attributes, hereinafter referred to as components, and belonging to a class among a plurality of independent classes C1, C2, . . . , CQ or to a corresponding class among or the respective complementary classes of the independent classes C1, C2, . . . , CQ , the probability of an element x belonging to a class Ci among said plurality of independent classes C1, C2, . . . , CQ or to its respective complementary class being modelled by a logistic function applied to a score wti x of said element, i being an integer comprised between 1 and Q, where wi is a parameter vector of size M representing the model of said probability, said method comprising the sampling of said parameter vector according to its posterior probability density with respect to the data set, said method comprising:
providing a resistive RAM comprising cells which can be programmed in a first resistance state or a second resistance state, said resistive RAM comprising Q areas, or
providing Q resistive RAMs, each resistive RAM comprising cells which can be programmed in a first resistance state or a second resistance state, and each resistive RAM comprising an area,
each area comprising a set of rows, each row among the set of rows of said each area comprising at least one cell, each area being dedicated to a class Ci among said plurality of independent classes C1, C2, . . . , CQ and being associated to a corresponding logistic regression classifier, each row being intended to store a parameter vector related to said corresponding logistic regression classifier, a counter of occurrences being associated with each row;
for each area, implementing the following steps:
initializing said area by setting all cells of said area in said first resistance state;
reading an initial vector w0 from the first row of said area and entering an iterative loop comprising:
(a) generating a candidate parameter vector, ws, from the current parameter vector, ws−1, by reading the cells of the current row of the area and programming the resistances of the cells of the next row of the area, the resistances of the cells of the next row of the area being derived from the resistances of the cells of the current row of the area according to a Markovian process;
(b) computing an acceptance ratio, r, of the candidate parameter vector, ws, as the ratio of the posterior densities of ws and ws−1, with respect to the dataset;
(c) drawing a value u from a uniform distribution between 0 and 1 and comparing it with the acceptance ratio, r;
(d1) if u≤r taking the next row of the area as the current row of the area and jumping to step (a);
(d2) else, keeping the current row of the area, incrementing the counter of occurrences associated therewith and jumping to step (a);
the training method being stopped when a predetermined stopping criterion is met.
|