简体   繁体   中英

How do I create a LSTM model with two inputs

I have two csv files, the first one with two columns contains students' marks in different subjects and the second one with three columns is containg two student's ids and a comparison about the best one, so I have to train this data to get coefficients and make a score for each student.

I'm trying an LSTM model but I don't know how to use two files as inputs and how to choose train data and test one.

Here you have a problem with the data I'm afraid.

You can not extract the note from that student because you do not have it. The only thing that occurs to me is that you could reorient your problem and do the following:

  1. Create an LSTM that evaluates the subjects of a student.

  2. Create a network that compares you with another student and tells you if it is better or worse (through step 1). It is known as the Siamese network.

You have what is said LSTM siamese.

What you could do in prediction is to know if a student based on the grades in their subjects have better or worse than another student.

EDIT :

Maybe is useful one architecture similar than these.

在此处输入图片说明

Use LSTM to get the information of any subject and corresponent mark.

When the information is condensed, I concatenate this information and the student one-hot.

We use a Dense or multiple dense to get mark with sigmoid activation in the last layer.

We use a loss function to maximize the note of a with respect b when a is better than b. And otherwise.

y_i is your target in 1 o -1. Is 1 when the student a is better than the student b, and is -1 when the student a is worse than student b.

I have never tried this type of loss function, so I can not tell you if it works or not. It is based on the loss that SVM uses: https://en.wikipedia.org/wiki/Support-vector_machine

Maybe another user can guide you better.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM