我有许多元组(par1,par2),即通过多次重复实验获得的二维参数空间中的点.
我正在寻找计算和可视化置信椭圆的可能性(不确定这是否是正确的术语).这是我在网上找到的一个示例图,用于显示我的意思:

来源:blogspot.ch/2011/07/classification-and-discrimination-with.html
所以原则上我必须将多元正态分布拟合到数据点的二维直方图.有人可以帮我这个吗?
如何使用matplotlib在sccatterplot中创建Confidence Ellipses?
以下代码适用于创建散点图.那么,是否有人熟悉将置信椭圆置于散点图上?
import numpy as np
import matplotlib.pyplot as plt
x = [5,7,11,15,16,17,18]
y = [8, 5, 8, 9, 17, 18, 25]
plt.scatter(x,y)
plt.show()
Run Code Online (Sandbox Code Playgroud)
以下是SAS的Confidence Ellipses的参考.
http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003160800.htm
sas中的代码是这样的:
proc sgscatter data=sashelp.iris(where=(species="Versicolor"));
title "Versicolor Length and Width";
compare y=(sepalwidth petalwidth)
x=(sepallength petallength)
/ reg ellipse=(type=mean) spacing=4;
run;
Run Code Online (Sandbox Code Playgroud)