This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S(\alpha, \beta) = | |
\left( \sum_i^n x_i^2 \right) \alpha^2 + n\beta^2 | |
+ 2 \left( \sum_i^n x_i \right)\alpha \beta | |
- 2 \left( \sum_i^n x_i y_i \right)\alpha | |
- 2 \left( \sum_i^n y_i \right)\beta | |
+ \sum_i^n y_i^2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C = \{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Predicted Data List] | |
2.0 | |
0.0 | |
9.0 | |
9.0 | |
3.0 | |
7.0 | |
0.0 | |
3.0 | |
0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested Data | Predicted Data | Judge | |
---|---|---|---|
2 | 2 | ok | |
0 | 0 | ok | |
9 | 9 | ok | |
0 | 8 | fail | |
3 | 3 | ok | |
7 | 7 | ok | |
0 | 0 | ok | |
3 | 3 | ok | |
0 | 0 | ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm | |
from collections import defaultdict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
import numpy as np | |
import sklearn.decomposition as decomp | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm | |
# function definitions | |
class DigitData: | |
def __init__(self, data): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.eig.html | |
#numpy.linalg.eig(a)[source] | |
#Compute the eigenvalues and right eigenvectors of a square array. | |
# | |
#Parameters: | |
#a : (..., M, M) array | |
#Matrices for which the eigenvalues and right eigenvectors will be computed | |
#Returns: | |
#w : (..., M) array | |
#The eigenvalues, each repeated according to its multiplicity. The eigenvalues are not necessarily ordered. The resulting array will be #always be of complex type. When a is real the resulting eigenvalues will be real (0 imaginary part) or occur in conjugate pairs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (reference) https://ja.wikipedia.org/wiki/ガボールフィルタ | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.stats as st | |
import math | |
plt.style.use('fivethirtyeight') |
OlderNewer