Commit f9f131d8 authored by Chinnu Pittapally's avatar Chinnu Pittapally Committed by Sujen

D3m.api.2019.6.11

parent ab73b4da
{
"created": "2019-05-10T18:32:02.980084Z",
"created": "2019-06-11T21:39:39.177077Z",
"id": "1fd6cc25-bcaf-4e63-8301-d0048c681be7",
"inputs": [
{
......@@ -30,7 +30,7 @@
"primitive": {
"id": "952b659c-d290-465b-9e89-160947e29c06",
"name": "Targets Reader",
"python_path": "d3m.primitives.data_preprocessing.targets_reader.TargetsReader",
"python_path": "d3m.primitives.data_preprocessing.targets_reader.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -60,7 +60,7 @@
"primitive": {
"id": "503e69a1-5fc4-4f14-912a-4b564cb1b171",
"name": "Audio Reader",
"python_path": "d3m.primitives.data_preprocessing.audio_reader.AudioReader",
"python_path": "d3m.primitives.data_preprocessing.audio_reader.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -80,7 +80,7 @@
"primitive": {
"id": "35afd4db-e11d-4e2d-a780-9e123b752bd7",
"name": "Channel Averager",
"python_path": "d3m.primitives.data_preprocessing.channel_averager.ChannelAverager",
"python_path": "d3m.primitives.data_preprocessing.channel_averager.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -110,7 +110,7 @@
"primitive": {
"id": "1ea935ec-e767-4a18-bbd5-b5f66855f4f3",
"name": "Signal Dithering",
"python_path": "d3m.primitives.data_preprocessing.signal_dither.SignalDither",
"python_path": "d3m.primitives.data_preprocessing.signal_dither.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -144,7 +144,7 @@
"primitive": {
"id": "4d7160ef-ca70-4150-b513-36b90817ba45",
"name": "Signal Framing",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.SignalFramer",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -194,7 +194,7 @@
"primitive": {
"id": "a184a1d1-3187-4d1f-99c6-e1d5665c2c99",
"name": "MFCC Feature Extraction",
"python_path": "d3m.primitives.feature_extraction.signal_mfcc.SignalMFCC",
"python_path": "d3m.primitives.feature_extraction.signal_mfcc.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -240,7 +240,7 @@
"primitive": {
"id": "1c5080bd-7b2f-4dbb-ac5f-0a65b59526a7",
"name": "I-vector extractor",
"python_path": "d3m.primitives.data_transformation.i_vector_extractor.IVectorExtractor",
"python_path": "d3m.primitives.data_transformation.i_vector_extractor.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -345,7 +345,7 @@
"primitive": {
"id": "cdb18166-e2ca-4418-b5a4-fffbe98f7844",
"name": "BBN MLP Classifier",
"python_path": "d3m.primitives.classification.mlp.BBNMLPClassifier",
"python_path": "d3m.primitives.classification.mlp.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......
{
"created": "2019-05-10T18:33:25.990687Z",
"created": "2019-06-12T04:13:33.593990Z",
"id": "79dead1f-28e2-4475-bc18-be4af1040db3",
"inputs": [
{
......@@ -30,7 +30,7 @@
"primitive": {
"id": "952b659c-d290-465b-9e89-160947e29c06",
"name": "Targets Reader",
"python_path": "d3m.primitives.data_preprocessing.targets_reader.TargetsReader",
"python_path": "d3m.primitives.data_preprocessing.targets_reader.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -60,7 +60,7 @@
"primitive": {
"id": "503e69a1-5fc4-4f14-912a-4b564cb1b171",
"name": "Audio Reader",
"python_path": "d3m.primitives.data_preprocessing.audio_reader.AudioReader",
"python_path": "d3m.primitives.data_preprocessing.audio_reader.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -80,7 +80,7 @@
"primitive": {
"id": "35afd4db-e11d-4e2d-a780-9e123b752bd7",
"name": "Channel Averager",
"python_path": "d3m.primitives.data_preprocessing.channel_averager.ChannelAverager",
"python_path": "d3m.primitives.data_preprocessing.channel_averager.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -110,7 +110,7 @@
"primitive": {
"id": "1ea935ec-e767-4a18-bbd5-b5f66855f4f3",
"name": "Signal Dithering",
"python_path": "d3m.primitives.data_preprocessing.signal_dither.SignalDither",
"python_path": "d3m.primitives.data_preprocessing.signal_dither.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -144,7 +144,7 @@
"primitive": {
"id": "4d7160ef-ca70-4150-b513-36b90817ba45",
"name": "Signal Framing",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.SignalFramer",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -194,7 +194,7 @@
"primitive": {
"id": "a184a1d1-3187-4d1f-99c6-e1d5665c2c99",
"name": "MFCC Feature Extraction",
"python_path": "d3m.primitives.feature_extraction.signal_mfcc.SignalMFCC",
"python_path": "d3m.primitives.feature_extraction.signal_mfcc.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -224,7 +224,7 @@
"primitive": {
"id": "2a6f820a-3943-4bb7-a580-689a91c338f3",
"name": "Uniform Segmentation",
"python_path": "d3m.primitives.time_series_segmentation.uniform_segmentation.UniformSegmentation",
"python_path": "d3m.primitives.time_series_segmentation.uniform_segmentation.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -250,7 +250,7 @@
"primitive": {
"id": "7c1d88a3-2388-4ba8-97c6-aa0aa2673024",
"name": "Segment Curve Fitter",
"python_path": "d3m.primitives.data_transformation.segment_curve_fitter.SegmentCurveFitter",
"python_path": "d3m.primitives.data_transformation.segment_curve_fitter.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -284,7 +284,7 @@
"primitive": {
"id": "b358a1fd-8bf8-4991-935f-2f1806dae54d",
"name": "Clustering for Curve Fitting",
"python_path": "d3m.primitives.clustering.cluster_curve_fitting_kmeans.ClusterCurveFittingKMeans",
"python_path": "d3m.primitives.clustering.cluster_curve_fitting_kmeans.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -318,7 +318,7 @@
"primitive": {
"id": "4d7160ef-ca70-4150-b513-36b90817ba45",
"name": "Signal Framing",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.SignalFramer",
"python_path": "d3m.primitives.time_series_segmentation.signal_framer.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -338,7 +338,7 @@
"primitive": {
"id": "bdcceba0-b6bd-4611-92de-225e3353f07d",
"name": "Sequence to Bag-of-Tokens transformer",
"python_path": "d3m.primitives.data_transformation.sequence_to_bag_of_tokens.SequenceToBagOfTokens",
"python_path": "d3m.primitives.data_transformation.sequence_to_bag_of_tokens.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -376,7 +376,7 @@
"primitive": {
"id": "fefcb78f-c2f5-4557-a23b-0910b2127769",
"name": "Tfidf Transformer",
"python_path": "d3m.primitives.feature_extraction.tfidf_vectorizer.BBNTfidfTransformer",
"python_path": "d3m.primitives.feature_extraction.tfidf_vectorizer.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......@@ -481,7 +481,7 @@
"primitive": {
"id": "cdb18166-e2ca-4418-b5a4-fffbe98f7844",
"name": "BBN MLP Classifier",
"python_path": "d3m.primitives.classification.mlp.BBNMLPClassifier",
"python_path": "d3m.primitives.classification.mlp.BBN",
"version": "0.1.4"
},
"type": "PRIMITIVE"
......
{
"id": "cdb18166-e2ca-4418-b5a4-fffbe98f7844",
"version": "0.1.4",
"name": "BBN MLP Classifier",
"description": "BBN D3M BBN MLP Classifier Primitive is wrapper of sklearn MLPClassfier.\n\nArguments:\nInput: dataframe\nOutput: dataframe\n\nAttributes\n----------\nmetadata : PrimitiveMetadata\n Primitive's metadata. Available as a class attribute.\nlogger : Logger\n Primitive's logger. Available as a class attribute.\nhyperparams : Hyperparams\n Hyperparams passed to the constructor.\nrandom_seed : int\n Random seed passed to the constructor.\ndocker_containers : Dict[str, DockerContainer]\n A dict mapping Docker image keys from primitive's metadata to (named) tuples containing\n container's address under which the container is accessible by the primitive, and a\n dict mapping exposed ports to ports on that address.\nvolumes : Dict[str, str]\n A dict mapping volume keys from primitive's metadata to file and directory paths\n where downloaded and extracted files are available to the primitive.\ntemporary_directory : str\n An absolute path to a temporary directory a primitive can use to store any files\n for the duration of the current pipeline run phase. Directory is automatically\n cleaned up after the current pipeline run phase finishes.",
"keywords": [],
"source": {
"name": "BBN",
"contact": "mailto:prasannakumar.muthukumar@raytheon.com",
"uris": [
"https://github.com/BBN-E/d3m-bbn-primitives/blob/029fc54554c43d7462f79279c655e525603800b9/bbn_primitives/sklearn_wrap/mlp_classifier.py",
"https://github.com/BBN-E/d3m-bbn-primitives.git"
]
},
"installation": [
{
"type": "PIP",
"package_uri": "git+https://github.com/BBN-E/d3m-bbn-primitives.git@029fc54554c43d7462f79279c655e525603800b9#egg=bbn_primitives"
}
],
"python_path": "d3m.primitives.classification.mlp.BBN",
"algorithm_types": [
"MODULAR_NEURAL_NETWORK"
],
"primitive_family": "CLASSIFICATION",
"schema": "https://metadata.datadrivendiscovery.org/schemas/v0/primitive.json",
"original_python_path": "bbn_primitives.sklearn_wrap.mlp_classifier.BBNMLPClassifier",
"primitive_code": {
"class_type_arguments": {
"Inputs": "d3m.container.pandas.DataFrame",
"Outputs": "d3m.container.pandas.DataFrame",
"Params": "bbn_primitives.sklearn_wrap.mlp_classifier.Params",
"Hyperparams": "bbn_primitives.sklearn_wrap.mlp_classifier.Hyperparams"
},
"interfaces_version": "2019.6.7",
"interfaces": [
"supervised_learning.SupervisedLearnerPrimitiveBase",
"base.PrimitiveBase"
],
"hyperparams": {
"hidden_layer_sizes": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": [
30,
30
],
"structural_type": "d3m.container.list.List",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
]
},
"activation": {
"type": "d3m.metadata.hyperparams.Enumeration",
"default": "relu",
"structural_type": "str",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": "Activation function for the hidden layer.",
"values": [
"identity",
"logistic",
"tanh",
"relu"
]
},
"solver": {
"type": "d3m.metadata.hyperparams.Enumeration",
"default": "adam",
"structural_type": "str",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": "",
"values": [
"lbfgs",
"sgd",
"adam"
]
},
"learning_rate": {
"type": "d3m.metadata.hyperparams.Enumeration",
"default": "constant",
"structural_type": "str",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": "",
"values": [
"constant",
"invscaling",
"adaptive"
]
},
"alpha": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": 0.0001,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": ""
},
"beta_1": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": 0.9,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": ""
},
"beta_2": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": 0.999,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": ""
},
"learning_rate_init": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": 0.001,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
]
},
"tol": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": 0.0001,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
]
},
"max_iter": {
"type": "d3m.metadata.hyperparams.UniformInt",
"default": 200,
"structural_type": "int",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter",
"https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter"
],
"description": "The maximum number of passes over the training data ",
"lower": 1,
"upper": 800,
"lower_inclusive": true,
"upper_inclusive": false
},
"early_stopping": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": false,
"structural_type": "bool",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
]
},
"shuffle": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": true,
"structural_type": "bool",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "Whether or not the training data should be shuffled after each iteration. "
},
"warm_start": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": false,
"structural_type": "bool",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "When set to True, reuse the solution of the previous call to fit as initialization, otherwise, just erase the previous solution. "
},
"epsilon": {
"type": "d3m.metadata.hyperparams.LogUniform",
"default": 1e-08,
"structural_type": "float",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/TuningParameter"
],
"description": "Value for numerical stability in adam. Only used when solver=\u2019adam\u2019",
"lower": 1e-08,
"upper": 0.1,
"lower_inclusive": true,
"upper_inclusive": false
},
"use_columns": {
"type": "d3m.metadata.hyperparams.Set",
"default": [],
"structural_type": "typing.Sequence[int]",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "A set of column indices to force primitive to operate on. If any specified column cannot be parsed, it is skipped.",
"elements": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": -1,
"structural_type": "int",
"semantic_types": []
},
"is_configuration": false,
"min_size": 0
},
"exclude_columns": {
"type": "d3m.metadata.hyperparams.Set",
"default": [],
"structural_type": "typing.Sequence[int]",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "A set of column indices to not operate on. Applicable only if \"use_columns\" is not provided.",
"elements": {
"type": "d3m.metadata.hyperparams.Hyperparameter",
"default": -1,
"structural_type": "int",
"semantic_types": []
},
"is_configuration": false,
"min_size": 0
},
"return_result": {
"type": "d3m.metadata.hyperparams.Enumeration",
"default": "replace",
"structural_type": "str",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "Should parsed columns be appended, should they replace original columns, or should only parsed columns be returned?",
"values": [
"append",
"replace",
"new"
]
},
"use_semantic_types": {
"type": "d3m.metadata.hyperparams.UniformBool",
"default": false,
"structural_type": "bool",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "Controls whether semantic_types metadata will be used for filtering columns in input dataframe."
},
"add_index_columns": {
"type": "d3m.metadata.hyperparams.UniformBool",
"default": true,
"structural_type": "bool",
"semantic_types": [
"https://metadata.datadrivendiscovery.org/types/ControlParameter"
],
"description": "Also include primary index columns if input data has them. Applicable only if \"return_result\" is set to \"new\"."
}
},
"arguments": {
"hyperparams": {
"type": "bbn_primitives.sklearn_wrap.mlp_classifier.Hyperparams",
"kind": "RUNTIME"
},
"random_seed": {
"type": "int",
"kind": "RUNTIME",
"default": 0
},
"docker_containers": {
"type": "typing.Union[NoneType, typing.Dict[str, d3m.primitive_interfaces.base.DockerContainer]]",
"kind": "RUNTIME",
"default": null
},
"timeout": {
"type": "typing.Union[NoneType, float]",
"kind": "RUNTIME",
"default": null
},
"iterations": {
"type": "typing.Union[NoneType, int]",
"kind": "RUNTIME",
"default": null
},
"produce_methods": {
"type": "typing.Sequence[str]",
"kind": "RUNTIME"
},
"inputs": {
"type": "d3m.container.pandas.DataFrame",
"kind": "PIPELINE"
},
"outputs": {
"type": "d3m.container.pandas.DataFrame",
"kind": "PIPELINE"
},
"params": {
"type": "bbn_primitives.sklearn_wrap.mlp_classifier.Params",
"kind": "RUNTIME"
}
},
"class_methods": {
"can_accept": {
"arguments": {
"method_name": {
"type": "str"
},
"arguments": {
"type": "typing.Dict[str, typing.Union[d3m.metadata.base.Metadata, type]]"
},
"hyperparams": {
"type": "bbn_primitives.sklearn_wrap.mlp_classifier.Hyperparams"
}
},
"returns": "typing.Union[NoneType, d3m.metadata.base.DataMetadata]",
"description": "Returns a metadata object describing the output of a call of ``method_name`` method under\n``hyperparams`` with primitive arguments ``arguments``, if such arguments can be accepted by the method.\nOtherwise it returns ``None`` or raises an exception.\n\nDefault implementation checks structural types of ``arguments`` expected arguments' types\nand ignores ``hyperparams``.\n\nBy (re)implementing this method, a primitive can fine-tune which arguments it accepts\nfor its methods which goes beyond just structural type checking. For example, a primitive might\noperate only on images, so it can accept numpy arrays, but only those with semantic type\ncorresponding to an image. Or it might check dimensions of an array to assure it operates\non square matrix.\n\nPrimitive arguments are a superset of method arguments. This method receives primitive arguments and\nnot just method arguments so that it is possible to implement it without a state between calls\nto ``can_accept`` for multiple methods. For example, a call to ``fit`` could during normal execution\ninfluences what a later ``produce`` call outputs. But during ``can_accept`` call we can directly have\naccess to arguments which would have been given to ``fit`` to produce metadata of the ``produce`` call.\n\nNot all primitive arguments have to be provided, only those used by ``fit``, ``set_training_data``,\nand produce methods, and those used by the ``method_name`` method itself.\n\nParameters\n----------\nmethod_name : str\n Name of the method which would be called.\narguments : Dict[str, Union[Metadata, type]]\n A mapping between argument names and their metadata objects (for pipeline arguments) or types (for other).\nhyperparams : Hyperparams\n Hyper-parameters under which the method would be called during regular primitive execution.\n\nReturns\n-------\nDataMetadata\n Metadata object of the method call result, or ``None`` if arguments are not accepted\n by the method."
}
},
"instance_methods": {
"__init__": {
"kind": "OTHER",
"arguments": [
"hyperparams",
"random_seed",
"docker_containers"
],
"returns": "NoneType"
},
"fit": {
"kind": "OTHER",
"arguments": [
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.CallResult[NoneType]",
"description": "Fits primitive using inputs and outputs (if any) using currently set training data.\n\nThe returned value should be a ``CallResult`` object with ``value`` set to ``None``.\n\nIf ``fit`` has already been called in the past on different training data,\nthis method fits it **again from scratch** using currently set training data.\n\nOn the other hand, caller can call ``fit`` multiple times on the same training data\nto continue fitting.\n\nIf ``fit`` fully fits using provided training data, there is no point in making further\ncalls to this method with same training data, and in fact further calls can be noops,\nor a primitive can decide to refit from scratch.\n\nIn the case fitting can continue with same training data (even if it is maybe not reasonable,\nbecause the internal metric primitive is using looks like fitting will be degrading), if ``fit``\nis called again (without setting training data), the primitive has to continue fitting.\n\nCaller can provide ``timeout`` information to guide the length of the fitting process.\nIdeally, a primitive should adapt its fitting process to try to do the best fitting possible\ninside the time allocated. If this is not possible and the primitive reaches the timeout\nbefore fitting, it should raise a ``TimeoutError`` exception to signal that fitting was\nunsuccessful in the given time. The state of the primitive after the exception should be\nas the method call has never happened and primitive should continue to operate normally.\nThe purpose of ``timeout`` is to give opportunity to a primitive to cleanly manage\nits state instead of interrupting execution from outside. Maintaining stable internal state\nshould have precedence over respecting the ``timeout`` (caller can terminate the misbehaving\nprimitive from outside anyway). If a longer ``timeout`` would produce different fitting,\nthen ``CallResult``'s ``has_finished`` should be set to ``False``.\n\nSome primitives have internal fitting iterations (for example, epochs). For those, caller\ncan provide how many of primitive's internal iterations should a primitive do before returning.\nPrimitives should make iterations as small as reasonable. If ``iterations`` is ``None``,\nthen there is no limit on how many iterations the primitive should do and primitive should\nchoose the best amount of iterations on its own (potentially controlled through\nhyper-parameters). If ``iterations`` is a number, a primitive has to do those number of\niterations (even if not reasonable), if possible. ``timeout`` should still be respected\nand potentially less iterations can be done because of that. Primitives with internal\niterations should make ``CallResult`` contain correct values.\n\nFor primitives which do not have internal iterations, any value of ``iterations``\nmeans that they should fit fully, respecting only ``timeout``.\n\nParameters\n----------\ntimeout : float\n A maximum time this primitive should be fitting during this method call, in seconds.\niterations : int\n How many of internal iterations should the primitive do.\n\nReturns\n-------\nCallResult[None]\n A ``CallResult`` with ``None`` value."
},
"fit_multi_produce": {
"kind": "OTHER",
"arguments": [
"produce_methods",
"inputs",
"outputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.MultiCallResult",
"description": "A method calling ``fit`` and after that multiple produce methods at once.\n\nThis method allows primitive author to implement an optimized version of both fitting\nand producing a primitive on same data.\n\nIf any additional method arguments are added to primitive's ``set_training_data`` method\nor produce method(s), or removed from them, they have to be added to or removed from this\nmethod as well. This method should accept an union of all arguments accepted by primitive's\n``set_training_data`` method and produce method(s) and then use them accordingly when\ncomputing results.\n\nThe default implementation of this method just calls first ``set_training_data`` method,\n``fit`` method, and all produce methods listed in ``produce_methods`` in order and is\npotentially inefficient.\n\nParameters\n----------\nproduce_methods : Sequence[str]\n A list of names of produce methods to call.\ninputs : Inputs\n The inputs given to ``set_training_data`` and all produce methods.\noutputs : Outputs\n The outputs given to ``set_training_data``.\ntimeout : float\n A maximum time this primitive should take to both fit the primitive and produce outputs\n for all produce methods listed in ``produce_methods`` argument, in seconds.\niterations : int\n How many of internal iterations should the primitive do for both fitting and producing\n outputs of all produce methods.\n\nReturns\n-------\nMultiCallResult\n A dict of values for each produce method wrapped inside ``MultiCallResult``."
},
"get_params": {
"kind": "OTHER",
"arguments": [],
"returns": "bbn_primitives.sklearn_wrap.mlp_classifier.Params",
"description": "Returns parameters of this primitive.\n\nParameters are all parameters of the primitive which can potentially change during a life-time of\na primitive. Parameters which cannot are passed through constructor.\n\nParameters should include all data which is necessary to create a new instance of this primitive\nbehaving exactly the same as this instance, when the new instance is created by passing the same\nparameters to the class constructor and calling ``set_params``.\n\nNo other arguments to the method are allowed (except for private arguments).\n\nReturns\n-------\nParams\n An instance of parameters."
},
"multi_produce": {
"kind": "OTHER",
"arguments": [
"produce_methods",
"inputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.MultiCallResult",
"description": "A method calling multiple produce methods at once.\n\nWhen a primitive has multiple produce methods it is common that they might compute the\nsame internal results for same inputs but return different representations of those results.\nIf caller is interested in multiple of those representations, calling multiple produce\nmethods might lead to recomputing same internal results multiple times. To address this,\nthis method allows primitive author to implement an optimized version which computes\ninternal results only once for multiple calls of produce methods, but return those different\nrepresentations.\n\nIf any additional method arguments are added to primitive's produce method(s), they have\nto be added to this method as well. This method should accept an union of all arguments\naccepted by primitive's produce method(s) and then use them accordingly when computing\nresults.\n\nThe default implementation of this method just calls all produce methods listed in\n``produce_methods`` in order and is potentially inefficient.\n\nIf primitive should have been fitted before calling this method, but it has not been,\nprimitive should raise a ``PrimitiveNotFittedError`` exception.\n\nParameters\n----------\nproduce_methods : Sequence[str]\n A list of names of produce methods to call.\ninputs : Inputs\n The inputs given to all produce methods.\ntimeout : float\n A maximum time this primitive should take to produce outputs for all produce methods\n listed in ``produce_methods`` argument, in seconds.\niterations : int\n How many of internal iterations should the primitive do.\n\nReturns\n-------\nMultiCallResult\n A dict of values for each produce method wrapped inside ``MultiCallResult``."
},
"produce": {
"kind": "PRODUCE",
"arguments": [
"inputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.CallResult[d3m.container.pandas.DataFrame]",
"singleton": false,
"inputs_across_samples": [],
"description": "Produce primitive's best choice of the output for each of the inputs.\n\nThe output value should be wrapped inside ``CallResult`` object before returning.\n\nIn many cases producing an output is a quick operation in comparison with ``fit``, but not\nall cases are like that. For example, a primitive can start a potentially long optimization\nprocess to compute outputs. ``timeout`` and ``iterations`` can serve as a way for a caller\nto guide the length of this process.\n\nIdeally, a primitive should adapt its call to try to produce the best outputs possible\ninside the time allocated. If this is not possible and the primitive reaches the timeout\nbefore producing outputs, it should raise a ``TimeoutError`` exception to signal that the\ncall was unsuccessful in the given time. The state of the primitive after the exception\nshould be as the method call has never happened and primitive should continue to operate\nnormally. The purpose of ``timeout`` is to give opportunity to a primitive to cleanly\nmanage its state instead of interrupting execution from outside. Maintaining stable internal\nstate should have precedence over respecting the ``timeout`` (caller can terminate the\nmisbehaving primitive from outside anyway). If a longer ``timeout`` would produce\ndifferent outputs, then ``CallResult``'s ``has_finished`` should be set to ``False``.\n\nSome primitives have internal iterations (for example, optimization iterations).\nFor those, caller can provide how many of primitive's internal iterations\nshould a primitive do before returning outputs. Primitives should make iterations as\nsmall as reasonable. If ``iterations`` is ``None``, then there is no limit on\nhow many iterations the primitive should do and primitive should choose the best amount\nof iterations on its own (potentially controlled through hyper-parameters).\nIf ``iterations`` is a number, a primitive has to do those number of iterations,\nif possible. ``timeout`` should still be respected and potentially less iterations\ncan be done because of that. Primitives with internal iterations should make\n``CallResult`` contain correct values.\n\nFor primitives which do not have internal iterations, any value of ``iterations``\nmeans that they should run fully, respecting only ``timeout``.\n\nIf primitive should have been fitted before calling this method, but it has not been,\nprimitive should raise a ``PrimitiveNotFittedError`` exception.\n\nParameters\n----------\ninputs : Inputs\n The inputs of shape [num_inputs, ...].\ntimeout : float\n A maximum time this primitive should take to produce outputs during this method call, in seconds.\niterations : int\n How many of internal iterations should the primitive do.\n\nReturns\n-------\nCallResult[Outputs]\n The outputs of shape [num_inputs, ...] wrapped inside ``CallResult``."
},
"set_params": {
"kind": "OTHER",
"arguments": [
"params"
],
"returns": "NoneType",
"description": "Sets parameters of this primitive.\n\nParameters are all parameters of the primitive which can potentially change during a life-time of\na primitive. Parameters which cannot are passed through constructor.\n\nNo other arguments to the method are allowed (except for private arguments).\n\nParameters\n----------\nparams : Params\n An instance of parameters."
},
"set_training_data": {
"kind": "OTHER",
"arguments": [
"inputs",
"outputs"
],
"returns": "NoneType",
"description": "Sets training data of this primitive.\n\nStandard sublasses in this package do not adhere to the Liskov substitution principle when\ninheriting this method because they do not necessary accept all arguments found in the base\nclass. This means that one has to inspect which arguments are accepted at runtime, or in\nother words, one has to inspect which exactly subclass a primitive implements, if\nyou are accepting a wider range of primitives. This relaxation is allowed only for\nstandard subclasses found in this package. Primitives themselves should not break\nthe Liskov substitution principle but should inherit from a suitable base class.\n\nParameters\n----------\ninputs : Inputs\n The inputs.\noutputs : Outputs\n The outputs."
}
},
"class_attributes": {
"logger": "logging.Logger",
"metadata": "d3m.metadata.base.PrimitiveMetadata"
},
"instance_attributes": {
"hyperparams": "d3m.metadata.hyperparams.Hyperparams",
"random_seed": "int",
"docker_containers": "typing.Dict[str, d3m.primitive_interfaces.base.DockerContainer]",