diff --git a/doc/pub/DimRed/html/._DimRed-bs018.html b/doc/pub/DimRed/html/._DimRed-bs018.html index 99819576f..a11bbb777 100644 --- a/doc/pub/DimRed/html/._DimRed-bs018.html +++ b/doc/pub/DimRed/html/._DimRed-bs018.html @@ -228,7 +228,7 @@ Note that the function multivariate returns also the covariance discussed
import numpy as np
import pandas as pd
-import matplotlib as plt
+import matplotlib.pyplot as plt
from IPython.display import display
n = 10000
mean = (-1, 2)
@@ -299,7 +299,8 @@ Our own code here is not very elegant and asks for improvements.
-
# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
y = X_centered[:,1]
Cov = np.zeros((2,2))
Cov[0,1] = np.sum(x.T@y)/(n-1.0)
diff --git a/doc/pub/DimRed/html/DimRed-reveal.html b/doc/pub/DimRed/html/DimRed-reveal.html
index 081966b55..5077e5fff 100644
--- a/doc/pub/DimRed/html/DimRed-reveal.html
+++ b/doc/pub/DimRed/html/DimRed-reveal.html
@@ -1034,7 +1034,7 @@ Note that the function multivariate returns also the covariance discussed
import numpy as np
import pandas as pd
-import matplotlib as plt
+import matplotlib.pyplot as plt
from IPython.display import display
n = 10000
mean = (-1, 2)
@@ -1111,7 +1111,8 @@ Our own code here is not very elegant and asks for improvements.
-
# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
y = X_centered[:,1]
Cov = np.zeros((2,2))
Cov[0,1] = np.sum(x.T@y)/(n-1.0)
diff --git a/doc/pub/DimRed/html/DimRed-solarized.html b/doc/pub/DimRed/html/DimRed-solarized.html
index 20dd9cedb..7f81d4685 100644
--- a/doc/pub/DimRed/html/DimRed-solarized.html
+++ b/doc/pub/DimRed/html/DimRed-solarized.html
@@ -1014,7 +1014,7 @@ Note that the function multivariate returns also the covariance discussed
import numpy as np
import pandas as pd
-import matplotlib as plt
+import matplotlib.pyplot as plt
from IPython.display import display
n = 10000
mean = (-1, 2)
@@ -1085,7 +1085,8 @@ Our own code here is not very elegant and asks for improvements.
-
# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
y = X_centered[:,1]
Cov = np.zeros((2,2))
Cov[0,1] = np.sum(x.T@y)/(n-1.0)
diff --git a/doc/pub/DimRed/html/DimRed.html b/doc/pub/DimRed/html/DimRed.html
index 25557ca0c..324cbc7d7 100644
--- a/doc/pub/DimRed/html/DimRed.html
+++ b/doc/pub/DimRed/html/DimRed.html
@@ -1019,7 +1019,7 @@ Note that the function multivariate returns also the covariance discussed
import numpy as np
import pandas as pd
-import matplotlib as plt
+import matplotlib.pyplot as plt
from IPython.display import display
n = 10000
mean = (-1, 2)
@@ -1090,7 +1090,8 @@ Our own code here is not very elegant and asks for improvements.
-
# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
y = X_centered[:,1]
Cov = np.zeros((2,2))
Cov[0,1] = np.sum(x.T@y)/(n-1.0)
diff --git a/doc/pub/DimRed/ipynb/DimRed.ipynb b/doc/pub/DimRed/ipynb/DimRed.ipynb
index 8dd93a16a..f51883b28 100644
--- a/doc/pub/DimRed/ipynb/DimRed.ipynb
+++ b/doc/pub/DimRed/ipynb/DimRed.ipynb
@@ -1107,7 +1107,7 @@
"source": [
"import numpy as np\n",
"import pandas as pd\n",
- "import matplotlib as plt\n",
+ "import matplotlib.pyplot as plt\n",
"from IPython.display import display\n",
"n = 10000\n",
"mean = (-1, 2)\n",
@@ -1240,7 +1240,8 @@
},
"outputs": [],
"source": [
- "# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]\n",
+ "# extract the relevant columns from the centered design matrix of dim n x 2\n",
+ "x = X_centered[:,0]\n",
"y = X_centered[:,1]\n",
"Cov = np.zeros((2,2))\n",
"Cov[0,1] = np.sum(x.T@y)/(n-1.0)\n",
diff --git a/doc/pub/DimRed/ipynb/ipynb-DimRed-src.tar.gz b/doc/pub/DimRed/ipynb/ipynb-DimRed-src.tar.gz
index 3f28ba9d7..e774e0d7c 100644
Binary files a/doc/pub/DimRed/ipynb/ipynb-DimRed-src.tar.gz and b/doc/pub/DimRed/ipynb/ipynb-DimRed-src.tar.gz differ
diff --git a/doc/pub/DimRed/pdf/DimRed-minted.pdf b/doc/pub/DimRed/pdf/DimRed-minted.pdf
index 5b575e4c2..1112487ce 100644
Binary files a/doc/pub/DimRed/pdf/DimRed-minted.pdf and b/doc/pub/DimRed/pdf/DimRed-minted.pdf differ
diff --git a/doc/src/DimRed/DimRed.do.txt b/doc/src/DimRed/DimRed.do.txt
index e5d74688d..e6cc7ee23 100644
--- a/doc/src/DimRed/DimRed.do.txt
+++ b/doc/src/DimRed/DimRed.do.txt
@@ -781,7 +781,7 @@ Note that the function _multivariate_ returns also the covariance discussed abov
!bc pycod
import numpy as np
import pandas as pd
-import matplotlib as plt
+import matplotlib.pyplot as plt
from IPython.display import display
n = 10000
mean = (-1, 2)
@@ -844,7 +844,8 @@ print(np.cov(X_centered.T))
Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$.
Our own code here is not very elegant and asks for improvements.
!bc pycod
-# extract the relevant columns from the centered design matrix of dim n x 2 x = X_centered[:,0]
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
y = X_centered[:,1]
Cov = np.zeros((2,2))
Cov[0,1] = np.sum(x.T@y)/(n-1.0)