How to find Maximum and Minimum values in a Matrix?
DATA MUNGING DATA CLEANING PYTHON MACHINE LEARNING RECIPES PANDAS CHEATSHEET     ALL TAGS

How to find Maximum and Minimum values in a Matrix?

How to find Maximum and Minimum values in a Matrix?

This recipe helps you find Maximum and Minimum values in a Matrix

0
This python source code does the following: 1. Generates numpy array 2. Finds min and in a matrix 3. Finds Min and max in row and column of a matrix
In [1]:
## How to find Maximum and Minimum values in a Matrix
def Kickstarter_Example_13():
    print()
    print(format('How to find Maximum and Minimum values in a Matrix',
                 '*^72'))

    # Load library
    import numpy as np

    # Create matrix
    matrixA = np.array([[1, 2, 3, 23],
                       [4, 5, 6, 25],
                       [7, 8, 9, 28],
                       [10, 11, 12, 41]])

    # Return maximum element
    print(); print(np.max(matrixA))

    # Return minimum element
    print(); print(np.min(matrixA))

    # Find the maximum element in each column
    print(); print(np.max(matrixA, axis=0))

    # Find the maximum element in each row
    print(); print(np.max(matrixA, axis=1))

Kickstarter_Example_13()
***********How to find Maximum and Minimum values in a Matrix***********

41

1

[10 11 12 41]

[23 25 28 41]

Relevant Projects

Music Recommendation System Project using Python and R
Machine Learning Project - Work with KKBOX's Music Recommendation System dataset to build the best music recommendation engine.

Predict Credit Default | Give Me Some Credit Kaggle
In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

Mercari Price Suggestion Challenge Data Science Project
Data Science Project in Python- Build a machine learning algorithm that automatically suggests the right product prices.

Choosing the right Time Series Forecasting Methods
There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.

Predict Macro Economic Trends using Kaggle Financial Dataset
In this machine learning project, you will uncover the predictive value in an uncertain world by using various artificial intelligence, machine learning, advanced regression and feature transformation techniques.

Learn to prepare data for your next machine learning project
Text data requires special preparation before you can start using it for any machine learning project.In this ML project, you will learn about applying Machine Learning models to create classifiers and learn how to make sense of textual data.

Credit Card Fraud Detection as a Classification Problem
In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.

Data Science Project in Python on BigMart Sales Prediction
The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

Machine Learning project for Retail Price Optimization
In this machine learning pricing project, we implement a retail price optimization algorithm using regression trees. This is one of the first steps to building a dynamic pricing model.

Build an Image Classifier for Plant Species Identification
In this machine learning project, we will use binary leaf images and extracted features, including shape, margin, and texture to accurately identify plant species using different benchmark classification techniques.