Which ML method would be best for deriving a rough formula for prediction based on existing data?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Which ML method would you say is the easiest to derive a mathematical formula from based on already existing data of predictor stats and outcome?



I have this data:



Opponent 1:



  • Strength: x

  • Battle Score: y

I also have a model that I put against the opponent:



Opponent 2:



  • Strength: z

  • Battle Score: k

Finally, all outcomes of fights are written into a database (which currently has around 2800 outcomes) and look something like this model:



Fight:



  • Strength: x - z

  • Battle Score: y - k

  • Outcome: win/lose

I would want to get proper weights for Strength and Battle Score, so I can derive a simple formula from it and thus somewhat predict whether the next fight will be won or lost.










share|improve this question









New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Linear regression will do the job here
    – Aditya
    2 hours ago














up vote
1
down vote

favorite












Which ML method would you say is the easiest to derive a mathematical formula from based on already existing data of predictor stats and outcome?



I have this data:



Opponent 1:



  • Strength: x

  • Battle Score: y

I also have a model that I put against the opponent:



Opponent 2:



  • Strength: z

  • Battle Score: k

Finally, all outcomes of fights are written into a database (which currently has around 2800 outcomes) and look something like this model:



Fight:



  • Strength: x - z

  • Battle Score: y - k

  • Outcome: win/lose

I would want to get proper weights for Strength and Battle Score, so I can derive a simple formula from it and thus somewhat predict whether the next fight will be won or lost.










share|improve this question









New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Linear regression will do the job here
    – Aditya
    2 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Which ML method would you say is the easiest to derive a mathematical formula from based on already existing data of predictor stats and outcome?



I have this data:



Opponent 1:



  • Strength: x

  • Battle Score: y

I also have a model that I put against the opponent:



Opponent 2:



  • Strength: z

  • Battle Score: k

Finally, all outcomes of fights are written into a database (which currently has around 2800 outcomes) and look something like this model:



Fight:



  • Strength: x - z

  • Battle Score: y - k

  • Outcome: win/lose

I would want to get proper weights for Strength and Battle Score, so I can derive a simple formula from it and thus somewhat predict whether the next fight will be won or lost.










share|improve this question









New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Which ML method would you say is the easiest to derive a mathematical formula from based on already existing data of predictor stats and outcome?



I have this data:



Opponent 1:



  • Strength: x

  • Battle Score: y

I also have a model that I put against the opponent:



Opponent 2:



  • Strength: z

  • Battle Score: k

Finally, all outcomes of fights are written into a database (which currently has around 2800 outcomes) and look something like this model:



Fight:



  • Strength: x - z

  • Battle Score: y - k

  • Outcome: win/lose

I would want to get proper weights for Strength and Battle Score, so I can derive a simple formula from it and thus somewhat predict whether the next fight will be won or lost.







machine-learning






share|improve this question









New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago









Francesco Pegoraro

52217




52217






New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









JCode

62




62




New contributor




JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






JCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Linear regression will do the job here
    – Aditya
    2 hours ago
















  • Linear regression will do the job here
    – Aditya
    2 hours ago















Linear regression will do the job here
– Aditya
2 hours ago




Linear regression will do the job here
– Aditya
2 hours ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote













If you want "the easiest" for "a simple formula", then for sure it will be a linear regression on the battle score, or a logistic regression on "win/lose". That way you'll have the coefficients of the model, and they will be interpretable (which you won't get from a neural network with hundreds of parameters).






share|improve this answer



























    up vote
    0
    down vote













    You have to do binary classification. Here is how in Keras:



    1. Organize your dataset so that it looks like a matrix or a pandas dataframe:

    enter image description here



    1. Outcome is going to be the label vector and the matrix without fight id and Outcome is going to be the features of the dataset.


    2. Divide the dataset in train and test, for example with scikit learn train_test_split



    3. Build a simple model with Keras



      model = Sequential()
      model.add(Dense(10, input_dim=4, activation='relu'))
      model.add(Dense(10, activation='relu'))
      model.add(Dropout(0.2))
      model.add(Dense(1, activation='sigmoid')
      model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']



    4. Train it:



      model.fit(train_x, train_y, epochs= 2, batch_size = 500, validation_data = (test_x, test_y))






    share|improve this answer




















      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      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',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      JCode is a new contributor. Be nice, and check out our Code of Conduct.









       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f39269%2fwhich-ml-method-would-be-best-for-deriving-a-rough-formula-for-prediction-based%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      If you want "the easiest" for "a simple formula", then for sure it will be a linear regression on the battle score, or a logistic regression on "win/lose". That way you'll have the coefficients of the model, and they will be interpretable (which you won't get from a neural network with hundreds of parameters).






      share|improve this answer
























        up vote
        2
        down vote













        If you want "the easiest" for "a simple formula", then for sure it will be a linear regression on the battle score, or a logistic regression on "win/lose". That way you'll have the coefficients of the model, and they will be interpretable (which you won't get from a neural network with hundreds of parameters).






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          If you want "the easiest" for "a simple formula", then for sure it will be a linear regression on the battle score, or a logistic regression on "win/lose". That way you'll have the coefficients of the model, and they will be interpretable (which you won't get from a neural network with hundreds of parameters).






          share|improve this answer












          If you want "the easiest" for "a simple formula", then for sure it will be a linear regression on the battle score, or a logistic regression on "win/lose". That way you'll have the coefficients of the model, and they will be interpretable (which you won't get from a neural network with hundreds of parameters).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 46 mins ago









          f.g.

          917




          917




















              up vote
              0
              down vote













              You have to do binary classification. Here is how in Keras:



              1. Organize your dataset so that it looks like a matrix or a pandas dataframe:

              enter image description here



              1. Outcome is going to be the label vector and the matrix without fight id and Outcome is going to be the features of the dataset.


              2. Divide the dataset in train and test, for example with scikit learn train_test_split



              3. Build a simple model with Keras



                model = Sequential()
                model.add(Dense(10, input_dim=4, activation='relu'))
                model.add(Dense(10, activation='relu'))
                model.add(Dropout(0.2))
                model.add(Dense(1, activation='sigmoid')
                model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']



              4. Train it:



                model.fit(train_x, train_y, epochs= 2, batch_size = 500, validation_data = (test_x, test_y))






              share|improve this answer
























                up vote
                0
                down vote













                You have to do binary classification. Here is how in Keras:



                1. Organize your dataset so that it looks like a matrix or a pandas dataframe:

                enter image description here



                1. Outcome is going to be the label vector and the matrix without fight id and Outcome is going to be the features of the dataset.


                2. Divide the dataset in train and test, for example with scikit learn train_test_split



                3. Build a simple model with Keras



                  model = Sequential()
                  model.add(Dense(10, input_dim=4, activation='relu'))
                  model.add(Dense(10, activation='relu'))
                  model.add(Dropout(0.2))
                  model.add(Dense(1, activation='sigmoid')
                  model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']



                4. Train it:



                  model.fit(train_x, train_y, epochs= 2, batch_size = 500, validation_data = (test_x, test_y))






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  You have to do binary classification. Here is how in Keras:



                  1. Organize your dataset so that it looks like a matrix or a pandas dataframe:

                  enter image description here



                  1. Outcome is going to be the label vector and the matrix without fight id and Outcome is going to be the features of the dataset.


                  2. Divide the dataset in train and test, for example with scikit learn train_test_split



                  3. Build a simple model with Keras



                    model = Sequential()
                    model.add(Dense(10, input_dim=4, activation='relu'))
                    model.add(Dense(10, activation='relu'))
                    model.add(Dropout(0.2))
                    model.add(Dense(1, activation='sigmoid')
                    model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']



                  4. Train it:



                    model.fit(train_x, train_y, epochs= 2, batch_size = 500, validation_data = (test_x, test_y))






                  share|improve this answer












                  You have to do binary classification. Here is how in Keras:



                  1. Organize your dataset so that it looks like a matrix or a pandas dataframe:

                  enter image description here



                  1. Outcome is going to be the label vector and the matrix without fight id and Outcome is going to be the features of the dataset.


                  2. Divide the dataset in train and test, for example with scikit learn train_test_split



                  3. Build a simple model with Keras



                    model = Sequential()
                    model.add(Dense(10, input_dim=4, activation='relu'))
                    model.add(Dense(10, activation='relu'))
                    model.add(Dropout(0.2))
                    model.add(Dense(1, activation='sigmoid')
                    model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']



                  4. Train it:



                    model.fit(train_x, train_y, epochs= 2, batch_size = 500, validation_data = (test_x, test_y))







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  Francesco Pegoraro

                  52217




                  52217




















                      JCode is a new contributor. Be nice, and check out our Code of Conduct.









                       

                      draft saved


                      draft discarded


















                      JCode is a new contributor. Be nice, and check out our Code of Conduct.












                      JCode is a new contributor. Be nice, and check out our Code of Conduct.











                      JCode is a new contributor. Be nice, and check out our Code of Conduct.













                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f39269%2fwhich-ml-method-would-be-best-for-deriving-a-rough-formula-for-prediction-based%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      White Anglo-Saxon Protestant

                      BuddyTV

                      Conflict (narrative)