Train Keras LSTM for sequential data where all labels except the last one of every sequence are given Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsDeep Learning with Spectrograms for sound recognitionPredict the next player's option for betting based on playing history?Keras data structure for LSTM-networksWhat is the proper train data format in LSTM?Shaping data for ConvLSTM for many-to-one image modelBeyond one-hot encoding for LSTM model in KerasHandle 50,000 classes in OneVsRestClassifierHow to reshape data for LSTM training in multivariate sequence predictionHow to deal with classification where all target classes are independent (keras & image recognition)Grouping the Input Features for LSTM (keras)

What are the discoveries that have been possible with the rejection of positivism?

How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?

How to report t statistic from R

How can I set the aperture on my DSLR when it's attached to a telescope instead of a lens?

Is there hard evidence that the grant peer review system performs significantly better than random?

What does 丫 mean? 丫是什么意思?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

Sliceness of knots

Unit testing extension method adding view location expander

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

Project Euler #1 in C++

How do I find out the mythology and history of my Fortress?

What to do with repeated rejections for phd position

How could we fake a moon landing now?

What is the difference between a "ranged attack" and a "ranged weapon attack"?

How much damage would a cupful of neutron star matter do to the Earth?

What's the point of the test set?

Why weren't discrete x86 CPUs ever used in game hardware?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

macOS: Name for app shortcut screen found by pinching with thumb and three fingers

Flash light on something

Why we try to capture variability?

A letter with no particular backstory



Train Keras LSTM for sequential data where all labels except the last one of every sequence are given



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsDeep Learning with Spectrograms for sound recognitionPredict the next player's option for betting based on playing history?Keras data structure for LSTM-networksWhat is the proper train data format in LSTM?Shaping data for ConvLSTM for many-to-one image modelBeyond one-hot encoding for LSTM model in KerasHandle 50,000 classes in OneVsRestClassifierHow to reshape data for LSTM training in multivariate sequence predictionHow to deal with classification where all target classes are independent (keras & image recognition)Grouping the Input Features for LSTM (keras)










0












$begingroup$


I am currently working on a data set where there are sequences of trips for certain people from one cluster to another.

The beginning cluster does not equal to the finishing cluster from the trip before.

My task is to predict the cluster a person will end up in on his last trip.

So I have got labels for all ending cluster except for the very last one of every trip.

I would like to use a Keras LSTM to solve this problem, but I don't know how!

It seems like a many-to-one problem, but I cant convert the ending clusters to features, as the last sequence would lack that crucial feature!

It also seems like a many-to-many problem on the far right of the image below, is there a way to give these n-1 labels to the model and expect to receive a correct answer for the last prediction?

How could I proceed to solve this problem?



enter image description here










share|improve this question









$endgroup$
















    0












    $begingroup$


    I am currently working on a data set where there are sequences of trips for certain people from one cluster to another.

    The beginning cluster does not equal to the finishing cluster from the trip before.

    My task is to predict the cluster a person will end up in on his last trip.

    So I have got labels for all ending cluster except for the very last one of every trip.

    I would like to use a Keras LSTM to solve this problem, but I don't know how!

    It seems like a many-to-one problem, but I cant convert the ending clusters to features, as the last sequence would lack that crucial feature!

    It also seems like a many-to-many problem on the far right of the image below, is there a way to give these n-1 labels to the model and expect to receive a correct answer for the last prediction?

    How could I proceed to solve this problem?



    enter image description here










    share|improve this question









    $endgroup$














      0












      0








      0





      $begingroup$


      I am currently working on a data set where there are sequences of trips for certain people from one cluster to another.

      The beginning cluster does not equal to the finishing cluster from the trip before.

      My task is to predict the cluster a person will end up in on his last trip.

      So I have got labels for all ending cluster except for the very last one of every trip.

      I would like to use a Keras LSTM to solve this problem, but I don't know how!

      It seems like a many-to-one problem, but I cant convert the ending clusters to features, as the last sequence would lack that crucial feature!

      It also seems like a many-to-many problem on the far right of the image below, is there a way to give these n-1 labels to the model and expect to receive a correct answer for the last prediction?

      How could I proceed to solve this problem?



      enter image description here










      share|improve this question









      $endgroup$




      I am currently working on a data set where there are sequences of trips for certain people from one cluster to another.

      The beginning cluster does not equal to the finishing cluster from the trip before.

      My task is to predict the cluster a person will end up in on his last trip.

      So I have got labels for all ending cluster except for the very last one of every trip.

      I would like to use a Keras LSTM to solve this problem, but I don't know how!

      It seems like a many-to-one problem, but I cant convert the ending clusters to features, as the last sequence would lack that crucial feature!

      It also seems like a many-to-many problem on the far right of the image below, is there a way to give these n-1 labels to the model and expect to receive a correct answer for the last prediction?

      How could I proceed to solve this problem?



      enter image description here







      neural-network keras lstm multilabel-classification sequence






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 21 mins ago









      DennyDenny

      111




      111




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f49618%2ftrain-keras-lstm-for-sequential-data-where-all-labels-except-the-last-one-of-eve%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f49618%2ftrain-keras-lstm-for-sequential-data-where-all-labels-except-the-last-one-of-eve%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          ValueError: Error when checking input: expected conv2d_13_input to have shape (3, 150, 150) but got array with shape (150, 150, 3)2019 Community Moderator ElectionError when checking : expected dense_1_input to have shape (None, 5) but got array with shape (200, 1)Error 'Expected 2D array, got 1D array instead:'ValueError: Error when checking input: expected lstm_41_input to have 3 dimensions, but got array with shape (40000,100)ValueError: Error when checking target: expected dense_1 to have shape (7,) but got array with shape (1,)ValueError: Error when checking target: expected dense_2 to have shape (1,) but got array with shape (0,)Keras exception: ValueError: Error when checking input: expected conv2d_1_input to have shape (150, 150, 3) but got array with shape (256, 256, 3)Steps taking too long to completewhen checking input: expected dense_1_input to have shape (13328,) but got array with shape (317,)ValueError: Error when checking target: expected dense_3 to have shape (None, 1) but got array with shape (7715, 40000)Keras exception: Error when checking input: expected dense_input to have shape (2,) but got array with shape (1,)

          Ружовы пелікан Змест Знешні выгляд | Пашырэнне | Асаблівасці біялогіі | Літаратура | НавігацыяДагледжаная версіяправерана1 зменаДагледжаная версіяправерана1 змена/ 22697590 Сістэматыкана ВіківідахВыявына Вікісховішчы174693363011049382

          Illegal assignment from SObject to ContactFetching String, Id from Map - Illegal Assignment Id to Field / ObjectError: Compile Error: Illegal assignment from String to BooleanError: List has no rows for assignment to SObjectError on Test Class - System.QueryException: List has no rows for assignment to SObjectRemote action problemDML requires SObject or SObject list type error“Illegal assignment from List to List”Test Class Fail: Batch Class: System.QueryException: List has no rows for assignment to SObjectMapping to a user'List has no rows for assignment to SObject' Mystery