5 ms·
Show HN: Hottbox – Higher-Order Tensors Toolbox
- ktpsns 8y agoBeing a physicist in computational (general) relativity, when I read about a "tensor toolbox" I would think about a code implementing some kind of tensor algebra, such as a syntax to do tensor contractions.
- IlyaKisil 8y agoSorry for misleading. I am aware that the term "tensor" was originally introduced within physics. But then it was adopted in chemometrics, signal processing and machine learning in a context of N-dimensional arrays of data. As such, this toolbox is focused on multi-way analysis and tensor decompositions of N-dimensional data arrays (tensors). However, fundamental operations include folding/unfolding of the data, tensor-matrix product and contration with a vector or another tensor. The latter is not implemented at the moment, but will be in future releases. Not sure whether these opertations carry the same meaning as in physics though.
- laingc 8y agoI don’t want to jump on top of a pedant pile, because I think it’s really cool that you’re out there making useful stuff. The group where I did my PhD was a Numerical Relativity group and I now work in Machine Learning, so I can appreciate where you’re coming from. However, a Tensor has a very precise mathematical meaning, and has done for centuries (dating back to at least Voigt, and arguably as far as Gauss). Even in machine learning, people recognise that they are abusing the term tensor by restricting its use to Tensors expressed in the canonical orthogonal basis of E^n. I really think we should be discouraging this debasement of our mathematical terminology. It’s just not helpful at all.
- charlescearl 8y agoDo you have any recommended readings for ML people from a CS background wishing to get an introduction to Tensor analysis?
- IlyaKisil 8y agoI would suggest to search on YouTube for Tamara Kolda: Tensor decompositions. She also published a very good introductory paper “Tensor decompositions and applications” in 2008.
- charlescearl 8y agoThat is a great talk. Thanks for the link
- IlyaKisil 8y agoI do agree that tensors are much more then just an array of data with N-indices and that numerical methods are oftentime forget about that.
- philipov 8y agoI am looking for a python library that handles tensors, in the precise mathematical sense. Can you recommend one please?
- yorwba 8y agoMaybe https://cadabra.science/ https://cadabra.science/ ? I haven't used it myself, but it's linked from the main page of http://www.sympy.org/ http://www.sympy.org/ , which would also allow you to define tensor operations yourself if necessary.
- riku_iki 8y agoWhat "higher-order" part means here? What is the difference to regular tensors?..
- IlyaKisil 8y agoBasically, order of a tensor is the number of dimensions of an array of data. Vector - one dimensional array or a tensor of order 1 Matrix - two dimensional array of data or a tensor of order 2 Three and more dimensional arrays of data are tensors of higher order.
- ska 8y agoThis isn't quite right, but it's a common misconception. Any rank-2 tensor can be represented in matrix form, but not all matrices are tensors, similarly with rank-1 tensors and vectors. The distinction is important because thinking about the way you have presented leads to confusion about what tensors are...
- IlyaKisil 8y agoWas just explaining the meaning of “higher-order” within the context of this library. But thanks, now I have a clearer picture of what to include in the main README file and notebooks with tutorials, so to avoid misleading.
- Lxr 8y agoCan you explain this distinction in more detail?
- ska 8y agoSure! There are several different ways to define them, but fundamentally tensors ar geometric objects that define linear relationships with respect to particular vector spaces. They are often defined somewhat loosly by their behaviour under transformations. In context we often refer to scalars, vectors,matrices as order/rank 0,1,2 tensors (higher order tensors don’t have the same sort of common shorthand). This works fine when you have the context of the underlying vector space, and nderstand the “rules”. Physicists do this a lot, and they often love shortcuts :) However, there is a growing use/abuse of the terminology (see machine learning) to just mean n-dimensional arrays. The analogy is drawn that a matrix is a 2d version but you can have 3D, 4d, etc. While it’s true that a NxN matrix can represent a tensor (given the context as previously) that misses most of the structure... as such, it’s an unfortunate use of the name.
- mhh__ 8y agoInteresting choice of name? ;)