This file contains hidden or 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 standard Python libraries. | |
| import numpy as np | |
| from scipy.special import expit | |
| from scipy.linalg import norm | |
| # --> Import sklearn utility functions. | |
| from sklearn.base import BaseEstimator, ClassifierMixin | |
| class LogisticRegression_Newton(BaseEstimator, ClassifierMixin): |
This file contains hidden or 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 standard Python libraries. | |
| import numpy as np | |
| from scipy.special import expit | |
| from scipy.linalg import norm | |
| # --> Import sklearn utility functions. | |
| from sklearn.base import BaseEstimator, ClassifierMixin | |
| class LogisticRegression_GD(BaseEstimator, ClassifierMixin): |
This file contains hidden or 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 standard Python libraries. | |
| import numpy as np | |
| # --> Import sklearn utility functions to create derived-class objects. | |
| from sklearn.base import BaseEstimator, ClassifierMixin | |
| # --> Redefine the Heaviside function. | |
| def H(x): return np.heaviside(x-0.5, 1).astype(np.int) | |
This file contains hidden or 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
| """ | |
| Spectral Proper Orthogonal Decomposition | |
| ----------------------------------------- | |
| This module implements the Spectral Proper Orthogonal Decomposition class. The | |
| present implementation corresponds to the batch algorithm originally proposed | |
| in [1]. Note that a streaming algorithm has also been proposed in [2]. | |
| References | |
| ---------- |
This file contains hidden or 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 standard Python libraries. | |
| import numpy as np | |
| # --> Import sklearn utility functions to create derived-class objects. | |
| from sklearn.base import BaseEstimator, ClassifierMixin | |
| # --> Redefine the Heavisde function. | |
| H = lambda x: np.heaviside(x, 1).astype(np.int) | |
| class Rosenblatt(BaseEstimator, ClassifierMixin): |
NewerOlder