Answers.Body: <p>No, it does not take into account the curvature. But, if curvature is important for you, then, it would be a good idea to look at Ricci flow and its applications in neural networks.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-13T03:19:13.680Z
Answers.LastActivityDate: 2021-02-13T03:19:13.680Z
Answers.UserDisplayName: Abhishek Verma
Body: <p>I came across this sentence when exploring a simple nearest neighbor classifier method using Euclidean distance (<a href="https://buildingai.elementsofai.com/Machine-Learning/the-nearest-neighbor-method" rel="nofollow noreferrer">link</a>):</p>
  <blockquote>
  <p>The slightly odd thing about using the Euclidean distance to compare features is that each dimension (or feature) is compared using the same scale.</p>
  </blockquote>
  <p>This got me thinking - if flat feature space implies that each feature contributes equally to the distance (score function), then curved feature space changes the scale between features, so that the features then contribute different amounts to the score function. For example, imagine we have a 2D feature space - a flat piece of paper - with two points, <span class="math-container">$X_1$</span> and <span class="math-container">$X_2$</span> on it, between which we wish to calculate the distance. If we then bend this into U-shape along, say, y-axis (so, no curvature introduced in y-dimension), the distances along the x-axis would be larger in the bent case than in the flat case:</p>
  <p><a href="https://i.sstatic.net/8Wqrm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8Wqrm.png" alt="enter image description here" /></a></p>
  <p>In other words, feature x would contribute more to the score function than feature y. This sounds awfully like weighing the feature inputs with weight vectors. Does this imply, that weight vectors (and matrices) have a direct effect on curvature of feature space? Does an identity weight matrix (or a vector of all 1s) imply our feature space is flat (and curved otherwise)? Lastly, could it then be said that whenever we are training an ML model, we are in fact learning the approximate curvature of the feature space we wish to model?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-11T14:23:28.473Z
Comments.Text: When you say "I came across this sentence", it may be a good idea to provide the link to the source where you found this sentence.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-11T14:54:02.250Z
Comments.Text: Certainly - added the link. It's a free course on AI for beginners, titled "Building AI" as part of "Elements of AI" website. Although one might have to register in order to view the contents, I am not sure.
Comments.UserDisplayName: Nejc Kejzar
Tags: <weights><features>
Title: Does the weight vector form imply feature space curvature?
UserDisplayName: Nejc Kejzar
ThreadText: # Does the weight vector form imply feature space curvature?
  
  (Asked by: username_0 on 2021-02-11)
  
  I came across this sentence when exploring a simple nearest neighbor classifier method using Euclidean distance ([link](https://buildingai.elementsofai.com/Machine-Learning/the-nearest-neighbor-method)):
  
  > The slightly odd thing about using the Euclidean distance to compare features is that each dimension (or feature) is compared using the same scale.
  
  This got me thinking - if flat feature space implies that each feature contributes equally to the distance (score function), then curved feature space changes the scale between features, so that the features then contribute different amounts to the score function. For example, imagine we have a 2D feature space - a flat piece of paper - with two points, $X\_1$ and $X\_2$ on it, between which we wish to calculate the distance. If we then bend this into U-shape along, say, y-axis (so, no curvature introduced in y-dimension), the distances along the x-axis would be larger in the bent case than in the flat case:
  
  [![enter image description here](https://i.sstatic.net/8Wqrm.png)](https://i.sstatic.net/8Wqrm.png)
  
  In other words, feature x would contribute more to the score function than feature y. This sounds awfully like weighing the feature inputs with weight vectors. Does this imply, that weight vectors (and matrices) have a direct effect on curvature of feature space? Does an identity weight matrix (or a vector of all 1s) imply our feature space is flat (and curved otherwise)? Lastly, could it then be said that whenever we are training an ML model, we are in fact learning the approximate curvature of the feature space we wish to model?
  
  **Tags:** weights, features
  > **Comments:**
  > **username_1**: When you say "I came across this sentence", it may be a good idea to provide the link to the source where you found this sentence.  
  > **username_0**: Certainly - added the link. It's a free course on AI for beginners, titled "Building AI" as part of "Elements of AI" website. Although one might have to register in order to view the contents, I am not sure.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-02-13. Score: 1
  
  No, it does not take into account the curvature. But, if curvature is important for you, then, it would be a good idea to look at Ricci flow and its applications in neural networks.
  
  
  ---
  
  