Body: <p>I just recently got into machine learning, and have been hitting a lot of obstacles understanding the algorithms involved in the programmings. My issue isnt with the programming, but how they're translated from math to code. ML is popular with python, and that's okay, but i dont like python, and i dont want to have to learn <em>it</em> to be able to use the programming language of <em>my</em> choice, to do the <em>exact</em> same thing but in a way i feel comfortable (i dont care if python is popular for math majors, because it's easier for them to understand -- it isnt for me, when nothing being done is explained thoroughly.). </p>
  
  <p>I'm trying to decipher this model
  <a href="https://i.sstatic.net/TX5OS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TX5OS.png" alt="Algorithm logic"></a></p>
  
  <p>this is the breakdown for the algorithm model
  <a href="https://i.sstatic.net/ACOJ3.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ACOJ3.jpg" alt="Learning Vector Quantization"></a></p>
  
  <p>this is the math i was able to decipher for this particular model
  <a href="https://i.sstatic.net/lkBjE.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lkBjE.jpg" alt="Math Equation"></a>
  (Left is terminology and their usage, the middle in black was something to do with programming arrays... below it is the equation used in bottom left, but more elaborate, and underneath that is a image that says the same thing the algorithm is doing.. because sometimes pictures are easier to understand that words <code>VectorArray(Value) * VectorArray(Weight) + SingleUnit(Bias) = Neuron(Node)</code>)</p>
  
  <p>But then everything stops at the middle layer of the second image. How do i get the full output to give me a <code>yes</code> or <code>no</code> response?
  How do i enter in the variables and tables to go thru the math steps?
  Is my understanding correct, or am i lacking somewhere?</p>
  
  <p><a href="https://ai.stackexchange.com/questions/5638/hand-computing-feed-forward-and-back-propagation-of-neural-network">This user is also sharing the same algorithm but our math dont look the same</a>
  How do i go from what i have, to what [s]he has?</p>
  
  <p>At the end of all of these questions, i'm going to write everything into a programming script, that'll use a different language from python (and i would need to manually create resources from scratch, because no one else thinks machine learning should be done in other languages -- it seems...). I want to be able to understand the process itself, without just doing cookie-cutter actions (tools made by users for those too lazy to do the work -- which circumvent the learning/understanding process of what's going on behind scenes).</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T06:07:57.540Z
Comments.Text: could you please rewrite to make it clearer, I think you can remove some information that I think isn't relevant to the main question (like your opinion with python) and explain each picture you put in there
Comments.UserDisplayName: malioboro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T07:45:19.373Z
Comments.Text: i dont know how to make it clearer... my opinion was added because i stated i wanted to use programming as end goal but could not find any resources that applied to what it is i wanted to do. which was not use python cause it wasnt convenient enough for me to follow along with. If popularity dictates the results i query, then i have to specify i dont want "popular" results, and that i'm seeking something against the norm... All i want to do is understand the math better, so that i can write a code that does the same thing. But if i dont understand it, i cant explain it so that others can...
Comments.UserDisplayName: user3681384
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:05:00.137Z
Comments.Text: Are you trying to understand the maths for a normal feed-forward neural network used as a binary classifier? That's what it looks like, but you barely mention those terms, and you are asking a very generic (impossible to answer) question in your title. "How to translate algorithm from logic to equation, and back?" is impossible to answer. However, if you gave a specific part of the maths or the code for a neural network, many people on this site could easily convert between the two for any specific part.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:08:38.197Z
Comments.Text: I dont understand any of those terminologies, i tried to state that i am new to the technology, and that research into the subject is difficult because all resources around the subject is cluttered around python programming. If i google "Machine Learning" i get nothing but python results. If i google "Machine Learning -python" then i dont get anything that teaches me the math/concept. I went with what i was able to understand, if you can help fill in any gaps, i would be very much appreciative. It's something i would like to learn, but if i cant, then i just wont. :/
Comments.UserDisplayName: user3681384
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:19:57.013Z
Comments.Text: OK, your first goal then is to narrow down what you want to understand and explain it *in the question* in ways that answerers have a clue on what you are asking about. Otherwise this question will go nowhere. There are 100s of ML algorithms, and many variations of neural networks. You need to understand what you want to do at a high level - at least the *name* of it, before anyone can even know what you are trying to achieve
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:26:54.630Z
Comments.Text: So, just to clarify, validating if the math is good or not will not be a good question to ask if i'm unable to specify the algorithm it came from? what about the linked stack question, on getting my math to look like theirs, is that also out of the scope? There are a lot of greek symbols floating around in ML math that arent clearly explained, and i'm not entirely sure how or where to fill in those gaps either. Only reason i understood sigmoid was because i deconstructed the formula above. But i got stuck when a python script i was rewriting stopped making sense to me... i wanted to keep going
Comments.UserDisplayName: user3681384
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:35:46.067Z
Comments.Text: If your math was presented more formally, it could maybe be validated of its own accord. But the photo of your workings on a whiteboard here is not really maths . . . it is just a bunch of equations and diagrams without much context (I could not verify that it matched the code you were looking at for instance, and it doesn't match the vector quantization diagram, but I suspect you have just accidentally chosen the wrong diagram here). For what it is worth, your workings do look like a correct interpretation of how a single NN layer feeds forward in order to make a prediction.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:41:59.593Z
Comments.Text: I suggest you drop the images, give relevant parts of the python script - including both the part you have interpreted already and the part that you are stuck on. Please use LaTex to show your interpretation as an equation, not photos of whiteboards - you can embed LaTex using `$ $` sign e.g. `$y_i = \sigma(W_{i,1}x_1 + W_{i,2}x_2 ... + b_i))$` becomes $y_i = \sigma(W_{i,1}x_1 + W_{i,2}x_2 ... + b_i))$
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:44:30.403Z
Comments.Text: Actually I can see what I think is an error in your maths. However, not sure if just a typo or if I am misunderstanding it without the context that I am asking for
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-14T08:47:17.973Z
Comments.Text: Thank you, will take some time to reevaluate the code and question, to adjust for feedback provided.
Comments.UserDisplayName: user3681384
Tags: <neural-networks><machine-learning><algorithm>
Title: How to translate algorithm from logic to equation, and back?
UserDisplayName: user3681384
ThreadText: # How to translate algorithm from logic to equation, and back?
  
  (Asked by: username_0 on 2019-03-14)
  
  I just recently got into machine learning, and have been hitting a lot of obstacles understanding the algorithms involved in the programmings. My issue isnt with the programming, but how they're translated from math to code. ML is popular with python, and that's okay, but i dont like python, and i dont want to have to learn *it* to be able to use the programming language of *my* choice, to do the *exact* same thing but in a way i feel comfortable (i dont care if python is popular for math majors, because it's easier for them to understand -- it isnt for me, when nothing being done is explained thoroughly.).
  
  I'm trying to decipher this model
  [![Algorithm logic](https://i.sstatic.net/TX5OS.png)](https://i.sstatic.net/TX5OS.png)
  
  this is the breakdown for the algorithm model
  [![Learning Vector Quantization](https://i.sstatic.net/ACOJ3.jpg)](https://i.sstatic.net/ACOJ3.jpg)
  
  this is the math i was able to decipher for this particular model
  [![Math Equation](https://i.sstatic.net/lkBjE.jpg)](https://i.sstatic.net/lkBjE.jpg)
  (Left is terminology and their usage, the middle in black was something to do with programming arrays... below it is the equation used in bottom left, but more elaborate, and underneath that is a image that says the same thing the algorithm is doing.. because sometimes pictures are easier to understand that words `VectorArray(Value) * VectorArray(Weight) + SingleUnit(Bias) = Neuron(Node)`)
  
  But then everything stops at the middle layer of the second image. How do i get the full output to give me a `yes` or `no` response?
  How do i enter in the variables and tables to go thru the math steps?
  Is my understanding correct, or am i lacking somewhere?
  
  [This user is also sharing the same algorithm but our math dont look the same](https://ai.stackexchange.com/questions/5638/hand-computing-feed-forward-and-back-propagation-of-neural-network)
  How do i go from what i have, to what [s]he has?
  
  At the end of all of these questions, i'm going to write everything into a programming script, that'll use a different language from python (and i would need to manually create resources from scratch, because no one else thinks machine learning should be done in other languages -- it seems...). I want to be able to understand the process itself, without just doing cookie-cutter actions (tools made by users for those too lazy to do the work -- which circumvent the learning/understanding process of what's going on behind scenes).
  
  **Tags:** neural-networks, machine-learning, algorithm
  
  > **Comments:**
  > **username_1**: could you please rewrite to make it clearer, I think you can remove some information that I think isn't relevant to the main question (like your opinion with python) and explain each picture you put in there  
  > **username_0**: i dont know how to make it clearer... my opinion was added because i stated i wanted to use programming as end goal but could not find any resources that applied to what it is i wanted to do. which was not use python cause it wasnt convenient enough for me to follow along with. If popularity dictates the results i query, then i have to specify i dont want "popular" results, and that i'm seeking something against the norm... All i want to do is understand the math better, so that i can write a code that does the same thing. But if i dont understand it, i cant explain it so that others can...  
  > **username_2**: Are you trying to understand the maths for a normal feed-forward neural network used as a binary classifier? That's what it looks like, but you barely mention those terms, and you are asking a very generic (impossible to answer) question in your title. "How to translate algorithm from logic to equation, and back?" is impossible to answer. However, if you gave a specific part of the maths or the code for a neural network, many people on this site could easily convert between the two for any specific part.  
  > **username_0**: I dont understand any of those terminologies, i tried to state that i am new to the technology, and that research into the subject is difficult because all resources around the subject is cluttered around python programming. If i google "Machine Learning" i get nothing but python results. If i google "Machine Learning -python" then i dont get anything that teaches me the math/concept. I went with what i was able to understand, if you can help fill in any gaps, i would be very much appreciative. It's something i would like to learn, but if i cant, then i just wont. :/  
  > **username_2**: OK, your first goal then is to narrow down what you want to understand and explain it *in the question* in ways that answerers have a clue on what you are asking about. Otherwise this question will go nowhere. There are 100s of ML algorithms, and many variations of neural networks. You need to understand what you want to do at a high level - at least the *name* of it, before anyone can even know what you are trying to achieve  
  > **username_0**: So, just to clarify, validating if the math is good or not will not be a good question to ask if i'm unable to specify the algorithm it came from? what about the linked stack question, on getting my math to look like theirs, is that also out of the scope? There are a lot of greek symbols floating around in ML math that arent clearly explained, and i'm not entirely sure how or where to fill in those gaps either. Only reason i understood sigmoid was because i deconstructed the formula above. But i got stuck when a python script i was rewriting stopped making sense to me... i wanted to keep going  
  > **username_2**: If your math was presented more formally, it could maybe be validated of its own accord. But the photo of your workings on a whiteboard here is not really maths . . . it is just a bunch of equations and diagrams without much context (I could not verify that it matched the code you were looking at for instance, and it doesn't match the vector quantization diagram, but I suspect you have just accidentally chosen the wrong diagram here). For what it is worth, your workings do look like a correct interpretation of how a single NN layer feeds forward in order to make a prediction.  
  > **username_2**: I suggest you drop the images, give relevant parts of the python script - including both the part you have interpreted already and the part that you are stuck on. Please use LaTex to show your interpretation as an equation, not photos of whiteboards - you can embed LaTex using `$ $` sign e.g. `$y_i = \sigma(W_{i,1}x_1 + W_{i,2}x_2 ... + b_i))$` becomes $y_i = \sigma(W_{i,1}x_1 + W_{i,2}x_2 ... + b_i))$  
  > **username_2**: Actually I can see what I think is an error in your maths. However, not sure if just a typo or if I am misunderstanding it without the context that I am asking for  
  > **username_0**: Thank you, will take some time to reevaluate the code and question, to adjust for feedback provided.  
  
  ---
  
  ## 0 answers
  
  