filmov
tv
Surface plots and Contour plots in Python
Показать описание
#python #programming #pythontutorial
Surface plots and Contour plots in Python
Surface plots
A Surface Plot is a representation of a three-dimensional dataset. It describes a functional relationship between two independent variables X and Z and a designated dependent variable Y, rather than showing the individual data points. It is a companion plot of the contour plot. It is similar to the wireframe plot, but each face of the wireframe is a filled polygon. This helps to create the topology of the surface which is being visualized.
Surface plots are used to :
• Visualise loss functions in machine learning and deep learning
• Visualise store or state value functions in reinforcement learning
Creating 3D surface Plot
Syntax:
where X and Y are 2D arrays of points of x and y while Z is a 2D array of heights.
Countour plots
Contour plots also called level plots are a tool for doing multivariate analysis and visualizing 3-D plots in 2-D space. If we consider X and Y as our variables we want to plot then the response Z will be plotted as slices on the X-Y plane due to which contours are sometimes referred to as Z-slices or iso-response.
Creating Contour plots
Syntax:
where,
• X, Y: 2-D NumPy arrays with the same shape as Z or 1-D arrays such that len(X)==M and len(Y)==N (where M and N are rows and columns of Z)
Z: The height values over which the contour is drawn. The shape is (M, N)
levels: Determines the number and positions of the contour lines/regions.
Watch another videos
funny viral video #shortsvideo #shorts #respect #ytshorts
semifinal mahamukaabala 🏏💣🔥 #status #cricket #wc2023
Surface plots and Contour plots in Python
Surface plots
A Surface Plot is a representation of a three-dimensional dataset. It describes a functional relationship between two independent variables X and Z and a designated dependent variable Y, rather than showing the individual data points. It is a companion plot of the contour plot. It is similar to the wireframe plot, but each face of the wireframe is a filled polygon. This helps to create the topology of the surface which is being visualized.
Surface plots are used to :
• Visualise loss functions in machine learning and deep learning
• Visualise store or state value functions in reinforcement learning
Creating 3D surface Plot
Syntax:
where X and Y are 2D arrays of points of x and y while Z is a 2D array of heights.
Countour plots
Contour plots also called level plots are a tool for doing multivariate analysis and visualizing 3-D plots in 2-D space. If we consider X and Y as our variables we want to plot then the response Z will be plotted as slices on the X-Y plane due to which contours are sometimes referred to as Z-slices or iso-response.
Creating Contour plots
Syntax:
where,
• X, Y: 2-D NumPy arrays with the same shape as Z or 1-D arrays such that len(X)==M and len(Y)==N (where M and N are rows and columns of Z)
Z: The height values over which the contour is drawn. The shape is (M, N)
levels: Determines the number and positions of the contour lines/regions.
Watch another videos
funny viral video #shortsvideo #shorts #respect #ytshorts
semifinal mahamukaabala 🏏💣🔥 #status #cricket #wc2023