Upper triangular matrix input to Upper triangular matrix output as an out put of Neural Network?

2 views (last 30 days)
On the topic of Neural Networks (e.g. fitnet), if I input a "upper (or lower) triangular" matrix OR a matrix with data at specific (row, col) location of the matrix , then I want to achieve the output at exactly the same (row, col ) location of the output matrix.
Currently, if I input an upper (or lower triangular) matrix to the fitnet, the neural network of considers the "zeros" in the upper triangular matrix as relevant data and fills in the entire output matrix by non zero values.
E.g. if input is [ 1,2,3; 0 ,4,5; 0,0, 6] (upper triangular) then output of neural network must be of the format [ 7,8,9; 0,5,8; 0, 0, 6] (upper triangular)
How do I achieve this?
Also, another question is : Is there a function to map a "full matrix" to a "upper triangular (or lower triangular) matrix" while retaining the essence of data of the full matrix.

Answers (1)

Shashank Gupta
Shashank Gupta on 13 Oct 2020
Hi Anand,
On the first look, I really can't think of any way to make sure the output and input of NN comes at the same index. Yes, it is correct if you give any sided triangular matrix, the network will considered it to be a relevant data and then the output you will obtained will not be as you expecting.
for mapping full matrix to upper triangular matrix, you can look for GUASS transform or you can also try LU transform, Do check out the documentation though. It will give you a better idea.
I hope my suggestion atleast give you a headstart.
Cheers.
  1 Comment
Anand Dandavate
Anand Dandavate on 14 Oct 2020
Hello Shashank
Thanks for your reply. I think you meant "Gauss Transformation" in electrical engineering methods like "Gauss Elimination" or "Gauss Seidel" which converts the matrix to upper or lower triangular.

Sign in to comment.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!