DATA MUNGING
DATA CLEANING PYTHON
MACHINE LEARNING RECIPES
PANDAS CHEATSHEET
ALL TAGS
# How to Create a Vector or Matrix in Python?

# How to Create a Vector or Matrix in Python?

This recipe helps you Create a Vector or Matrix in Python

Have you ever tried to create a transpose of a vector or matrix? Is"nt it very easy to calculate manually but if you have to calcuate transpose of many matrises then it may not be possible to do it manually.

So this is the recipe on how we can Create & Transpose a Vector or Matrix.

```
import numpy as np
```

We have only imported numpy which is needed.

We have created a vector and matrix using array and we will find transpose of it.
```
vector = np.array([10, 20, 30, 40, 50, 60])
print("Original Vector:
", vector)
matrix = np.array([[11, 22, 33],
[44, 55, 66],
[77, 88, 99]])
print("Original Matrix:
", matrix)
```

We can make transpose of vector and matrix by using T function, i.e. applying .T after the vector and matrix.
```
V = vector.T
print("Transpose Vector:
", V)
M = matrix.T
print("Transpose Matrix:
", M)
```

So the output comes as

Original Vector: [10 20 30 40 50 60] Original Matrix: [[11 22 33] [44 55 66] [77 88 99]] Transpose Vector: [10 20 30 40 50 60] Transpose Matrix: [[11 44 77] [22 55 88] [33 66 99]]

In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

Data Science Project in R -Build a machine learning algorithm to predict the future sale prices of homes.

PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

In this machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

In this machine learning resume parser example we use the popular Spacy NLP python library for OCR and text classification.

Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

Deep Learning Project- Learn to apply deep learning paradigm to forecast univariate time series data.

In this project, we are going to work on Sequence to Sequence Prediction using IMDB Movie Review Dataset using Keras in Python.