MCPcopy Create free account

hub / github.com/AmazaspShumik/mtlearn / functions

Functions71 in github.com/AmazaspShumik/mtlearn

↓ 10 callersFunctionhas_arg
Checks whether callable accepts given keyword argument Parameters ---------- function: callable Function which which arguments
mtlearn/utils/layer_utils.py:5
↓ 5 callersMethodset_data_and_directory
Create test directory and test data
tests/base_mtl_specification.py:13
↓ 4 callersFunctionbuild_activation_functions
Helper method for setting activation functions
mtlearn/experiments/uci_income_census/base_hyperparam_builder.py:9
↓ 4 callersFunctionbuild_preprocessing_layer_uci_income
Helper method that builds preprocesing layer for UCI Census Income dataset.
mtlearn/experiments/uci_income_census/base_hyperparam_builder.py:47
↓ 3 callersFunctionget_constrained_model
Builds soft parameter sharing multi-task model n_features: int Number of features in the data l1_regularizer: float L1 pe
tests/constrained_mtl_test.py:13
↓ 3 callersFunctionget_mmoe_model
Create Multigate Mixture of Experts Model Parameters ---------- input_shape: int Number of features apply_dropout: bool
tests/mmoe_test.py:10
↓ 3 callersFunctionget_omoe_model
Create Multigate Mixture of Experts Model Parameters ---------- input_shape: int Number of features apply_dropout: bool
tests/omoe_test.py:10
↓ 2 callersFunctionbuild_task_towers
Helper method to build task specific networks
mtlearn/experiments/uci_income_census/base_hyperparam_builder.py:20
↓ 2 callersFunctionget_mtl_model_with_moe
Create Mixture of Linear Model Experts Parameters ---------- input_shape: int Number of features apply_dropout: bool
tests/moe_test.py:15
↓ 2 callersFunctionregularize_norm_diff
Regularize l2/l1 distance between variables Parameters ---------- variables: List of lists List of variables norm: str
mtlearn/layers/soft_contrained_mtl.py:9
↓ 1 callersMethod__init__
(self, expert_layers: List[Layer], add_dropout: bool = False,
mtlearn/layers/moe.py:115
↓ 1 callersMethod_build_moe_layers
Builds Mixture of Experts Layers if they are not provided by the user
mtlearn/layers/mmoe.py:72
↓ 1 callersMethod_preprocess_cat_feature
Preprocess categorical column: use either embeddings or one-hot. Categorical feature can be represented either as an embedding or as
mtlearn/experiments/uci_income_census/uci_census_preprocessing_layer.py:55
↓ 1 callersMethod_split_features_targets
Split feature from targets, remove education, income_50K and marital_stat from the features as described in section 6.3
mtlearn/experiments/uci_income_census/utils/data_loader_preprocessor.py:110
↓ 1 callersMethodbuild
Builds main component of the layer by creating dropout layer that has the same binary mask for each element in the batch. Pa
mtlearn/layers/moe.py:36
↓ 1 callersFunctionbuild_experts
Helper method to build expert networks for OMOE and MMOE
mtlearn/experiments/uci_income_census/base_hyperparam_builder.py:66
↓ 1 callersMethodget_config
Config of the MOE layer
mtlearn/layers/moe.py:180
↓ 1 callersFunctionget_cross_stitch_model
Creates model with cross-stitch units Parameters ---------- n_features: int Shape of the input
tests/cross_stitch_test.py:11
↓ 1 callersFunctionget_model
Creates Mixture of Experts Model
examples/moe_example.py:22
↓ 1 callersFunctionload_census_data_uci
Checks whether data are in path directory or in current directory if path is not specified, loads data from the uci and splits test set into
mtlearn/experiments/uci_income_census/utils/load_census_data.py:9
↓ 1 callersFunctionpreprocess_features
Encode categorical features, represent them as dense set of integers and save the mapping from c. Normalize all of numeric feature using min-max
mtlearn/experiments/uci_income_census/utils/preprocess_features.py:10
↓ 1 callersFunctionrun_tests
()
tests/run.py:4
↓ 1 callersMethodtest_goodness_of_fit
Checks Goodness of fit for single task problem
tests/moe_test.py:73
Method__init__
(self, *args, **kwargs)
tests/moe_test.py:59
Method__init__
(self, *args, **kwargs)
tests/cross_stitch_test.py:34
Method__init__
(self, *args, **kwargs)
tests/omoe_test.py:77
Method__init__
(self, *args, **kwargs)
tests/mmoe_test.py:78
Method__init__
(self, *args, **kwargs)
tests/constrained_mtl_test.py:54
Method__init__
(self, all_columns: str, cat_features_dim: Dict[str, int],
mtlearn/experiments/uci_income_census/uci_census_preprocessing_layer.py:37
Method__init__
(self, local_path: str = None, write_data_locally: bool = True,
mtlearn/experiments/uci_income_census/utils/data_loader_preprocessor.py:75
Method__init__
(self, expert_layers: List[Layer], task_layers: List[Layer],
mtlearn/layers/mmoe.py:53
Method__init__
(self, dropout_rate: float = 0.1, **kwargs )
mtlearn/layers/moe.py:28
Method__init__
(self, architecture: List[int], hidden_layer_activation: str = "elu",
mtlearn/layers/mlp.py:31
Method__init__
(self, mtl_layers: List[Layer], l1_regularizer: float, l2_r
mtlearn/layers/soft_contrained_mtl.py:64
Method_build_moe_layers
Builds Mixture of Experts Layers if they are not provided by the user
mtlearn/layers/omoe.py:47
Methodbuild
(self, batch_input_shape: List[tf.TensorShape] )
mtlearn/layers/cross_stitch_block.py:18
Functionbuild_hyper_cross_stitched_model
Build model for Cross Stitched networks Parameters ---------- hp: instance of HyperParameters Hyper-Parameters that define a
mtlearn/experiments/uci_income_census/hyper_models.py:145
Functionbuild_hyper_l2_constrained
Build model for L2 constrained multi-task learning model Parameters ---------- hp: instance of HyperParameters Hyper-Paramet
mtlearn/experiments/uci_income_census/hyper_models.py:231
Functionbuild_hyper_moe_model
Build hypermodel either for Multi-Gate Mixture of Experts or One-Gate Mixture of experts Parameters ---------- hp: instance of H
mtlearn/experiments/uci_income_census/hyper_models.py:17
Functionbuild_hyper_mtl_shared_bottom
Build model for L2 constrained multi-task learning model Parameters ---------- hp: instance of HyperParameters Hyper-Paramet
mtlearn/experiments/uci_income_census/hyper_models.py:328
Methodcall
Defines forward pass of the Preprocessing Layer, Builds embeddings for sparse categorical features and one-hot encodings for
mtlearn/experiments/uci_income_census/uci_census_preprocessing_layer.py:85
Methodcall
Forward pass of the Multi-Gate Mixture of Experts model. Parameters ---------- inputs: np.array or tf.Tensor
mtlearn/layers/mmoe.py:82
Methodcall
Defines forward pass for the layer, by dropping experts and then renormalizing utilization probabilities for remaining experts.
mtlearn/layers/moe.py:54
Methodcall
Defines set of computations performed in the MOE layer. MOE layer can accept single tensor (in this case it assumes the same
mtlearn/layers/moe.py:133
Methodcall
Forward pass of the MLP Parameters ---------- inputs: np.array or tf.Tensor Input to the model Re
mtlearn/layers/mlp.py:55
Methodcall
Forward pass through constraining layer. Constraining layer can accept single tensor (in this case it assumes the same input
mtlearn/layers/soft_contrained_mtl.py:75
Methodcall
Forward pass through cross-stitch block Parameters ---------- inputs: np.array or tf.Tensor List of task
mtlearn/layers/cross_stitch_block.py:36
Methodcall
Forward pass of the One-Gate Mixture of Experts Model Parameters ---------- inputs: np.array or tf.Tensor
mtlearn/layers/omoe.py:51
Methodget_config
Get configuration for Preprocessing Layer
mtlearn/experiments/uci_income_census/uci_census_preprocessing_layer.py:126
Methodget_config
Get configuration of the Multi-Gate Mixture of Experts
mtlearn/layers/mmoe.py:114
Methodget_config
Config of the ExpertUtilizationDropout layer
mtlearn/layers/moe.py:82
Methodget_config
Get MLP configuration
mtlearn/layers/mlp.py:74
Methodget_config
(self)
mtlearn/layers/soft_contrained_mtl.py:115
Methodget_education_marital_stat_tasks
Get group two data as described in section 6.3 of the paper. Second group of data contains two binary target variables: 1] Ma
mtlearn/experiments/uci_income_census/utils/data_loader_preprocessor.py:127
Methodget_income_marital_stat_tasks
Get group one data as described in section 6.3 of the paper. First group of data contains two binary target variables: 1] Mar
mtlearn/experiments/uci_income_census/utils/data_loader_preprocessor.py:148
Methodget_raw_train_val_test
Get raw data
mtlearn/experiments/uci_income_census/utils/data_loader_preprocessor.py:164
Methodmodels
Create models with Mixture of Experts Layer, one model with dropout and another one without dropout.
tests/moe_test.py:64
Methodmodels
(self)
tests/cross_stitch_test.py:39
Methodmodels
(self)
tests/base_mtl_specification.py:26
Methodmodels
Create intances of One-Gate Mixture of Experts Model with / without expert dropout and with / without base layer
tests/omoe_test.py:82
Methodmodels
Create MMOEs models for testing
tests/mmoe_test.py:83
Methodmodels
(self)
tests/constrained_mtl_test.py:77
Methodrun_trial
Evaluates set of hyperparameters Parameters ---------- trial: kerastuner.Trial Object that holds informa
mtlearn/experiments/uci_income_census/tuner.py:14
Methodtest_cross_stitch_normalization_and_shape
Test that elements of each column are convex combinations, and that output is a list of tensors with the same dimensionality
tests/cross_stitch_test.py:42
Methodtest_func_diff
(a, b)
tests/utils_test.py:11
Methodtest_func_sum
(a=2, b=3)
tests/utils_test.py:14
Methodtest_goodness_of_fit
Checks how well model fitted training data, we want to check that model can perfectly fit data (i.e. overfit)
tests/base_mtl_specification.py:52
Methodtest_has_arg
(self)
tests/utils_test.py:9
Methodtest_input_types_output_shapes
Checks whether layer can properly handle two types of input: 1) list of tensors 2) tensors And whether output shape
tests/constrained_mtl_test.py:58
Methodtest_save_load_mtl
Tests saving and loading
tests/moe_test.py:83
Methodtest_save_load_mtl
Checks saving and loading functionality of multitask model
tests/base_mtl_specification.py:29