Types of Matrix with examples using Python | Scalar, Rectangular, Square, Null, Triangular - P10
0:00 Introduction
1:34 1. Row Matrix
2:33 Rectangular Matrix
3:20 Square Matrix
3:50 Diagonal Matrix
6:25 Identity Matrix
6:52 Matrix Transpose
7:38 Null Matrix
8:05 Triangular Matrix
9:37 Symmetric Matrix
Matrices and Vector with Python
Session No 10
Code Starts Here
==============
import numpy as np
1. Row Matrix
row_matrix = np.random.randint(0,9,(1,5))
print(row_matrix)
2. Column Matrix
column_matrix = np.random.randint(0,9,(5,1))
print(column_matrix)
3. Rectangular Matrix
rect_matrix = np.random.randint(0,6,(3,2))
print(rect_matrix)
4. Square Matrix
square_matrix = np.random.randint(0,9,(4,4))
print(square_matrix)
5. Diagonal Matrix
from numpy import diag
Matrix = np.random.randint(0,9,(4,4))
print(Matrix)
Extract the diagonal
diag_vector = diag(Matrix)
print(diag_vector)
Create the diagonal matrix from the vector
print(diag(diag_vector))
6. Scalar Matrix
scalar_matrix = 5 * np.eye(3,3)
print(scalar_matrix)
7. Identity Matrix
I = np.eye(2,2)
print(I)
8. Matrix Transpose
Matrix = np.random.randint(0,9,(4,4))
print(Matrix)
print(Matrix.T)
9. Null Matrix
null_matrix = np.empty([2,3])
print(null_matrix)
10. Triangular Matrix
from numpy import tril, triu
matrix = np.random.randint(0,9,(4,5))
print(matrix)
lower triangular matrix
lower = triu(matrix)
print(lower)
Upper triangular matrix
upper = tril(matrix)
print(upper)
11. Symmetrix Matrix
matrix = np.random.randint(0,9,(4,4))
print(matrix)
matrix_transpose = matrix.T
print(matrix_transpose)
symmertic_matrix = matrix + matrix_transpose - np.diag(matrix.diagonal())
All the playlist of this youtube channel
========================================
1. Data Preprocessing in Machine Learning
• Data Preprocessing in Machine Learning| Li...
2. Confusion Matrix in Machine Learning, ML, AI
• Confusion Matrix in Machine Learning, ML, AI
3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
• Anaconda | Python Installation | Spyder | ...
4. Cross Validation, Sampling, train test split in Machine Learning
• Cross Validation | Sampling | train test s...
5. Drop and Delete Operations in Python Pandas
• Drop and Delete Operations in Python Pandas
6. Matrices and Vectors with python
• Matrices and Vectors with python
7. Detect Outliers in Machine Learning
• Detect Outliers in Machine Learning
8. TimeSeries preprocessing in Machine Learning
• TimeSeries preprocessing in Machine Learning
9. Handling Missing Values in Machine Learning
• Handling Missing Values in Machine Learning
10. Dummy Encoding Encoding in Machine Learning
• Label Encoding, One hot Encoding, Dummy En...
11. Data Visualisation with Python, Seaborn, Matplotlib
• Data Visualisation with Python, Matplotlib...
12. Feature Scaling in Machine Learning
• Feature Scaling in Machine Learning
13. Python 3 basics for Beginner
• Python | Python 3 Basics | Python for Begi...
14. Statistics with Python
• Statistics with Python
15. Data Preprocessing in Machine Learning
• Data Preprocessing in Machine Learning| Li...
16. Sklearn Scikit Learn Machine Learning
• Sklearn Scikit Learn Machine Learning
17. Linear Regression, Supervised Machine Learning
• Linear Regression | Supervised Machine Lea...
18 Interview Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics
• Interview Question for Machine Learning, D...
19. Jupyter Notebook Operations
• Jupyter and Spyder Notebook Operations in ...
Auf dieser Seite können Sie das Online-Video Types of Matrix with examples using Python | Scalar, Rectangular, Square, Null, Triangular - P10 mit der Dauer online in guter Qualität ansehen, das der Benutzer technologyCult 18 August 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 419 Mal angesehen und es wurde von 17 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!