A method of recommending exercise, the method being performed by executing instructions using a processor, the instructions being stored in a non-transitory computer-readable medium, the method comprising:
- generating, for first to n-th questions, first to n-th text combinations by combining at least some of a question text, which corresponds to a question itself, a hint text for the question, and a correct answer text for the question, n being an integer greater than or equal to 2;
- embedding the first to n-th text combinations into first to n-th question vectors having a predetermined length;
- calculating cosine similarity between the first to n-th question vectors to generate a question similarity matrix of size n*n in which a cosine similarity between a p-th question vector and a q-th question vector is an element (p, q), p and q being positive integers less than or equal to n;
- generating a first correlation matrix of size n*n by calculating Equation 1 below based on information on whether first to k-th users answered the first to n-th questions correctly or incorrectly, k being an integer greater than or equal to 2,
- RM1_
-
- (
- r
- ,
- s
- )
- =
- c_rs
- c_r
- *
- c_s
- [
- Equation
-
- 1
- ]
- wherein in Equation 1, r and s represent positive integers less than or equal to n, RM1_(r, s) represents an element (r, s) of the first correlation matrix, c_r represents a number of users among the first to k-th users who correctly answered a r-th question, c_s represents a number of users among the first to k-th users who correctly answered a s-th question, and c_rs represents a number of users among the first to k-th users who correctly answered both the r-th question and the s-th question;
- generating a second correlation matrix of size n*n by calculating Equation 2 below based on the information on whether the first to k-th users answered the first to n-th questions correctly or incorrectly,
- RM2_
-
- (
- r
- ,
- s
- )
- =
- i_rs
- i_r
- *
- i_s
- [
- Equation
-
- 2
- ]
- wherein in Equation 2, r and s represent positive integers less than or equal to n, RM2_(r, s) represents an element (r, s) of the second correlation matrix, i_r represents a number of users among the first to k-th users who incorrectly answered a r-th question, is represents a number of users among the first to k-th users who incorrectly answered a s-th question, and i_rs represents a number of users among the first to k-th users who incorrectly answered both the r-th question and the s-th question;
- generating a first determination matrix by multiplying the question similarity matrix and the first correlation matrix;
- generating a second determination matrix by multiplying the question similarity matrix and the second correlation matrix;
- selecting some of the first to n-th questions to provide the selected questions to a target user;
- receiving answering results of the target user for the provided questions;
- when the target user incorrectly answers a t-th question among the provided questions, calculating a similarity score for each of the remaining questions except for the t-th question among the first to n-th questions using Equation 3 below, t being a positive integer less than or equal to n,
- SC_j
- =
- SDM1_
-
- (
- t
- ,
- j
- )
- +
- SDM2_
-
- (
- t
- ,
- j
- )
- [
- Equation
-
- 3
- ]
- wherein in Equation 3, j represents a positive integer less than or equal to n and different from t, SC_j represents the similarity score for a j-th question, SDM1_(t, j) represents an element (t, j) of the first determination matrix, and SDM2_(t, j) represents an element (t, j) of the second determination matrix;
- and
- recommending a predetermined number of questions among the first to n-th questions to the target user in descending order of the similarity scores.