id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
325,200
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/han.py
model.han.HAN
from torch.nn import functional as F import torch import torch.nn as nn class HAN(nn.Module): def __init__(self, embedding_in_channels: int, embedding_hidden_channels: int, gru_hidden_channels: int, class_num: int, dropout=0.2): super().__init__() self.embedding = nn.Embedding(embedding_in_channel...
class HAN(nn.Module): def __init__(self, embedding_in_channels: int, embedding_hidden_channels: int, gru_hidden_channels: int, class_num: int, dropout=0.2): pass def forward(self, x): pass
3
0
37
1
36
0
1
0
1
3
0
0
2
9
2
2
76
3
73
30
63
0
40
23
37
1
1
0
2
325,201
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/mlp.py
model.mlp.MLP
from typing import Any, Callable, Dict, List, Optional, Union from torch import nn import torch from torch_geometric.nn.resolver import activation_resolver class MLP(nn.Module): """ Multi-Layer Perceptron (MLP) with configurable layers and activation functions. """ def __init__(self, in_channels: int,...
null
5
3
27
3
17
7
5
0.43
1
7
0
0
2
3
3
3
89
13
53
22
38
23
36
11
32
8
1
3
14
325,202
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/preprocessing/featurizer/deprecated/organic_atomic_num_one_hot_deprecated.py
organic_atomic_num_one_hot_deprecated.OrganicAtomicNumberOneHotFeaturizer
from chemtorch.components.preprocessing.featurizer.featurizer_base import FeaturizerBase from rdkit.Chem import Atom class OrganicAtomicNumberOneHotFeaturizer(FeaturizerBase[Atom]): """Atom featurizer using only atomic number.""" def __init__(self): features = [(Atom.GetAtomicNum, list(range(1, 37)) +...
class OrganicAtomicNumberOneHotFeaturizer(FeaturizerBase[Atom]): '''Atom featurizer using only atomic number.''' def __init__(self): pass
2
1
3
0
3
0
1
0.25
1
3
0
0
1
0
1
7
6
1
4
3
2
1
4
3
2
1
2
0
1
325,203
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/gnn/pool/pma.py
pool.pma.MultiheadAttentionBlock
from torch.nn import LayerNorm, Linear, MultiheadAttention from torch import nn from typing import Optional import torch class MultiheadAttentionBlock(nn.Module): def __init__(self, channels: int, heads: int=1, layer_norm: bool=True, dropout: float=0.0): super().__init__() self.channels = channels...
class MultiheadAttentionBlock(nn.Module): def __init__(self, channels: int, heads: int=1, layer_norm: bool=True, dropout: float=0.0): pass def reset_parameters(self): pass def forward(self, x: torch.Tensor, y: torch.Tensor, x_mask: Optional[torch.Tensor]=None, y_mask: Optional[torch.Tens...
5
1
16
2
13
0
3
0.02
1
5
0
0
4
7
4
4
67
12
54
25
37
1
32
13
27
5
1
1
12
325,204
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/gnn/pool/pma.py
pool.pma.PMA
from torch_geometric.data import Batch import torch from torch import nn from torch_geometric.utils import to_dense_batch class PMA(nn.Module): def __init__(self, channels: int, num_seed_points: int=1, heads: int=1, layer_norm: bool=True, dropout: float=0.0, num_decoder_blocks: int=0): super().__init__() ...
class PMA(nn.Module): def __init__(self, channels: int, num_seed_points: int=1, heads: int=1, layer_norm: bool=True, dropout: float=0.0, num_decoder_blocks: int=0): pass def reset_parameters(self): pass def forward(self, batch: Batch) -> torch.Tensor: pass def __repr__(self)...
5
0
11
1
11
0
2
0
1
8
2
0
4
4
4
4
49
5
44
21
31
0
23
12
18
2
1
1
6
325,205
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/gnn/pool/pma.py
pool.pma.SetAttentionBlock
from typing import Optional import torch class SetAttentionBlock(torch.nn.Module): """The Set Attention Block (SAB) from the `"Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks" <https://arxiv.org/abs/1810.00825>`_ paper. .. math:: \\mathrm{SAB}(\\mathbf{X...
class SetAttentionBlock(torch.nn.Module): '''The Set Attention Block (SAB) from the `"Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks" <https://arxiv.org/abs/1810.00825>`_ paper. .. math:: \mathrm{SAB}(\mathbf{X}) = \mathrm{MAB}(\mathbf{x}, \mathbf{y}) ...
5
1
6
0
6
0
1
0.61
1
6
1
0
4
1
4
4
44
7
23
12
12
14
10
6
5
1
1
0
4
325,206
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/gnn/pool/pool.py
pool.pool.AtomTypePool
from chemtorch.utils.atom_mapping import AtomOriginType from torch import nn from typing import Literal, Dict, Callable import torch from torch_geometric.data import Batch class AtomTypePool(nn.Module): """ Type-specific pooling based on atom origin type. """ TYPE_MAPPING = {'reactants': AtomOriginType...
class AtomTypePool(nn.Module): ''' Type-specific pooling based on atom origin type. ''' def __init__(self, pool_type: Literal['reactants', 'products', 'dummy', 'reactant_product'], aggr: Literal['add', 'mean', 'max']='add'): pass def forward(self, batch: Batch) -> torch.Tensor: pa...
3
1
10
0
10
0
2
0.12
1
3
0
0
2
2
2
2
32
3
26
11
19
3
13
7
10
3
1
1
4
325,207
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/model/gnn/pool/pool.py
pool.pool.GlobalPool
from torch import nn from torch_geometric.data import Batch import torch from typing import Literal, Dict, Callable class GlobalPool(nn.Module): """ Global pooling across all nodes in a batch. """ def __init__(self, aggr: Literal['add', 'mean', 'max']='add'): super().__init__() if aggr...
class GlobalPool(nn.Module): ''' Global pooling across all nodes in a batch. ''' def __init__(self, aggr: Literal['add', 'mean', 'max']='add'): pass def forward(self, batch: Batch) -> torch.Tensor: pass
3
1
5
0
5
0
2
0.3
1
3
0
0
2
1
2
2
15
2
10
4
7
3
8
4
5
2
1
1
3
325,208
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/abstract_representation.py
representation.abstract_representation.AbstractRepresentation
from abc import ABC, abstractmethod from typing import TypeVar, Generic class AbstractRepresentation(ABC, Generic[T]): """ Abstract base class for all stateless representation creators. Subclasses should implement `forward` with the arguments they require. The only requirement is that the return type ...
class AbstractRepresentation(ABC, Generic[T]): ''' Abstract base class for all stateless representation creators. Subclasses should implement `forward` with the arguments they require. The only requirement is that the return type is compatible with the dataset and transforms. Raises: TypeEr...
4
2
8
1
2
5
1
5
2
0
0
4
2
0
2
24
46
10
6
4
2
30
5
3
2
1
4
0
2
325,209
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/fingerprint/drfp.py
representation.fingerprint.drfp.DRFP
import torch from chemtorch.components.representation import AbstractRepresentation class DRFP(AbstractRepresentation[torch.Tensor]): """ Stateless class for constructing DRFP (Differential Reaction Fingerprints). This class provides a `forward()` method that takes a reaction SMILES string and returns...
class DRFP(AbstractRepresentation[torch.Tensor]): ''' Stateless class for constructing DRFP (Differential Reaction Fingerprints). This class provides a `forward()` method that takes a reaction SMILES string and returns a PyTorch Tensor representing the folded DRFP fingerprint. It utilizes the DrfpE...
3
3
34
3
15
16
1
1.23
1
4
1
0
2
6
2
26
78
9
31
19
20
38
12
11
9
1
5
0
2
325,210
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/fingerprint/drfp.py
representation.fingerprint.drfp.DRFPUtil
from rdkit.Chem.rdchem import Mol import numpy as np from tqdm import tqdm from hashlib import blake2b from collections import defaultdict from typing import Dict, Iterable, List, Set, Tuple, Union from rdkit.Chem import AllChem class DRFPUtil: """ A utility class for encoding SMILES as drfp fingerprints. ...
class DRFPUtil: ''' A utility class for encoding SMILES as drfp fingerprints. ''' @staticmethod def shingling_from_mol(in_mol: Mol, radius: int=3, rings: bool=True, min_radius: int=0, get_atom_indices: bool=False, root_central_atom: bool=True, include_hydrogens: bool=False) -> Union[List[str], ...
11
6
73
12
52
10
11
0.21
0
11
0
0
0
0
5
5
380
64
264
93
216
55
148
51
142
21
0
6
54
325,211
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/graph/cgr.py
representation.graph.cgr.CGR
from chemtorch.components.representation.abstract_representation import AbstractRepresentation from typing import List, Tuple from chemtorch.utils.atom_mapping import AtomOriginType, EdgeOriginType, make_mol, map_reac_to_prod from chemtorch.components.preprocessing.featurizer.featurizer_base import FeaturizerBase from ...
class CGR(AbstractRepresentation[Data]): ''' Stateless class for constructing Condensed Graph of Reaction (CGR) representations. This class does not hold any data itself. Instead, it provides a `forward()` method that takes a sample (e.g., a dict or pd.Series) and returns a PyTorch Geometric Data objec...
5
4
39
7
23
10
3
0.58
1
9
4
0
3
2
3
27
134
25
72
37
62
42
55
31
51
6
5
3
8
325,212
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/graph/rtsp_3d_graph.py
representation.graph.rtsp_3d_graph.RTSP3DGraph
from torch_geometric.data import Data from chemtorch.components.representation.abstract_representation import AbstractRepresentation import os.path as osp class RTSP3DGraph(AbstractRepresentation[Data]): """ Constructs a 3D representation of a reaction from XYZ files. This representation reads the 3D stru...
class RTSP3DGraph(AbstractRepresentation[Data]): ''' Constructs a 3D representation of a reaction from XYZ files. This representation reads the 3D structures for a reactant, transition state (ts), and product from their respective .xyz files and packages them into a single PyTorch Geometric `Data` ...
4
3
28
4
15
10
3
1
1
3
0
0
2
1
2
26
74
12
31
13
27
31
21
12
18
4
5
1
6
325,213
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/representation/token/simple_token_representation.py
representation.token.simple_token_representation.SimpleTokenRepresentation
from typing import Dict, List from chemtorch.components.representation.abstract_representation import AbstractRepresentation import torch import collections class SimpleTokenRepresentation(AbstractRepresentation[torch.Tensor]): def __init__(self, vocab_path: str, tokenizer, max_sentence_length: int, pad_token: st...
class SimpleTokenRepresentation(AbstractRepresentation[torch.Tensor]): def __init__(self, vocab_path: str, tokenizer, max_sentence_length: int, pad_token: str, unk_token: str, *args, **kwargs): pass def _load_vocab(self, vocab_file_path: str) -> Dict[str, int]: '''Loads a vocabulary file into...
5
3
18
2
14
2
3
0.12
1
7
0
0
4
8
4
28
75
10
58
29
44
7
36
19
31
4
5
4
11
325,214
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/core/routine/regression_routine.py
routine.regression_routine.RegressionRoutine
from typing import Any, Tuple, Literal from torchmetrics import Metric, MetricCollection from chemtorch.utils.standardizer import Standardizer import torch from chemtorch.core.routine.supervised_routine import SupervisedRoutine class RegressionRoutine(SupervisedRoutine): """ Extends SupervisedRoutine for regre...
class RegressionRoutine(SupervisedRoutine): ''' Extends SupervisedRoutine for regression tasks by allowing the use of an optional standardizer. This class is intended for regression models where outputs may need to be destandardized (e.g., to return predictions in the original scale). If a `Standardize...
12
2
6
0
4
1
2
1.03
1
4
1
0
7
1
7
22
86
13
36
16
23
37
29
12
20
2
2
1
13
325,215
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/core/routine/supervised_routine.py
routine.supervised_routine.SupervisedRoutine
from torchmetrics import Metric, MetricCollection import warnings import os from torch.optim import Optimizer from torch import nn from torch.optim.lr_scheduler import LRScheduler from typing import Dict, Tuple, Callable, Iterator, Literal, Union, Mapping, Any import torch import lightning as L class SupervisedRoutine...
class SupervisedRoutine(L.LightningModule): ''' A flexible LightningModule wrapper for supervised tasks, supporting both training and inference. This class can be used for: - Full training/validation/testing with loss, optimizer, scheduler, and metrics. - Inference-only (prediction), requiring ...
16
8
22
2
12
8
3
0.78
1
11
0
1
15
8
15
15
366
45
180
55
151
141
126
42
110
12
1
3
52
325,216
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/core/scheduler/sequential_lr_wrapper.py
sequential_lr_wrapper.SequentialLRWrapper
from torch.optim.lr_scheduler import SequentialLR class SequentialLRWrapper(SequentialLR): """ A wrapper around SequentialLR that recursively instantiates any schedulers or scheduler factories with a shared optimizer passed to this wrapper optimizer. """ def __init__(self, optimizer, schedulers, ...
class SequentialLRWrapper(SequentialLR): ''' A wrapper around SequentialLR that recursively instantiates any schedulers or scheduler factories with a shared optimizer passed to this wrapper optimizer. ''' def __init__(self, optimizer, schedulers, milestones, **kwargs): ''' Initial...
2
2
16
1
6
9
2
1.86
1
1
0
0
1
0
1
1
22
2
7
2
5
13
4
2
2
2
1
0
2
325,217
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/preprocessing/tokenizer/simple_tokenizer.py
simple_tokenizer.MoleculeRegexTokenizer
from typing import List import re class MoleculeRegexTokenizer: """ Tokenizes a single molecule SMILES string using a regex pattern. """ def __init__(self, regex_pattern: str=SMILES_ATOM_WISE_PATTERN): """ Args: regex_pattern: The regex pattern to use for tokenization. ...
class MoleculeRegexTokenizer: ''' Tokenizes a single molecule SMILES string using a regex pattern. ''' def __init__(self, regex_pattern: str=SMILES_ATOM_WISE_PATTERN): ''' Args: regex_pattern: The regex pattern to use for tokenization. ''' pass def toke...
3
3
12
2
5
6
2
1.4
0
1
0
0
2
1
2
2
30
6
10
5
7
14
10
5
7
3
0
1
4
325,218
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/preprocessing/tokenizer/simple_tokenizer.py
simple_tokenizer.SimpleTokenizer
from typing import List class SimpleTokenizer: """ Tokenizes a reaction SMILES string (e.g., "R1.R2>>P1.P2"). """ def __init__(self, unk_token: str=DEFAULT_UNK_TOKEN, molecule_tokenizer_pattern: str=SMILES_ATOM_WISE_PATTERN): self.unk_token = unk_token self._molecule_tokenizer = Molecu...
class SimpleTokenizer: ''' Tokenizes a reaction SMILES string (e.g., "R1.R2>>P1.P2"). ''' def __init__(self, unk_token: str=DEFAULT_UNK_TOKEN, molecule_tokenizer_pattern: str=SMILES_ATOM_WISE_PATTERN): pass def _tokenize_side(self, side_smiles: str) -> List[str]: ''' Token...
4
3
18
4
11
4
3
0.41
0
3
1
0
3
2
3
3
62
14
34
18
26
14
28
14
24
5
0
2
9
325,219
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/transform/abstract_transform.py
transform.abstract_transform.AbstractTransform
from abc import ABC, abstractmethod from typing import Generic, TypeVar class AbstractTransform(ABC, Generic[T]): """ Abstract base class for transforms in the chemtorch framework. This class serves as a base for creating transforms that operate single objects. Raises: TypeError: If the subcla...
class AbstractTransform(ABC, Generic[T]): ''' Abstract base class for transforms in the chemtorch framework. This class serves as a base for creating transforms that operate single objects. Raises: TypeError: If the subclass does not implement the :attr:`__call__` method. Example (correct u...
3
2
12
2
2
8
1
7
2
0
0
2
1
0
1
23
38
6
4
3
1
28
3
2
1
1
4
0
1
325,220
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/transform/graph_transform/dummy.py
transform.graph_transform.dummy.DummyNodeTransform
from torch_geometric.data import Data from chemtorch.components.transform.abstract_transform import AbstractTransform import torch from typing import Dict, Optional class DummyNodeTransform(AbstractTransform[Data]): def __init__(self, mode: str, connection_type: Optional[str]='to_dummy', dummy_dummy_connection: O...
class DummyNodeTransform(AbstractTransform[Data]): def __init__(self, mode: str, connection_type: Optional[str]='to_dummy', dummy_dummy_connection: Optional[str]=None, feature_init: str='zeros'): pass def __call__(self, x: Data) -> Data: pass def _get_pretransform_attributes(self, data: ...
7
0
19
2
17
0
3
0
1
6
0
0
6
5
6
29
119
14
105
44
79
0
55
25
48
8
5
2
19
325,221
heid-lab/chemtorch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/heid-lab_chemtorch/src/chemtorch/components/transform/graph_transform/randomwalkpe.py
transform.graph_transform.randomwalkpe.RandomWalkPETransform
from chemtorch.components.transform.abstract_transform import AbstractTransform import torch from torch_geometric.data import Data import torch_geometric from torch_geometric.utils import get_self_loop_attr, is_torch_sparse_tensor, scatter, to_edge_index, to_torch_coo_tensor, to_torch_csr_tensor class RandomWalkPETran...
class RandomWalkPETransform(AbstractTransform[Data]): ''' This code includes implementations adapted from PyTorch Geometric (https://github.com/pyg-team/pytorch_geometric) ''' def __init__(self, walk_length: int, attr_name=None, type: str='graph') -> None: pass def __call__(self, data...
4
1
19
2
17
1
4
0.15
1
4
0
0
2
2
2
25
62
9
48
21
39
7
38
16
34
8
5
2
11
325,222
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/graph/pipeline_graph.py
kamae.graph.pipeline_graph.PipelineGraph
from kamae.tensorflow.layers import IdentityLayer import keras_tuner import tensorflow as tf import networkx as nx from packaging.version import Version from typing import Any, Callable, Dict, List, Optional, Tuple, Union class PipelineGraph: """ PipelineGraph is a class that constructs a graph of the pipeline...
class PipelineGraph: ''' PipelineGraph is a class that constructs a graph of the pipeline stages. This is used to determine the order in which the layers should be constructed. The graph is built by adding edges between layers that have the same input column as the output column of a previous layer...
19
15
29
3
16
11
2
0.78
0
10
1
0
12
5
14
14
465
58
229
93
179
178
114
58
97
6
0
2
38
325,223
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/estimators/standard_scale.py
kamae.sklearn.estimators.standard_scale.StandardScaleEstimator
from kamae.sklearn.transformers import BaseTransformerMixin import tensorflow as tf import pandas as pd from sklearn.preprocessing import StandardScaler from kamae.tensorflow.layers import StandardScaleLayer from kamae.sklearn.params import SingleInputSingleOutputMixin from typing import Any class StandardScaleEstimat...
class StandardScaleEstimator(StandardScaler, BaseTransformerMixin, SingleInputSingleOutputMixin): ''' Standard Scikit-Learn Estimator for use in Scikit-Learn pipelines. Wrapper over the existing implementation of the StandardScaler in Scikit-Learn, however operates on array columns and returns array co...
5
5
14
1
5
8
1
1.72
3
5
1
0
4
4
4
34
81
13
25
18
14
43
17
11
12
1
5
0
4
325,224
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.MultiInputMixin
from typing import List class MultiInputMixin: """ Mixin class containing set methods for the multiple input columns scenario. """ _input_cols: List[str] @property def input_cols(self) -> List[str]: """ Gets the input column names. :returns: List of strings of input co...
class MultiInputMixin: ''' Mixin class containing set methods for the multiple input columns scenario. ''' @property def input_cols(self) -> List[str]: ''' Gets the input column names. :returns: List of strings of input column names. ''' pass @input_c...
5
3
8
1
2
5
1
1.5
0
1
0
2
2
0
2
2
25
5
8
5
3
12
6
3
3
1
0
0
2
325,225
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.MultiInputMultiOutputMixin
class MultiInputMultiOutputMixin(MultiInputMixin, MultiOutputMixin): """ Mixin for a layer that takes multiple inputs and returns multiple outputs """
class MultiInputMultiOutputMixin(MultiInputMixin, MultiOutputMixin): ''' Mixin for a layer that takes multiple inputs and returns multiple outputs ''' pass
1
1
0
0
0
0
0
3
2
0
0
0
0
0
0
6
4
0
1
1
0
3
1
1
0
0
2
0
0
325,226
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.MultiInputSingleOutputMixin
class MultiInputSingleOutputMixin(MultiInputMixin, SingleOutputMixin): """ Mixin for a layer that takes multiple inputs and returns a single output """
class MultiInputSingleOutputMixin(MultiInputMixin, SingleOutputMixin): ''' Mixin for a layer that takes multiple inputs and returns a single output ''' pass
1
1
0
0
0
0
0
3
2
0
0
1
0
0
0
6
4
0
1
1
0
3
1
1
0
0
2
0
0
325,227
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.MultiOutputMixin
from .name import LayerNameMixin from typing import List class MultiOutputMixin(LayerNameMixin): """ Mixin class containing set methods for the multiple output columns scenario. """ _output_cols: List[str] @property def output_cols(self) -> List[str]: """ Gets the output column...
class MultiOutputMixin(LayerNameMixin): ''' Mixin class containing set methods for the multiple output columns scenario. ''' @property def output_cols(self) -> List[str]: ''' Gets the output column names. :returns: List of strings of output column names. ''' ...
7
4
13
1
6
6
2
0.91
1
2
0
2
3
1
3
4
51
7
23
8
16
21
12
5
8
3
1
1
6
325,228
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.SingleInputMixin
class SingleInputMixin: """ Mixin class containing set methods for the single input column scenario. """ _input_col: str @property def input_col(self) -> str: """ Gets the input column name. :returns: Input column name. """ return self._input_col @i...
class SingleInputMixin: ''' Mixin class containing set methods for the single input column scenario. ''' @property def input_col(self) -> str: ''' Gets the input column name. :returns: Input column name. ''' pass @input_col.setter def input_col(sel...
5
3
8
1
2
5
1
1.5
0
1
0
2
2
0
2
2
25
5
8
5
3
12
6
3
3
1
0
0
2
325,229
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.SingleInputMultiOutputMixin
class SingleInputMultiOutputMixin(SingleInputMixin, MultiOutputMixin): """ Mixin for a layer that takes a single input and returns multiple outputs """
class SingleInputMultiOutputMixin(SingleInputMixin, MultiOutputMixin): ''' Mixin for a layer that takes a single input and returns multiple outputs ''' pass
1
1
0
0
0
0
0
3
2
0
0
1
0
0
0
6
4
0
1
1
0
3
1
1
0
0
2
0
0
325,230
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.SingleInputSingleOutputMixin
class SingleInputSingleOutputMixin(SingleInputMixin, SingleOutputMixin): """ Mixin for a layer that takes a single input and returns a single output """
class SingleInputSingleOutputMixin(SingleInputMixin, SingleOutputMixin): ''' Mixin for a layer that takes a single input and returns a single output ''' pass
1
1
0
0
0
0
0
3
2
0
0
4
0
0
0
6
4
0
1
1
0
3
1
1
0
0
2
0
0
325,231
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/base.py
kamae.sklearn.params.base.SingleOutputMixin
from .name import LayerNameMixin class SingleOutputMixin(LayerNameMixin): """ Mixin class containing set methods for the single output column scenario. """ _output_col: str @property def output_col(self) -> str: """ Gets the output column name. :returns: List of string...
class SingleOutputMixin(LayerNameMixin): ''' Mixin class containing set methods for the single output column scenario. ''' @property def output_col(self) -> str: ''' Gets the output column name. :returns: List of strings of output column names. ''' pass ...
7
4
13
1
6
6
2
0.96
1
2
0
2
3
1
3
4
52
7
23
8
16
22
14
5
10
3
1
1
7
325,232
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/name.py
kamae.sklearn.params.name.LayerNameMixin
from typing import Optional class LayerNameMixin: """ Mixin class for a layer name. """ _layer_name: Optional[str] @property def layer_name(self) -> str: """ Gets the layer name. :returns: String of layer name. """ return self._layer_name
class LayerNameMixin: ''' Mixin class for a layer name. ''' @property def layer_name(self) -> str: ''' Gets the layer name. :returns: String of layer name. ''' pass
3
2
7
1
2
4
1
1.4
0
1
0
3
1
0
1
1
15
3
5
3
2
7
4
2
2
1
0
0
1
325,233
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/params/utils.py
kamae.sklearn.params.utils.InputOutputExtractor
from typing import List, Tuple class InputOutputExtractor: """ Mixin class containing methods for extracting input and output column names. """ def get_layer_inputs_outputs(self) -> Tuple[List[str], List[str]]: """ Gets the input & output information of the layer. Returns a tuple of li...
class InputOutputExtractor: ''' Mixin class containing methods for extracting input and output column names. ''' def get_layer_inputs_outputs(self) -> Tuple[List[str], List[str]]: ''' Gets the input & output information of the layer. Returns a tuple of lists, the first cont...
2
2
24
4
14
6
5
0.6
0
1
0
1
1
0
1
1
29
5
15
4
13
9
11
4
9
5
0
1
5
325,234
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/pipeline/Pipeline.py
kamae.sklearn.pipeline.Pipeline.KamaeSklearnPipeline
import joblib from kamae.graph import PipelineGraph import tensorflow as tf from sklearn.pipeline import Pipeline from kamae.sklearn.transformers import BaseTransformer import keras_tuner as kt from typing import Any, Callable, Dict, List, Optional, Tuple, Union class KamaeSklearnPipeline(Pipeline): """ KamaeS...
class KamaeSklearnPipeline(Pipeline): ''' KamaeSklearnPipeline is a subclass of sklearn.pipeline.Pipeline that is used to chain together BaseTransformers. It maintains the same functionality as sklearn.pipeline.Pipeline e.g. serialisation. ''' def __init__(self, steps: List[Tuple[str, BaseTran...
5
5
20
1
9
10
1
1.25
1
7
2
0
4
0
4
4
89
8
36
24
16
45
13
9
8
1
1
0
4
325,235
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/pipeline/pipeline.py
kamae.sklearn.pipeline.pipeline.KamaeSklearnPipeline
import tensorflow as tf from kamae.sklearn.transformers import BaseTransformer from sklearn.pipeline import Pipeline import keras_tuner as kt from typing import Any, Callable, Dict, List, Optional, Tuple, Union import joblib from kamae.graph import PipelineGraph class KamaeSklearnPipeline(Pipeline): """ KamaeS...
class KamaeSklearnPipeline(Pipeline): ''' KamaeSklearnPipeline is a subclass of sklearn.pipeline.Pipeline that is used to chain together BaseTransformers. It maintains the same functionality as sklearn.pipeline.Pipeline e.g. serialisation. ''' def __init__(self, steps: List[Tuple[str, BaseTran...
5
5
20
1
9
10
1
1.25
1
7
2
0
4
0
4
4
89
8
36
24
16
45
13
9
8
1
1
0
4
325,236
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/array_concatenate.py
kamae.sklearn.transformers.array_concatenate.ArrayConcatenateTransformer
from .base import BaseTransformer from kamae.sklearn.params import MultiInputSingleOutputMixin from kamae.tensorflow.layers import ArrayConcatenateLayer from typing import List import numpy as np import pandas as pd import tensorflow as tf class ArrayConcatenateTransformer(BaseTransformer, MultiInputSingleOutputMixin)...
class ArrayConcatenateTransformer(BaseTransformer, MultiInputSingleOutputMixin): ''' Vector Assembler Scikit-Learn Transformer for use in Scikit-Learn pipelines. This transformer assembles multiple columns into a single array column. ''' def __init__(self, input_cols: List[str], output_col: str, l...
5
4
16
2
7
8
2
1.17
2
4
1
0
4
3
4
34
76
11
30
16
22
35
22
13
17
3
6
2
6
325,237
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/array_split.py
kamae.sklearn.transformers.array_split.ArraySplitTransformer
from kamae.tensorflow.layers import ArraySplitLayer from kamae.sklearn.params import SingleInputMultiOutputMixin from .base import BaseTransformer import pandas as pd from typing import List import tensorflow as tf class ArraySplitTransformer(BaseTransformer, SingleInputMultiOutputMixin): """ VectorSlicer Scik...
class ArraySplitTransformer(BaseTransformer, SingleInputMultiOutputMixin): ''' VectorSlicer Scikit-Learn Transformer for use in Scikit-Learn pipelines. This transformer slices an array column into multiple columns. ''' def __init__(self, input_col: str, output_cols: List[str], layer_name: str) -> ...
5
4
9
1
3
5
1
1.5
2
3
1
0
4
3
4
34
47
7
16
11
8
24
13
8
8
1
6
0
4
325,238
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/base.py
kamae.sklearn.transformers.base.BaseTransformer
from sklearn.base import BaseEstimator, TransformerMixin from abc import ABC, abstractmethod class BaseTransformer(BaseTransformerMixin, BaseEstimator, TransformerMixin, ABC): """ Abstract class for all scikit-learn transformers. Specifically, this class extends the required scikit-learn classes BaseEstima...
class BaseTransformer(BaseTransformerMixin, BaseEstimator, TransformerMixin, ABC): ''' Abstract class for all scikit-learn transformers. Specifically, this class extends the required scikit-learn classes BaseEstimator and TransformerMixin adding in the kamae BaseTransformerMixin which defines the metho...
1
1
0
0
0
0
0
23
4
0
0
5
0
0
0
25
28
4
1
1
0
23
1
1
0
0
5
0
0
325,239
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/base.py
kamae.sklearn.transformers.base.BaseTransformerMixin
from kamae.sklearn.params import InputOutputExtractor, LayerNameMixin import tensorflow as tf from typing import Any, Dict, List, Union from abc import ABC, abstractmethod class BaseTransformerMixin(ABC, LayerNameMixin, InputOutputExtractor): """ Mixin abstract class defining methods needed for all kamae sciki...
class BaseTransformerMixin(ABC, LayerNameMixin, InputOutputExtractor): ''' Mixin abstract class defining methods needed for all kamae scikit-learn transformers. ''' def __init__(self, **kwargs: Any) -> None: ''' Initializes the transformer. ''' pass @abstractmet...
5
4
9
0
4
5
1
1.36
3
4
0
2
3
0
3
25
37
4
14
6
9
19
8
5
4
1
4
0
3
325,240
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/identity.py
kamae.sklearn.transformers.identity.IdentityTransformer
from .base import BaseTransformer from kamae.tensorflow.layers import IdentityLayer from kamae.sklearn.params import SingleInputSingleOutputMixin import pandas as pd import tensorflow as tf class IdentityTransformer(BaseTransformer, SingleInputSingleOutputMixin): """ Identity Scikit-Learn Transformer for use i...
class IdentityTransformer(BaseTransformer, SingleInputSingleOutputMixin): ''' Identity Scikit-Learn Transformer for use in Scikit-Learn pipelines. This transformer simply passes the input to the output unchanged. Used for cases where you want to keep the input the same. ''' def __init__(self, ...
5
5
11
1
4
7
1
2.13
2
3
1
0
4
3
4
34
55
8
15
8
10
32
13
8
8
1
6
0
4
325,241
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/sklearn/transformers/log.py
kamae.sklearn.transformers.log.LogTransformer
from kamae.sklearn.params import SingleInputSingleOutputMixin import pandas as pd from .base import BaseTransformer from typing import Optional import numpy as np from kamae.tensorflow.layers import LogLayer import tensorflow as tf class LogTransformer(BaseTransformer, SingleInputSingleOutputMixin): """ Log Sc...
class LogTransformer(BaseTransformer, SingleInputSingleOutputMixin): ''' Log Scikit-Learn Transformer for use in Scikit-Learn pipelines. This transformer applies a log(alpha + x) transform to the input column. ''' def __init__(self, input_col: str, output_col: str, layer_name: str, alpha: Optional...
5
5
13
1
5
7
1
1.48
2
4
1
0
4
4
4
34
61
9
21
16
10
31
15
10
10
2
6
0
5
325,242
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/common/spark_operation.py
kamae.spark.common.spark_operation.SparkOperation
from pyspark.sql.types import DataType, NumericType from random import choice from kamae.spark.utils import get_element_type, single_input_single_output_scalar_transform from typing import Any, List, Optional, Tuple from string import ascii_uppercase import pyspark.sql.functions as F from pyspark.sql import Column, Dat...
class SparkOperation(ABC, HasLayerName, HasInputDtype, HasOutputDtype, InputOutputExtractor): ''' Abstract class used in Spark transformers and estimators. Provides common utils for param setting, input/output dtype casting, and layer name setting. ''' def __init__(self) -> None: ''' ...
22
14
23
1
13
9
3
0.7
5
10
0
2
10
2
13
44
331
29
179
62
143
125
80
39
66
6
4
3
36
325,243
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/base.py
kamae.spark.estimators.base.BaseEstimator
from pyspark.ml import Estimator from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union from kamae.spark.transformers import BaseTransformer from pyspark.sql import DataFrame from kamae.spark.common import SparkOperation class BaseEstimator(Estimator, SparkOperation): def __init__(self) -> None...
class BaseEstimator(Estimator, SparkOperation): def __init__(self) -> None: ''' Initializes the estimator. ''' pass def fit(self, dataset: DataFrame, params: Optional[Union['ParamMap', List['ParamMap'], Tuple['ParamMap']]]=None) -> BaseTransformer: ''' Override...
4
3
26
3
15
8
1
0.52
2
5
1
9
3
1
3
47
81
11
46
13
38
24
18
7
14
2
5
1
4
325,244
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/conditional_standard_scale.py
kamae.spark.estimators.conditional_standard_scale.ConditionalStandardScaleEstimator
from pyspark.sql import Column, DataFrame import pyspark.sql.functions as F from kamae.spark.utils import construct_nested_elements_for_scaling from kamae.spark.transformers import ConditionalStandardScaleTransformer from pyspark.sql.types import ArrayType, DataType, DoubleType, FloatType from kamae.utils import get_co...
class ConditionalStandardScaleEstimator(BaseEstimator, SingleInputSingleOutputParams, ConditionalStandardScaleEstimatorParams, StandardScaleSkipZerosParams, NanFillValueParams): ''' Conditional standard scaler estimator for use in Spark pipelines. This is used to calculate the mean and standard deviation w...
10
8
50
2
35
13
4
0.44
5
8
1
0
7
0
7
75
385
20
253
78
210
112
84
43
76
8
6
3
26
325,245
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/conditional_standard_scale.py
kamae.spark.estimators.conditional_standard_scale.ConditionalStandardScaleEstimatorParams
from typing import List, Optional from pyspark.ml.param import Param, Params, TypeConverters class ConditionalStandardScaleEstimatorParams(Params): """ Mixin class containing conditional standard scale parameters, needed for single feature array scaler layers. """ scalingFunction = Param(Params._du...
class ConditionalStandardScaleEstimatorParams(Params): ''' Mixin class containing conditional standard scale parameters, needed for single feature array scaler layers. ''' def setScalingFunction(self, value: str) -> 'ConditionalStandardScaleEstimatorParams': ''' Sets the scalingFun...
11
11
11
1
4
6
1
0.73
1
3
0
1
10
0
10
10
168
24
83
27
63
61
33
18
22
3
1
2
14
325,246
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/impute.py
kamae.spark.estimators.impute.ImputeEstimator
from .base import BaseEstimator import pyspark.sql.functions as F from kamae.spark.utils import flatten_nested_arrays from pyspark.sql.types import ArrayType, DataType, DoubleType, FloatType from kamae.spark.transformers import ImputeTransformer from typing import List, Optional, Union from pyspark import keyword_only ...
class ImputeEstimator(BaseEstimator, SingleInputSingleOutputParams, MaskValueParams, ImputeMethodParams): ''' Imputation estimator for use in Spark pipelines. This estimator is used to calculate the chosen statistic of the input feature column. When fit is called it returns a ImputeTransformer whic...
6
4
33
3
20
11
2
0.61
4
5
1
0
3
1
3
60
119
11
67
29
47
41
22
13
18
4
6
1
6
325,247
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/min_max_scale.py
kamae.spark.estimators.min_max_scale.MinMaxScaleEstimator
from typing import List, Optional from kamae.spark.params import MaskValueParams, SingleInputSingleOutputParams from kamae.spark.transformers import MinMaxScaleTransformer import numpy as np import pyspark.sql.functions as F from pyspark.sql.types import ArrayType, DataType, DoubleType, FloatType from pyspark import ke...
class MinMaxScaleEstimator(BaseEstimator, SingleInputSingleOutputParams, MaskValueParams): ''' Min max estimator for use in Spark pipelines. This estimator is used to calculate the min and max of the input feature column. When fit is called it returns a MinMaxScaleTransformer which can be used to s...
6
4
34
3
21
10
1
0.54
3
5
1
0
3
0
3
57
120
14
69
29
51
37
23
15
19
2
6
1
4
325,248
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/one_hot_encode.py
kamae.spark.estimators.one_hot_encode.OneHotEncodeEstimator
from kamae.spark.params import DropUnseenParams, SingleInputSingleOutputParams, StringIndexParams from typing import List, Optional from .base import BaseEstimator from kamae.spark.utils import collect_labels_array from pyspark.sql.types import DataType, IntegerType, LongType, ShortType, StringType import pyspark.sql.f...
class OneHotEncodeEstimator(BaseEstimator, DropUnseenParams, SingleInputSingleOutputParams, StringIndexParams): ''' One-hot encoder Spark Estimator for use in Spark pipelines. This estimator is used to collect all the string labels for a given column. When fit is called it returns a OneHotEncodeTransfo...
6
4
32
2
17
13
1
0.79
4
5
1
0
3
0
3
67
113
9
58
26
35
46
13
7
9
1
6
0
3
325,249
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/shared_one_hot_encode.py
kamae.spark.estimators.shared_one_hot_encode.SharedOneHotEncodeEstimator
from kamae.spark.transformers import SharedOneHotEncodeTransformer from kamae.spark.params import DropUnseenParams, MultiInputMultiOutputParams, StringIndexParams from typing import List, Optional from pyspark import keyword_only from pyspark.sql.types import DataType, IntegerType, LongType, ShortType, StringType from ...
class SharedOneHotEncodeEstimator(BaseEstimator, MultiInputMultiOutputParams, DropUnseenParams, StringIndexParams): ''' Shared One-hot encoder Spark Estimator for use in Spark pipelines. This estimator is used to collect all the string labels for a given set of input columns. When fit is called it retu...
6
4
31
1
17
13
1
0.76
4
5
1
0
3
0
3
67
111
7
59
26
36
45
13
7
9
1
6
0
3
325,250
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/shared_string_index.py
kamae.spark.estimators.shared_string_index.SharedStringIndexEstimator
from kamae.spark.transformers import SharedStringIndexTransformer import pyspark.sql.functions as F from pyspark.sql import DataFrame from kamae.spark.utils import collect_labels_array_from_multiple_columns from .base import BaseEstimator from kamae.spark.params import MultiInputMultiOutputParams, StringIndexParams fro...
class SharedStringIndexEstimator(BaseEstimator, MultiInputMultiOutputParams, StringIndexParams): ''' Shared vocab String indexer Spark Estimator for use in Spark pipelines. This estimator is used to collect all the string labels across multiple columns and keeps a shared list of string labels. When...
6
4
29
2
16
11
1
0.73
3
4
1
0
3
0
3
65
103
8
55
24
34
40
13
7
9
1
6
0
3
325,251
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/single_feature_array_standard_scale.py
kamae.spark.estimators.single_feature_array_standard_scale.SingleFeatureArrayStandardScaleEstimator
from typing import Dict, List, Optional from pyspark.sql import DataFrame from .base import BaseEstimator from kamae.spark.params import MaskValueParams, SingleInputSingleOutputParams import numpy as np from kamae.spark.transformers import StandardScaleTransformer import pyspark.sql.functions as F from pyspark import k...
class SingleFeatureArrayStandardScaleEstimator(BaseEstimator, SingleInputSingleOutputParams, MaskValueParams): ''' Single feature array standard scaler estimator for use in Spark pipelines. This estimator is used to calculate the mean and standard deviation of the input feature column when it is an arr...
6
4
32
3
19
11
1
0.65
3
6
1
0
3
0
3
57
115
11
63
25
45
41
18
11
14
2
6
1
4
325,252
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/standard_scale.py
kamae.spark.estimators.standard_scale.StandardScaleEstimator
from .base import BaseEstimator import pyspark.sql.functions as F from pyspark import keyword_only from pyspark.sql import DataFrame from pyspark.sql.types import ArrayType, DataType, DoubleType, FloatType import numpy as np from kamae.spark.transformers import StandardScaleTransformer from typing import List, Optional...
class StandardScaleEstimator(BaseEstimator, SingleInputSingleOutputParams, MaskValueParams): ''' Standard scaler estimator for use in Spark pipelines. This estimator is used to calculate the mean and standard deviation of the input feature column. When fit is called it returns a StandardScaleTransforme...
6
4
33
3
21
9
1
0.51
3
5
1
0
3
0
3
57
118
14
69
29
51
35
23
15
19
2
6
1
4
325,253
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/estimators/string_index.py
kamae.spark.estimators.string_index.StringIndexEstimator
from kamae.spark.utils import collect_labels_array import pyspark.sql.functions as F from .base import BaseEstimator from typing import List, Optional from pyspark import keyword_only from kamae.spark.transformers import StringIndexTransformer from kamae.spark.params import SingleInputSingleOutputParams, StringIndexPar...
class StringIndexEstimator(BaseEstimator, SingleInputSingleOutputParams, StringIndexParams): ''' String indexer Spark Estimator for use in Spark pipelines. This estimator is used to collect all the string labels for a given column. When fit is called it returns a StringIndexerLayerModel which can be us...
6
4
28
1
16
11
1
0.72
3
4
1
0
3
0
3
65
100
7
54
24
33
39
13
7
9
1
6
0
3
325,254
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.HasInputDtype
from pyspark.ml.param import Param, Params, TypeConverters from kamae.utils import DType from typing import List, Optional class HasInputDtype(Params): """ Mixin class for a transformer input datatype. """ inputDtype = Param(Params._dummy(), 'inputDtype', 'Input datatype of the transformer', typeConver...
class HasInputDtype(Params): ''' Mixin class for a transformer input datatype. ''' def setInputDtype(self, value: str) -> 'HasInputDtype': ''' Sets the parameter inputDtype to the given string value. :param value: String to set the inputDtype parameter to. :raises V...
4
4
11
0
5
5
2
0.83
1
3
1
1
3
0
3
3
47
5
23
8
19
19
15
8
11
2
1
1
5
325,255
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.HasOutputDtype
from typing import List, Optional from kamae.utils import DType from pyspark.ml.param import Param, Params, TypeConverters class HasOutputDtype(Params): """ Mixin class for a transformer output datatype. """ outputDtype = Param(Params._dummy(), 'outputDtype', 'Output datatype of the transformer', typeC...
class HasOutputDtype(Params): ''' Mixin class for a transformer output datatype. ''' def setOutputDtype(self, value: str) -> 'HasOutputDtype': ''' Sets the parameter outputDtype to the given string value. :param value: String to set the outputDtype parameter to. :ra...
4
4
11
1
5
5
2
0.83
1
3
1
3
3
0
3
3
48
6
23
8
19
19
15
8
11
2
1
1
5
325,256
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.MultiInputMultiOutputParams
from .default_read_write import KamaeDefaultParamsReadable, KamaeDefaultParamsWritable from .utils import InputOutputExtractor class MultiInputMultiOutputParams(MultiInputParams, MultiOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): """ Mixin class containing set met...
class MultiInputMultiOutputParams(MultiInputParams, MultiOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): ''' Mixin class containing set methods for the multiple input and multiple output columns scenario. ''' pass
1
1
0
0
0
0
0
0.57
5
0
0
5
0
0
0
13
11
0
7
7
0
4
1
1
0
0
3
0
0
325,257
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.MultiInputParams
from typing import List, Optional from pyspark.ml.param.shared import HasInputCol, HasInputCols, HasOutputCol, HasOutputCols class MultiInputParams(HasInputCols): """ Mixin class containing set methods for the multiple input columns scenario. """ def setInputCols(self, value: List[str]) -> 'MultiInput...
class MultiInputParams(HasInputCols): ''' Mixin class containing set methods for the multiple input columns scenario. ''' def setInputCols(self, value: List[str]) -> 'MultiInputParams': ''' Sets the parameter inputCols to the given list of strings. :param value: List of str...
2
2
8
1
2
5
1
2.67
1
1
0
2
1
0
1
1
13
2
3
2
1
8
3
2
1
1
1
0
1
325,258
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.MultiInputSingleOutputParams
from .utils import InputOutputExtractor from .default_read_write import KamaeDefaultParamsReadable, KamaeDefaultParamsWritable class MultiInputSingleOutputParams(MultiInputParams, SingleOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): """ Mixin class containing set m...
class MultiInputSingleOutputParams(MultiInputParams, SingleOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): ''' Mixin class containing set methods for the multiple input and single output column scenario. ''' pass
1
1
0
0
0
0
0
0.57
5
0
0
29
0
0
0
13
11
0
7
7
0
4
1
1
0
0
3
0
0
325,259
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.MultiOutputParams
from pyspark.ml.param.shared import HasInputCol, HasInputCols, HasOutputCol, HasOutputCols from typing import List, Optional from .name import HasLayerName class MultiOutputParams(HasLayerName, HasOutputCols, HasOutputDtype): """ Mixin class containing set methods for the multiple output columns scenario. ...
class MultiOutputParams(HasLayerName, HasOutputCols, HasOutputDtype): ''' Mixin class containing set methods for the multiple output columns scenario. ''' def setLayerName(self, value: str) -> 'MultiOutputParams': ''' Sets the parameter layerName to the given string value. ...
3
3
15
1
7
7
3
1.13
3
2
0
2
2
0
2
6
36
4
15
3
12
17
11
3
8
3
2
2
6
325,260
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.SingleInputMultiOutputParams
from .utils import InputOutputExtractor from .default_read_write import KamaeDefaultParamsReadable, KamaeDefaultParamsWritable class SingleInputMultiOutputParams(SingleInputParams, MultiOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): """ Mixin class containing set m...
class SingleInputMultiOutputParams(SingleInputParams, MultiOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): ''' Mixin class containing set methods for the single input and multiple output columns scenario. ''' pass
1
1
0
0
0
0
0
0.57
5
0
0
2
0
0
0
13
11
0
7
7
0
4
1
1
0
0
3
0
0
325,261
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.SingleInputParams
from pyspark.ml.param.shared import HasInputCol, HasInputCols, HasOutputCol, HasOutputCols class SingleInputParams(HasInputCol): """ Mixin class containing set methods for the single input column scenario. """ def setInputCol(self, value: str) -> 'SingleInputParams': """ Sets the param...
class SingleInputParams(HasInputCol): ''' Mixin class containing set methods for the single input column scenario. ''' def setInputCol(self, value: str) -> 'SingleInputParams': ''' Sets the parameter inputCol to the given string value. :param value: String to set the inputC...
2
2
8
1
2
5
1
2.67
1
1
0
2
1
0
1
1
13
2
3
2
1
8
3
2
1
1
1
0
1
325,262
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.SingleInputSingleOutputParams
from .default_read_write import KamaeDefaultParamsReadable, KamaeDefaultParamsWritable from .utils import InputOutputExtractor class SingleInputSingleOutputParams(SingleInputParams, SingleOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): """ Mixin class containing set...
class SingleInputSingleOutputParams(SingleInputParams, SingleOutputParams, InputOutputExtractor, KamaeDefaultParamsReadable, KamaeDefaultParamsWritable): ''' Mixin class containing set methods for the single input and single output column scenario. ''' pass
1
1
0
0
0
0
0
0.57
5
0
0
66
0
0
0
13
11
0
7
7
0
4
1
1
0
0
3
0
0
325,263
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/base.py
kamae.spark.params.base.SingleOutputParams
from .name import HasLayerName from pyspark.ml.param.shared import HasInputCol, HasInputCols, HasOutputCol, HasOutputCols class SingleOutputParams(HasLayerName, HasOutputCol, HasOutputDtype): """ Mixin class containing set methods for the single output column scenario. """ def setLayerName(self, value...
class SingleOutputParams(HasLayerName, HasOutputCol, HasOutputDtype): ''' Mixin class containing set methods for the single output column scenario. ''' def setLayerName(self, value: str) -> 'SingleOutputParams': ''' Sets the parameter layerName to the given string value. Th...
3
3
13
1
5
7
3
1.55
3
2
0
2
2
0
2
6
32
4
11
3
8
17
11
3
8
3
2
2
6
325,264
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/default_read_write.py
kamae.spark.params.default_read_write.KamaeDefaultParamsReadable
from pyspark.ml.util import DefaultParamsReadable, DefaultParamsReader, DefaultParamsWritable, DefaultParamsWriter, MLWriter class KamaeDefaultParamsReadable(DefaultParamsReadable): """ DefaultParamsReadable with a workaround for slow metadata writes in Databricks. Replicates the functionality of DefaultPa...
class KamaeDefaultParamsReadable(DefaultParamsReadable): ''' DefaultParamsReadable with a workaround for slow metadata writes in Databricks. Replicates the functionality of DefaultParamsReadable in PySpark 3.5.0 since Databricks uses different functionality ''' @classmethod def read(cls) ->...
3
2
3
0
2
1
1
1.5
1
1
1
4
0
0
1
1
11
1
4
3
1
6
3
2
1
1
1
0
1
325,265
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/default_read_write.py
kamae.spark.params.default_read_write.KamaeDefaultParamsReader
from typing import Any, Dict, Optional from pyspark import SparkContext import os from pyspark.ml.util import DefaultParamsReadable, DefaultParamsReader, DefaultParamsWritable, DefaultParamsWriter, MLWriter class KamaeDefaultParamsReader(DefaultParamsReader): """ DefaultParamsReadable with a workaround for slo...
class KamaeDefaultParamsReader(DefaultParamsReader): ''' DefaultParamsReadable with a workaround for slow metadata writes in Databricks. Replicates the functionality of DefaultParamsReadable in PySpark 3.5.0 since Databricks uses different functionality ''' @staticmethod def loadMetadata(pa...
3
2
17
0
7
10
1
1.67
1
2
0
0
0
0
1
1
25
1
9
8
4
15
6
5
4
1
1
0
1
325,266
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/default_read_write.py
kamae.spark.params.default_read_write.KamaeDefaultParamsWritable
from pyspark.ml.param import Params from pyspark.ml.util import DefaultParamsReadable, DefaultParamsReader, DefaultParamsWritable, DefaultParamsWriter, MLWriter class KamaeDefaultParamsWritable(DefaultParamsWritable): """ DefaultParamsWritable with a workaround for slow metadata writes in Databricks. Repli...
class KamaeDefaultParamsWritable(DefaultParamsWritable): ''' DefaultParamsWritable with a workaround for slow metadata writes in Databricks. Replicates the functionality of DefaultParamsWritable in PySpark 3.5.0 since Databricks uses different functionality ''' def write(self) -> MLWriter: ...
2
2
12
1
10
1
2
0.55
1
3
1
4
1
0
1
1
19
2
11
3
8
6
6
3
3
2
1
1
2
325,267
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/default_read_write.py
kamae.spark.params.default_read_write.KamaeDefaultParamsWriter
from pyspark.ml.util import DefaultParamsReadable, DefaultParamsReader, DefaultParamsWritable, DefaultParamsWriter, MLWriter from typing import Any, Dict, Optional import os from pyspark import SparkContext class KamaeDefaultParamsWriter(DefaultParamsWriter): """ DefaultParamsWriter with a workaround for slow ...
class KamaeDefaultParamsWriter(DefaultParamsWriter): ''' DefaultParamsWriter with a workaround for slow metadata writes in Databricks. Replicates the functionality of DefaultParamsWriter in PySpark 3.5.0 since Databricks uses different functionality ''' @staticmethod def saveMetadata(instan...
3
2
29
0
12
17
1
1.57
1
2
0
0
0
0
1
1
37
1
14
11
5
22
5
4
3
1
1
0
1
325,268
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/name.py
kamae.spark.params.name.HasLayerName
from pyspark.ml.param import Param, Params, TypeConverters class HasLayerName(Params): """ Mixin class for a layer name. """ layerName = Param(Params._dummy(), 'layerName', 'Name of the layer', typeConverter=TypeConverters.toString) def getLayerName(self) -> str: """ Gets the value...
class HasLayerName(Params): ''' Mixin class for a layer name. ''' def getLayerName(self) -> str: ''' Gets the value of the layerName parameter. :returns: Layer name. ''' pass
2
2
7
1
2
4
1
0.78
1
1
0
3
1
0
1
1
19
3
9
3
7
7
4
3
2
1
1
0
1
325,269
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.AutoBroadcastParams
from pyspark.ml.param import Param, Params, TypeConverters class AutoBroadcastParams(Params): """ Mixin class for the auto broadcast parameter. """ autoBroadcast = Param(Params._dummy(), 'autoBroadcast', 'Whether to enable auto broadcast for the layer.\n If `True`, will broadcast the input tenso...
class AutoBroadcastParams(Params): ''' Mixin class for the auto broadcast parameter. ''' def setAutoBroadcast(self, value: bool) -> 'AutoBroadcastParams': ''' Sets the autoBroadcast parameter. :param value: autoBroadcast. :returns: Instance of class mixed in. ...
3
3
7
0
2
5
1
0.86
1
1
0
1
2
0
2
2
29
3
14
4
11
12
6
4
3
1
1
0
2
325,270
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.ConstantStringArrayParams
from typing import List, Union from pyspark.ml.param import Param, Params, TypeConverters class ConstantStringArrayParams(Params): """ Mixin class containing separator parameter needed for constant string array transforms. """ constantStringArray = Param(Params._dummy(), 'constantStringArray', 'Val...
class ConstantStringArrayParams(Params): ''' Mixin class containing separator parameter needed for constant string array transforms. ''' def setConstantStringArray(self, value: List[str]) -> 'ConstantStringArrayParams': ''' Sets the constantStringArray parameter. :param val...
3
3
8
1
2
5
1
1.18
1
1
0
3
2
0
2
2
29
5
11
4
8
13
6
4
3
1
1
0
2
325,271
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.DateTimeParams
from pyspark.ml.param import Param, Params, TypeConverters class DateTimeParams(Params): """ Mixin class for a datetime transformation """ includeTime = Param(Params._dummy(), 'includeTime', 'Whether to include the time in the output datetime.\n If False, only the date is included in the format ...
class DateTimeParams(Params): ''' Mixin class for a datetime transformation ''' def setIncludeTime(self, value: bool) -> 'DateTimeParams': ''' Sets the includeTime parameter. :param value: includeTime. :returns: Instance of class mixed in. ''' pass ...
3
3
7
0
2
5
1
0.92
1
1
0
1
2
0
2
2
28
3
13
4
10
12
6
4
3
1
1
0
2
325,272
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.DefaultIntValueParams
from pyspark.ml.param import Param, Params, TypeConverters class DefaultIntValueParams(Params): """ Mixin class containing default integer parameter. """ defaultValue = Param(Params._dummy(), 'defaultValue', '\n Default int value to use in the transformer.\n ', typeConverter=TypeConverter...
class DefaultIntValueParams(Params): ''' Mixin class containing default integer parameter. ''' def setDefaultValue(self, value: int) -> 'DefaultIntValueParams': ''' Sets the defaultValue parameter. :param value: Value to set the defaultValue parameter to. :returns: ...
3
3
7
0
2
5
1
0.92
1
1
0
2
2
0
2
2
28
3
13
4
10
12
6
4
3
1
1
0
2
325,273
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.DropUnseenParams
from pyspark.ml.param import Param, Params, TypeConverters class DropUnseenParams(Params): """ Mixin class containing parameters needed to drop unseen index in the one hot encoder layer. """ dropUnseen = Param(Params._dummy(), 'dropUnseen', 'Whether to the drop unseen label index in the one hot enc...
class DropUnseenParams(Params): ''' Mixin class containing parameters needed to drop unseen index in the one hot encoder layer. ''' def setDropUnseen(self, value: bool) -> 'DropUnseenParams': ''' Sets the dropUnseen parameter. :param value: Bool value of whether to drop uns...
3
3
9
1
2
6
1
1.36
1
1
0
4
2
0
2
2
31
5
11
4
8
15
6
4
3
1
1
0
2
325,274
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.HashIndexParams
from pyspark.ml.param import Param, Params, TypeConverters class HashIndexParams(Params): """ Mixin class containing bin parameter needed for hash indexing layers. """ numBins = Param(Params._dummy(), 'numBins', 'Number of bins to use for hash indexing', typeConverter=TypeConverters.toInt) maskValu...
class HashIndexParams(Params): ''' Mixin class containing bin parameter needed for hash indexing layers. ''' def setNumBins(self, value: int) -> 'HashIndexParams': ''' Sets the numBins parameter. :param value: Integer value for the number of bins to use for hash indexing. ...
5
5
8
1
3
5
1
0.91
1
3
0
2
4
0
4
4
54
10
23
7
18
21
13
7
8
2
1
1
5
325,275
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.ImputeMethodParams
from pyspark.ml.param import Param, Params, TypeConverters class ImputeMethodParams(Params): """ Mixin class containing imputeParam parameter for imputation layer. This parameter is used to select the method to estimate the value that should be imputed over the mask. """ imputeMethod = Param(Pa...
class ImputeMethodParams(Params): ''' Mixin class containing imputeParam parameter for imputation layer. This parameter is used to select the method to estimate the value that should be imputed over the mask. ''' def __init__(self) -> None: pass def setImputeMethod(self, value: st...
4
3
7
0
4
2
1
0.55
1
3
0
1
3
1
3
3
38
4
22
6
18
12
11
6
7
2
1
1
4
325,276
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.LabelsArrayParams
from typing import List, Union from pyspark.ml.param import Param, Params, TypeConverters class LabelsArrayParams(Params): labelsArray = Param(Params._dummy(), 'labelsArray', 'Ordered list of labels to use for the indexer', typeConverter=TypeConverters.toListString) def setLabelsArray(self, value: List[str]) ...
class LabelsArrayParams(Params): def setLabelsArray(self, value: List[str]) -> 'LabelsArrayParams': ''' Sets the labelArray parameter. :param value: List of strings to use in indexing transformers. :returns: Instance of class mixed in. ''' pass def getLabelsArr...
3
2
8
1
2
5
1
0.82
1
1
0
1
2
0
2
2
24
4
11
4
8
9
6
4
3
1
1
0
2
325,277
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.LatLonConstantParams
from pyspark.ml.param import Param, Params, TypeConverters from typing import List, Union class LatLonConstantParams(Params): """ Mixin class containing lat and lon constant parameters. """ latLonConstant = Param(Params._dummy(), 'latLonConstant', 'Constant lat & lon to use in haversine distance calcul...
class LatLonConstantParams(Params): ''' Mixin class containing lat and lon constant parameters. ''' def setLatLonConstant(self, value: List[float]) -> 'LatLonConstantParams': ''' Sets the latLonConstant parameter. :param value: List of float lat and lon values. :ret...
3
3
13
0
8
5
3
0.57
1
2
0
2
2
0
2
2
39
3
23
4
20
13
11
4
8
5
1
1
6
325,278
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.ListwiseParams
from pyspark.ml.param import Param, Params, TypeConverters class ListwiseParams(Params): """ Mixin class containing the parameters needed for Listwise transformers. """ queryIdCol = Param(Params._dummy(), 'queryIdCol', "Column name to aggregate summary statistics upon,\n such as 'search_id'.", t...
class ListwiseParams(Params): ''' Mixin class containing the parameters needed for Listwise transformers. ''' def setQueryIdCol(self, value: str) -> 'ListwiseParams': ''' Sets the query id parameter. :param value: String for column name to aggregate upon. :returns: ...
5
5
10
1
4
5
1
0.71
1
2
0
2
4
0
4
4
63
10
31
8
26
22
14
8
9
2
1
1
5
325,279
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.ListwiseStatisticsParams
from pyspark.ml.param import Param, Params, TypeConverters from typing import List, Union class ListwiseStatisticsParams(ListwiseParams): """ Mixin class containing the parameters needed for Listwise Statistics transformers. """ topN = Param(Params._dummy(), 'topN', 'Limit to how far into the list to a...
class ListwiseStatisticsParams(ListwiseParams): ''' Mixin class containing the parameters needed for Listwise Statistics transformers. ''' def setInputCols(self, value: List[str]) -> 'ListwiseStatisticsParams': ''' Overrides setting the input columns for the transformer. Th...
6
6
10
1
4
5
1
0.72
1
3
0
5
5
0
5
9
72
10
36
8
30
26
17
8
11
3
2
1
7
325,280
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.MaskStringValueParams
from pyspark.ml.param import Param, Params, TypeConverters class MaskStringValueParams(Params): """ Mixin class containing maskValue parameter needed for MinHashIndexTransformer and other transformers that require a string mask value. """ maskValue = Param(Params._dummy(), 'maskValue', '\n V...
class MaskStringValueParams(Params): ''' Mixin class containing maskValue parameter needed for MinHashIndexTransformer and other transformers that require a string mask value. ''' def setMaskValue(self, value: str) -> 'MaskStringValueParams': ''' Sets the maskValue parameter. ...
3
3
7
0
2
5
1
1
1
1
0
1
2
0
2
2
29
3
13
4
10
13
6
4
3
1
1
0
2
325,281
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.MaskValueParams
from pyspark.ml.param import Param, Params, TypeConverters class MaskValueParams(Params): """ Mixin class containing maskValue parameter needed for standard scale and imputation layers. This parameter is used to ignore certain values in the scaling process. For imputation, the value is ignored by t...
class MaskValueParams(Params): ''' Mixin class containing maskValue parameter needed for standard scale and imputation layers. This parameter is used to ignore certain values in the scaling process. For imputation, the value is ignored by the estimator and imputed over at training and inference...
3
3
7
0
2
5
1
1.23
1
1
0
6
2
0
2
2
32
3
13
4
10
16
6
4
3
1
1
0
2
325,282
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.MathFloatConstantParams
from pyspark.ml.param import Param, Params, TypeConverters class MathFloatConstantParams(Params): """ Mixin class for a math float constant. """ mathFloatConstant = Param(Params._dummy(), 'mathFloatConstant', 'Float constant used for math operations', typeConverter=TypeConverters.toFloat) def __in...
class MathFloatConstantParams(Params): ''' Mixin class for a math float constant. ''' def __init__(self) -> None: pass def getMathFloatConstant(self) -> float: ''' Gets the value of the mathFloatConstant parameter. :returns: Float constant used for math operati...
4
3
6
1
2
3
1
0.86
1
2
0
7
3
0
3
3
32
6
14
5
10
12
9
5
5
1
1
0
3
325,283
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.NanFillValueParams
from pyspark.ml.param import Param, Params, TypeConverters class NanFillValueParams(Params): nanFillValue = Param(Params._dummy(), 'nanFillValue', '\n The value to fill Nan with.\n ', typeConverter=TypeConverters.toFloat) def setNanFillValue(self, value: float) -> 'NanFillValueParams': "...
class NanFillValueParams(Params): def setNanFillValue(self, value: float) -> 'NanFillValueParams': ''' Sets the nanFillValue parameter. :param value: Float value to use as the fill value. :returns: Instance of class mixed in. ''' pass def getNanFillValue(self) ...
3
2
8
0
3
5
2
0.6
1
2
0
6
2
0
2
2
26
2
15
4
12
9
8
4
5
2
1
1
3
325,284
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.NegationParams
from pyspark.ml.param import Param, Params, TypeConverters class NegationParams(Params): """ Mixin class containing negation parameter needed for transforms that output a boolean. """ negation = Param(Params._dummy(), 'negation', 'Whether to negate the operation.', typeConverter=TypeConverters.toBo...
class NegationParams(Params): ''' Mixin class containing negation parameter needed for transforms that output a boolean. ''' def setNegation(self, value: bool) -> 'NegationParams': ''' Sets the negation parameter. :param value: Bool value of whether to negate the operation....
3
3
8
1
2
5
1
1.18
1
1
0
3
2
0
2
2
29
5
11
4
8
13
6
4
3
1
1
0
2
325,285
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.PadValueParams
from pyspark.ml.param import Param, Params, TypeConverters from typing import List, Union class PadValueParams(Params): """ Mixin class containing pad value parameters needed for ordinal array encoder transformers and array crop transformers. """ padValue = Param(Params._dummy(), 'padValue', 'The v...
class PadValueParams(Params): ''' Mixin class containing pad value parameters needed for ordinal array encoder transformers and array crop transformers. ''' def setPadValue(self, value: Union[str, int, float]) -> 'PadValueParams': ''' Sets the parameter pad value to the given value...
3
3
7
0
2
5
1
1.18
1
3
0
2
2
0
2
2
27
3
11
4
8
13
6
4
3
1
1
0
2
325,286
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.StandardScaleParams
from typing import List, Union from pyspark.ml.param import Param, Params, TypeConverters class StandardScaleParams(MaskValueParams): """ Mixin class containing mean and standard deviation parameters needed for standard scaler layers. """ mean = Param(Params._dummy(), 'mean', 'Mean of the feature v...
class StandardScaleParams(MaskValueParams): ''' Mixin class containing mean and standard deviation parameters needed for standard scaler layers. ''' def setMean(self, value: List[float]) -> 'StandardScaleParams': ''' Sets the parameter mean to the given Vector value. Saves ...
5
5
10
1
4
5
2
0.89
1
4
0
2
4
0
4
6
61
10
27
9
22
24
17
9
12
2
2
1
6
325,287
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.StandardScaleSkipZerosParams
from pyspark.ml.param import Param, Params, TypeConverters class StandardScaleSkipZerosParams(Params): """ Mixin class containing maskValue parameter needed for conditional standard scale layers. This parameter is used to ignore zeros when scaling. """ skipZeros = Param(Params._dummy(), 'skipZeros'...
class StandardScaleSkipZerosParams(Params): ''' Mixin class containing maskValue parameter needed for conditional standard scale layers. This parameter is used to ignore zeros when scaling. ''' def setSkipZeros(self, value: bool) -> 'StandardScaleSkipZerosParams': ''' Sets the skip...
5
5
8
1
2
5
1
0.85
1
2
0
2
4
0
4
4
58
10
26
7
21
22
11
7
6
1
1
0
4
325,288
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.StringConstantParams
from pyspark.ml.param import Param, Params, TypeConverters class StringConstantParams(Params): """ Mixin class for a string constant. """ stringConstant = Param(Params._dummy(), 'stringConstant', 'String constant to use in many string transformers', typeConverter=TypeConverters.toString) def setSt...
class StringConstantParams(Params): ''' Mixin class for a string constant. ''' def setStringConstant(self, value: str) -> 'StringConstantParams': ''' Sets the stringConstant parameter. :param value: String constant value to use in different string transformers. :ret...
3
3
8
1
2
5
1
1.09
1
1
0
1
2
0
2
2
28
5
11
4
8
12
6
4
3
1
1
0
2
325,289
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.StringIndexParams
from pyspark.ml.param import Param, Params, TypeConverters class StringIndexParams(LabelsArrayParams): """ Mixin class containing parameters needed for string indexer and one hot encoder layers. """ stringOrderType = Param(Params._dummy(), 'stringOrderType', "How to order the strings. Options are\n...
class StringIndexParams(LabelsArrayParams): ''' Mixin class containing parameters needed for string indexer and one hot encoder layers. ''' def setStringOrderType(self, value: str) -> 'StringIndexParams': ''' Sets the stringOrderType parameter to the given value. Must be on...
9
9
10
1
4
6
1
0.88
1
3
0
8
8
0
8
10
125
20
56
14
47
49
28
14
19
2
2
1
11
325,290
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.StringRegexParams
from pyspark.ml.param import Param, Params, TypeConverters class StringRegexParams(Params): """ Mixin class for string transformers that use regex. """ regex = Param(Params._dummy(), 'regex', 'Whether to use regex in the string contains operation.', typeConverter=TypeConverters.toBoolean) def setR...
class StringRegexParams(Params): ''' Mixin class for string transformers that use regex. ''' def setRegex(self, value: bool) -> 'StringRegexParams': ''' Sets the regex parameter. :param value: Bool value of whether to use regex in the string contains operation. ...
3
3
9
1
2
6
1
1.27
1
1
0
1
2
0
2
2
30
5
11
4
8
14
6
4
3
1
1
0
2
325,291
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/shared.py
kamae.spark.params.shared.UnixTimestampParams
from pyspark.ml.param import Param, Params, TypeConverters class UnixTimestampParams(Params): """ Mixin class for a unix timestamp """ unit = Param(Params._dummy(), 'unit', 'Unit of the timestamp.\n Can be `milliseconds` or `seconds`. Can also use short-hand `ms` and `s`.\n Default is `s`...
class UnixTimestampParams(Params): ''' Mixin class for a unix timestamp ''' def setUnit(self, value: str) -> 'UnixTimestampParams': ''' Sets the unit parameter. :param value: unit. :returns: Instance of class mixed in. ''' pass def getUnit(self)...
3
3
11
1
6
5
3
0.6
1
2
0
3
2
0
2
2
37
5
20
5
17
12
13
5
10
4
1
1
5
325,292
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/params/utils.py
kamae.spark.params.utils.InputOutputExtractor
from pyspark.ml.param import Params import pyspark.sql.functions as F from pyspark.sql.types import DataType from typing import List, Optional, Tuple from pyspark.sql import Column, DataFrame class InputOutputExtractor(Params): """ Mixin class for extracting input & output information from a transformer/estima...
class InputOutputExtractor(Params): ''' Mixin class for extracting input & output information from a transformer/estimator. Used across all transformers/estimators to facilitate the construction of the pipeline graph. ''' def _get_single_or_multi_col(self, ingress: bool) -> List[str]: ...
6
5
21
1
12
9
3
0.81
1
4
0
5
3
0
4
4
96
9
48
13
40
39
22
10
17
4
1
2
10
325,293
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline.py
kamae.spark.pipeline.pipeline.KamaeSparkPipeline
from kamae.spark.pipeline import KamaeSparkPipelineModel import networkx as nx from pyspark.ml import Pipeline from pyspark.ml.param import Params from pyspark import keyword_only from pyspark.ml.util import DefaultParamsReader, MLWriter from typing import TYPE_CHECKING, List, Optional, Type from pyspark.sql import Dat...
class KamaeSparkPipeline(Pipeline): ''' KamaeSparkPipeline is a subclass of pyspark.ml.Pipeline that is used to chain together BaseTransformers. It maintains the same functionality as pyspark.ml.Pipeline e.g. serialisation. ''' @keyword_only def __init__(self, *, stages: Optional[List['Kama...
15
11
16
2
8
6
2
0.84
1
12
6
0
8
0
10
10
175
26
81
38
62
68
56
30
45
7
1
3
20
325,294
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline.py
kamae.spark.pipeline.pipeline.KamaeSparkPipelineReader
from pyspark.ml.util import DefaultParamsReader, MLWriter from typing import TYPE_CHECKING, List, Optional, Type from pyspark.ml.pipeline import PipelineReader, PipelineSharedReadWrite, PipelineWriter class KamaeSparkPipelineReader(PipelineReader): """ Util class for reading a pipeline from a persistent storag...
class KamaeSparkPipelineReader(PipelineReader): ''' Util class for reading a pipeline from a persistent storage path. ''' def __init__(self, cls: Type[KamaeSparkPipeline]) -> None: pass def load(self, path: str) -> KamaeSparkPipeline: ''' Loads a pipeline from a given ...
3
2
6
1
3
3
1
1.14
1
3
1
0
2
0
2
2
18
3
7
5
4
8
7
5
4
1
1
0
2
325,295
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline.py
kamae.spark.pipeline.pipeline.KamaeSparkPipelineWriter
from pyspark.ml.pipeline import PipelineReader, PipelineSharedReadWrite, PipelineWriter class KamaeSparkPipelineWriter(PipelineWriter): """ Util class for writing a pipeline to a persistent storage path. """ def __init__(self, instance: KamaeSparkPipeline) -> None: super().__init__(instance=in...
class KamaeSparkPipelineWriter(PipelineWriter): ''' Util class for writing a pipeline to a persistent storage path. ''' def __init__(self, instance: KamaeSparkPipeline) -> None: pass
2
1
2
0
2
0
1
1
1
2
1
0
1
0
1
1
7
1
3
2
1
3
3
2
1
1
1
0
1
325,296
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline_model.py
kamae.spark.pipeline.pipeline_model.KamaeSparkPipelineModel
import keras_tuner as kt from pyspark.ml import PipelineModel from kamae.graph import PipelineGraph from pyspark.ml.util import DefaultParamsReader, MLWriter from kamae.spark.transformers import BaseTransformer import tensorflow as tf from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Type, Union, c...
class KamaeSparkPipelineModel(PipelineModel): ''' KamaeSparkPipelineModel is a subclass of pyspark.ml.PipelineModel that is used to chain together LayerTransformers. It maintains the same functionality as pyspark.ml.PipelineModel e.g. serialisation. ''' def __init__(self, stages: List[BaseTran...
10
9
14
1
6
6
1
1.1
1
8
4
0
7
1
8
8
123
16
51
27
32
56
30
17
21
3
1
2
11
325,297
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline_model.py
kamae.spark.pipeline.pipeline_model.KamaeSparkPipelineModelReader
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Type, Union, cast from pyspark.ml.util import DefaultParamsReader, MLWriter from pyspark.ml.pipeline import PipelineModelReader, PipelineModelWriter, PipelineSharedReadWrite from kamae.spark.transformers import BaseTransformer class KamaeSparkPipel...
class KamaeSparkPipelineModelReader(PipelineModelReader): ''' Util class for reading a pipeline model from a persistent storage path. ''' def __init__(self, cls: Type['KamaeSparkPipelineModel']) -> None: pass def load(self, path: str) -> 'KamaeSparkPipelineModel': ''' ...
3
2
7
1
4
3
1
0.89
1
4
2
0
2
0
2
2
20
3
9
5
6
8
7
5
4
1
1
0
2
325,298
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/pipeline/pipeline_model.py
kamae.spark.pipeline.pipeline_model.KamaeSparkPipelineModelWriter
from pyspark.ml.pipeline import PipelineModelReader, PipelineModelWriter, PipelineSharedReadWrite class KamaeSparkPipelineModelWriter(PipelineModelWriter): """ Util class for writing a pipeline model to a persistent storage path. """ def __init__(self, instance: 'KamaeSparkPipelineModel') -> None: ...
class KamaeSparkPipelineModelWriter(PipelineModelWriter): ''' Util class for writing a pipeline model to a persistent storage path. ''' def __init__(self, instance: 'KamaeSparkPipelineModel') -> None: pass
2
1
2
0
2
0
1
1
1
1
0
0
1
0
1
1
7
1
3
2
1
3
3
2
1
1
1
0
1
325,299
ExpediaGroup/kamae
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ExpediaGroup_kamae/src/kamae/spark/transformers/absolute_value.py
kamae.spark.transformers.absolute_value.AbsoluteValueTransformer
from pyspark.sql import DataFrame from pyspark.sql.types import ByteType, DataType, DoubleType, FloatType, IntegerType, LongType, ShortType from typing import List, Optional import pyspark.sql.functions as F from kamae.spark.utils import single_input_single_output_scalar_transform from kamae.spark.params import SingleI...
class AbsoluteValueTransformer(BaseTransformer, SingleInputSingleOutputParams): ''' Absolute value Spark Transformer for use in Spark pipelines. This transformer applies abs(x) operation to the input. ''' @keyword_only def __init__(self, inputCol: Optional[str]=None, outputCol: Optional[str]=No...
7
5
17
1
9
7
1
0.76
2
3
1
0
4
0
4
57
82
8
42
20
25
32
13
8
8
1
6
0
4