(Python Example for Beginners)
Write a NumPy program to create a 5×5 array with random values and find the minimum and maximum values.
Sample Solution :
Python Code :
import numpy as np x = np.random.random((5,5)) print("Original Array:") print(x) xmin, xmax = x.min(), x.max() print("Minimum and Maximum Values:") print(xmin, xmax)
Original Array: [[ 0.3839264 0.6527485 0.41092465 0.63987331 0.72739435] [ 0.1711146 0.7542493 0.30799339 0.79689356 0.92014308] [ 0.14420449 0.28689129 0.69339598 0.26608753 0.20895817] [ 0.20215693 0.36993965 0.21283682 0.33183608 0.92672618] [ 0.25734144 0.01083637 0.41502065 0.90604563 0.92236538]] Minimum and Maximum Values: 0.0108363710034 0.926726177113
Python Example – Write a NumPy program to create a 5×5 array with random values and find the minimum and maximum values
Two Machine Learning Fields
There are two sides to machine learning:
- Practical Machine Learning:This is about querying databases, cleaning data, writing scripts to transform data and gluing algorithm and libraries together and writing custom code to squeeze reliable answers from data to satisfy difficult and ill defined questions. It’s the mess of reality.
- Theoretical Machine Learning: This is about math and abstraction and idealized scenarios and limits and beauty and informing what is possible. It is a whole lot neater and cleaner and removed from the mess of reality.
Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.