pjml.stream.expand.partition.Partition¶
-
class
pjml.stream.expand.partition.Partition(split_type: str = 'cv', partitions: int = 10, test_size: float = 0.3, seed: int = 0, fields: str = 'X, Y', **kwargs)[source]¶ Class to perform, e.g. Expand+kfoldCV.
This task is already done by function split(), but if performance becomes a concern, this less modular solution is a good choice.
- TODO: the current implementation is just an alias for the nonoptimized
- previous solution.
-
__init__(split_type: str = 'cv', partitions: int = 10, test_size: float = 0.3, seed: int = 0, fields: str = 'X, Y', **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(split_type, partitions, test_size, …)Initialize self. default_config()Create a copy of the component default configuration. disable_pretty_printing()Disable the pretty-printing. dual_transform(train, …)enable_pretty_printing()Enable the pretty-printing. updated(**kwargs)Clone this component, optionally replacing given params. Attributes
cfserializedcfuuidUUID excluding ‘model’ and ‘enhance’ flags. componentcs1Convert component into a config space with a single component inside it. enhanceridShort uuID First 8 chars of uuid, usually for printing purposes. jsonablelongnamemodelnamepathpretty_printingserializedsidShort uuID First 6 chars of uuid, usually for printing purposes. unwrapSubpipeline inside the first Wrap(). uuidLazily calculated unique identifier for this dataset. wrappedSame as unwrap(), but with the external container Wrap. -
classmethod
default_config() → Dict[str, Any][source]¶ Create a copy of the component default configuration.
Returns: - dict
Copy of the component default configuration.
-
id[source]¶ Short uuID First 8 chars of uuid, usually for printing purposes. First collision expect after 12671943 combinations. :return:
-
unwrap[source]¶ Subpipeline inside the first Wrap().
Hopefully there is only one Wrap in the pipeline. This method performs a depth-first search.
Examples
>>> pipe = Pipeline( >>> File(name='iris.arff'), >>> Wrap(Std(), SVMC()), >>> Metric(function='accuracy') >>> ) >>> pipe.unwrap # -> Chain(Std(), SVMC())
-
updated(**kwargs)[source]¶ Clone this component, optionally replacing given params.
Returns: - A ready to use component.
-
uuid¶ Lazily calculated unique identifier for this dataset.
Should be accessed direct as a class member: ‘uuid’.
Returns: - A unique identifier UUID object.