pyanno4rt.learning_model.frequentist.addons
Additional model files module.
The module aims to provide functions as a supplement for the frequentist learning models.
Overview
|
Build the input-output convex neural network architecture with the functional API. |
|
Build the standard neural network architecture with the functional API. |
|
Compute the linear decision function for the SVM. |
|
Compute the rbf decision function for the SVM. |
|
Compute the poly decision function for the SVM. |
|
Compute the sigmoid decision function for the SVM. |
|
Compute the linear decision function gradient for the SVM. |
|
Compute the rbf decision function gradient for the SVM. |
|
Compute the poly decision function gradient for the SVM. |
|
Compute the sigmoid decision function gradient for the SVM. |
- |
|
- |
Functions
- pyanno4rt.learning_model.frequentist.addons.build_iocnn(input_shape, output_shape, labels, hyperparameters, squash_output)[source]
Build the input-output convex neural network architecture with the functional API.
- Parameters:
input_shape (int) – Shape of the input features.
output_shape (int) – Shape of the output labels.
hyperparameters (dict) – Dictionary with the hyperparameter names and values for the neural network outcome prediction model.
squash_output (bool) – Indicator for the use of a sigmoid activation function in the output layer.
- Returns:
Instance of the class Functional, which provides a functional input-output convex neural network architecture.
- Return type:
object of class ‘Functional’
- pyanno4rt.learning_model.frequentist.addons.build_standard_nn(input_shape, output_shape, labels, hyperparameters, squash_output)[source]
Build the standard neural network architecture with the functional API.
- Parameters:
input_shape (int) – Shape of the input features.
output_shape (int) – Shape of the output labels.
hyperparameters (dict) – Dictionary with the hyperparameter names and values for the neural network outcome prediction model.
squash_output (bool) – Indicator for the use of a sigmoid activation function in the output layer.
- Returns:
Instance of the class Functional, which provides a functional standard neural network architecture.
- Return type:
object of class ‘Functional’
- pyanno4rt.learning_model.frequentist.addons.linear_decision_function(svm, features)[source]
Compute the linear decision function for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Value of the decision function with linear kernel.
- Return type:
float
- pyanno4rt.learning_model.frequentist.addons.rbf_decision_function(svm, features)[source]
Compute the rbf decision function for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Value of the decision function with rbf kernel.
- Return type:
float
- pyanno4rt.learning_model.frequentist.addons.poly_decision_function(svm, features)[source]
Compute the poly decision function for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Value of the decision function with poly kernel.
- Return type:
float
- pyanno4rt.learning_model.frequentist.addons.sigmoid_decision_function(svm, features)[source]
Compute the sigmoid decision function for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Value of the decision function with sigmoid kernel.
- Return type:
float
- pyanno4rt.learning_model.frequentist.addons.linear_decision_gradient(svm, _)[source]
Compute the linear decision function gradient for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
- Returns:
Gradient of the decision function with linear kernel.
- Return type:
ndarray
- pyanno4rt.learning_model.frequentist.addons.rbf_decision_gradient(svm, features)[source]
Compute the rbf decision function gradient for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Gradient of the decision function with rbf kernel.
- Return type:
ndarray
- pyanno4rt.learning_model.frequentist.addons.poly_decision_gradient(svm, features)[source]
Compute the poly decision function gradient for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Gradient of the decision function with poly kernel.
- Return type:
ndarray
- pyanno4rt.learning_model.frequentist.addons.sigmoid_decision_gradient(svm, features)[source]
Compute the sigmoid decision function gradient for the SVM.
- Parameters:
svm (object of class SVC) – Instance of scikit-learn’s SVC class.
features (ndarray) – Vector of feature values.
- Returns:
Gradient of the decision function with sigmoid kernel.
- Return type:
ndarray
Attributes
- pyanno4rt.learning_model.frequentist.addons.loss_map
- pyanno4rt.learning_model.frequentist.addons.optimizer_map