repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
apple/turicreate
src/unity/python/turicreate/_gl_pickle.py
GLUnpickler.persistent_load
def persistent_load(self, pid): """ Reconstruct a GLC object using the persistent ID. This method should not be used externally. It is required by the unpickler super class. Parameters ---------- pid : The persistent ID used in pickle file to save the GLC object. ...
python
def persistent_load(self, pid): """ Reconstruct a GLC object using the persistent ID. This method should not be used externally. It is required by the unpickler super class. Parameters ---------- pid : The persistent ID used in pickle file to save the GLC object. ...
[ "def", "persistent_load", "(", "self", ",", "pid", ")", ":", "if", "len", "(", "pid", ")", "==", "2", ":", "# Pre GLC-1.3 release behavior, without memorization", "type_tag", ",", "filename", "=", "pid", "abs_path", "=", "_os", ".", "path", ".", "join", "(",...
Reconstruct a GLC object using the persistent ID. This method should not be used externally. It is required by the unpickler super class. Parameters ---------- pid : The persistent ID used in pickle file to save the GLC object. Returns ---------- The GLC o...
[ "Reconstruct", "a", "GLC", "object", "using", "the", "persistent", "ID", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_gl_pickle.py#L472-L500
train
Reconstruct a GLC object using the persistent ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/_gl_pickle.py
GLUnpickler.close
def close(self): """ Clean up files that were created. """ if self.file: self.file.close() self.file = None # If temp_file is a folder, we do not remove it because we may # still need it after the unpickler is disposed if self.tmp_file and...
python
def close(self): """ Clean up files that were created. """ if self.file: self.file.close() self.file = None # If temp_file is a folder, we do not remove it because we may # still need it after the unpickler is disposed if self.tmp_file and...
[ "def", "close", "(", "self", ")", ":", "if", "self", ".", "file", ":", "self", ".", "file", ".", "close", "(", ")", "self", ".", "file", "=", "None", "# If temp_file is a folder, we do not remove it because we may", "# still need it after the unpickler is disposed", ...
Clean up files that were created.
[ "Clean", "up", "files", "that", "were", "created", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_gl_pickle.py#L502-L514
train
Clean up files that were created.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter.py
convert
def convert(sk_obj, input_features = None, output_feature_names = None): """ Convert scikit-learn pipeline, classifier, or regressor to Core ML format. Parameters ---------- sk_obj: model | [model] of scikit-learn format. Scikit learn model(s) to convert to a Core ML format. ...
python
def convert(sk_obj, input_features = None, output_feature_names = None): """ Convert scikit-learn pipeline, classifier, or regressor to Core ML format. Parameters ---------- sk_obj: model | [model] of scikit-learn format. Scikit learn model(s) to convert to a Core ML format. ...
[ "def", "convert", "(", "sk_obj", ",", "input_features", "=", "None", ",", "output_feature_names", "=", "None", ")", ":", "# This function is just a thin wrapper around the internal converter so", "# that sklearn isn't actually imported unless this function is called", "from", ".", ...
Convert scikit-learn pipeline, classifier, or regressor to Core ML format. Parameters ---------- sk_obj: model | [model] of scikit-learn format. Scikit learn model(s) to convert to a Core ML format. The input model may be a single scikit learn model, a scikit learn pipeline model, ...
[ "Convert", "scikit", "-", "learn", "pipeline", "classifier", "or", "regressor", "to", "Core", "ML", "format", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter.py#L10-L148
train
Convert a single or many scikit - learn model or regressor into a Core ML format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/reflection.py
ParseMessage
def ParseMessage(descriptor, byte_str): """Generate a new Message instance from this Descriptor and a byte string. Args: descriptor: Protobuf Descriptor object byte_str: Serialized protocol buffer byte string Returns: Newly created protobuf Message object. """ result_class = MakeClass(descriptor...
python
def ParseMessage(descriptor, byte_str): """Generate a new Message instance from this Descriptor and a byte string. Args: descriptor: Protobuf Descriptor object byte_str: Serialized protocol buffer byte string Returns: Newly created protobuf Message object. """ result_class = MakeClass(descriptor...
[ "def", "ParseMessage", "(", "descriptor", ",", "byte_str", ")", ":", "result_class", "=", "MakeClass", "(", "descriptor", ")", "new_msg", "=", "result_class", "(", ")", "new_msg", ".", "ParseFromString", "(", "byte_str", ")", "return", "new_msg" ]
Generate a new Message instance from this Descriptor and a byte string. Args: descriptor: Protobuf Descriptor object byte_str: Serialized protocol buffer byte string Returns: Newly created protobuf Message object.
[ "Generate", "a", "new", "Message", "instance", "from", "this", "Descriptor", "and", "a", "byte", "string", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/reflection.py#L67-L80
train
Parse a new Message from this Descriptor and a byte string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/reflection.py
MakeClass
def MakeClass(descriptor): """Construct a class object for a protobuf described by descriptor. Composite descriptors are handled by defining the new class as a member of the parent class, recursing as deep as necessary. This is the dynamic equivalent to: class Parent(message.Message): __metaclass__ = Ge...
python
def MakeClass(descriptor): """Construct a class object for a protobuf described by descriptor. Composite descriptors are handled by defining the new class as a member of the parent class, recursing as deep as necessary. This is the dynamic equivalent to: class Parent(message.Message): __metaclass__ = Ge...
[ "def", "MakeClass", "(", "descriptor", ")", ":", "if", "descriptor", "in", "MESSAGE_CLASS_CACHE", ":", "return", "MESSAGE_CLASS_CACHE", "[", "descriptor", "]", "attributes", "=", "{", "}", "for", "name", ",", "nested_type", "in", "descriptor", ".", "nested_types...
Construct a class object for a protobuf described by descriptor. Composite descriptors are handled by defining the new class as a member of the parent class, recursing as deep as necessary. This is the dynamic equivalent to: class Parent(message.Message): __metaclass__ = GeneratedProtocolMessageType D...
[ "Construct", "a", "class", "object", "for", "a", "protobuf", "described", "by", "descriptor", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/reflection.py#L83-L121
train
Constructs a class object for a protobuf described by descriptor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_convert_1bit_array_to_byte_array
def _convert_1bit_array_to_byte_array(arr): """ Convert bit array to byte array. :param arr: list Bits as a list where each element is an integer of 0 or 1 Returns ------- numpy.array 1D numpy array of type uint8 """ # Padding if necessary while len(arr) < 8 or len(...
python
def _convert_1bit_array_to_byte_array(arr): """ Convert bit array to byte array. :param arr: list Bits as a list where each element is an integer of 0 or 1 Returns ------- numpy.array 1D numpy array of type uint8 """ # Padding if necessary while len(arr) < 8 or len(...
[ "def", "_convert_1bit_array_to_byte_array", "(", "arr", ")", ":", "# Padding if necessary", "while", "len", "(", "arr", ")", "<", "8", "or", "len", "(", "arr", ")", "%", "8", ":", "arr", ".", "append", "(", "0", ")", "arr", "=", "_np", ".", "array", ...
Convert bit array to byte array. :param arr: list Bits as a list where each element is an integer of 0 or 1 Returns ------- numpy.array 1D numpy array of type uint8
[ "Convert", "bit", "array", "to", "byte", "array", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L34-L65
train
Convert 1bit array to byte array.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_decompose_bytes_to_bit_arr
def _decompose_bytes_to_bit_arr(arr): """ Unpack bytes to bits :param arr: list Byte Stream, as a list of uint8 values Returns ------- bit_arr: list Decomposed bit stream as a list of 0/1s of length (len(arr) * 8) """ bit_arr = [] for idx in range(len(arr)): ...
python
def _decompose_bytes_to_bit_arr(arr): """ Unpack bytes to bits :param arr: list Byte Stream, as a list of uint8 values Returns ------- bit_arr: list Decomposed bit stream as a list of 0/1s of length (len(arr) * 8) """ bit_arr = [] for idx in range(len(arr)): ...
[ "def", "_decompose_bytes_to_bit_arr", "(", "arr", ")", ":", "bit_arr", "=", "[", "]", "for", "idx", "in", "range", "(", "len", "(", "arr", ")", ")", ":", "for", "i", "in", "reversed", "(", "range", "(", "8", ")", ")", ":", "bit_arr", ".", "append",...
Unpack bytes to bits :param arr: list Byte Stream, as a list of uint8 values Returns ------- bit_arr: list Decomposed bit stream as a list of 0/1s of length (len(arr) * 8)
[ "Unpack", "bytes", "to", "bits" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L77-L93
train
Unpacks a byte stream to a list of bits.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_get_linear_lookup_table_and_weight
def _get_linear_lookup_table_and_weight(nbits, wp): """ Generate a linear lookup table. :param nbits: int Number of bits to represent a quantized weight value :param wp: numpy.array Weight blob to be quantized Returns ------- lookup_table: numpy.array Lookup table ...
python
def _get_linear_lookup_table_and_weight(nbits, wp): """ Generate a linear lookup table. :param nbits: int Number of bits to represent a quantized weight value :param wp: numpy.array Weight blob to be quantized Returns ------- lookup_table: numpy.array Lookup table ...
[ "def", "_get_linear_lookup_table_and_weight", "(", "nbits", ",", "wp", ")", ":", "w", "=", "wp", ".", "reshape", "(", "1", ",", "-", "1", ")", "qw", ",", "scales", ",", "biases", "=", "_quantize_channelwise_linear", "(", "w", ",", "nbits", ",", "axis", ...
Generate a linear lookup table. :param nbits: int Number of bits to represent a quantized weight value :param wp: numpy.array Weight blob to be quantized Returns ------- lookup_table: numpy.array Lookup table of shape (2^nbits, ) qw: numpy.array Decomposed bit ...
[ "Generate", "a", "linear", "lookup", "table", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L96-L117
train
Generates a linear lookup table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_get_kmeans_lookup_table_and_weight
def _get_kmeans_lookup_table_and_weight(nbits, w, init='k-means++', tol=1e-2, n_init=1, rand_seed=0): """ Generate K-Means lookup table given a weight parameter field :param nbits: Number of bits for quantization :param w: Weight as numpy array Returns ------- lut: numpy.a...
python
def _get_kmeans_lookup_table_and_weight(nbits, w, init='k-means++', tol=1e-2, n_init=1, rand_seed=0): """ Generate K-Means lookup table given a weight parameter field :param nbits: Number of bits for quantization :param w: Weight as numpy array Returns ------- lut: numpy.a...
[ "def", "_get_kmeans_lookup_table_and_weight", "(", "nbits", ",", "w", ",", "init", "=", "'k-means++'", ",", "tol", "=", "1e-2", ",", "n_init", "=", "1", ",", "rand_seed", "=", "0", ")", ":", "if", "_HAS_SKLEARN", ":", "from", "sklearn", ".", "cluster", "...
Generate K-Means lookup table given a weight parameter field :param nbits: Number of bits for quantization :param w: Weight as numpy array Returns ------- lut: numpy.array Lookup table, numpy array of shape (1 << nbits, ); wq: numpy.array Quantized weight of ty...
[ "Generate", "K", "-", "Means", "lookup", "table", "given", "a", "weight", "parameter", "field" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L120-L149
train
Generate a K - Means lookup table given a weight parameter field.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_quantize_channelwise_linear
def _quantize_channelwise_linear(weight, nbits, axis=0): """ Linearly quantize weight blob. :param weight: numpy.array Weight to be quantized. :param nbits: int Number of bits per weight element :param axis: int Axis of the weight blob to compute channel-wise quantization,...
python
def _quantize_channelwise_linear(weight, nbits, axis=0): """ Linearly quantize weight blob. :param weight: numpy.array Weight to be quantized. :param nbits: int Number of bits per weight element :param axis: int Axis of the weight blob to compute channel-wise quantization,...
[ "def", "_quantize_channelwise_linear", "(", "weight", ",", "nbits", ",", "axis", "=", "0", ")", ":", "if", "len", "(", "weight", ".", "shape", ")", "==", "1", ":", "# vector situation, treat as 1 channel", "weight", "=", "weight", ".", "reshape", "(", "(", ...
Linearly quantize weight blob. :param weight: numpy.array Weight to be quantized. :param nbits: int Number of bits per weight element :param axis: int Axis of the weight blob to compute channel-wise quantization, can be 0 or 1 Returns ------- quantized_weight: numpy.a...
[ "Linearly", "quantize", "weight", "blob", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L151-L212
train
Linearly quantize a weight blob.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_quantize_wp
def _quantize_wp(wp, nbits, qm, axis=0, **kwargs): """ Quantize the weight blob :param wp: numpy.array Weight parameters :param nbits: int Number of bits :param qm: Quantization mode :param lut_function: (``callable function``) Python callable representing a look...
python
def _quantize_wp(wp, nbits, qm, axis=0, **kwargs): """ Quantize the weight blob :param wp: numpy.array Weight parameters :param nbits: int Number of bits :param qm: Quantization mode :param lut_function: (``callable function``) Python callable representing a look...
[ "def", "_quantize_wp", "(", "wp", ",", "nbits", ",", "qm", ",", "axis", "=", "0", ",", "*", "*", "kwargs", ")", ":", "scale", "=", "bias", "=", "lut", "=", "None", "# Linear Quantization", "if", "qm", "==", "_QUANTIZATION_MODE_LINEAR_QUANTIZATION", ":", ...
Quantize the weight blob :param wp: numpy.array Weight parameters :param nbits: int Number of bits :param qm: Quantization mode :param lut_function: (``callable function``) Python callable representing a look-up table Returns ------- scale: numpy.array ...
[ "Quantize", "the", "weight", "blob" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L215-L266
train
Quantize the weight blob of nbits bits as a single array of nbits.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
_quantize_wp_field
def _quantize_wp_field(wp, nbits, qm, shape, axis=0, **kwargs): """ Quantize WeightParam field in Neural Network Protobuf :param wp: MLModel.NeuralNetwork.WeightParam WeightParam field :param nbits: int Number of bits to be quantized :param qm: str Quantization mode :pa...
python
def _quantize_wp_field(wp, nbits, qm, shape, axis=0, **kwargs): """ Quantize WeightParam field in Neural Network Protobuf :param wp: MLModel.NeuralNetwork.WeightParam WeightParam field :param nbits: int Number of bits to be quantized :param qm: str Quantization mode :pa...
[ "def", "_quantize_wp_field", "(", "wp", ",", "nbits", ",", "qm", ",", "shape", ",", "axis", "=", "0", ",", "*", "*", "kwargs", ")", ":", "# De-quantization", "if", "qm", "==", "_QUANTIZATION_MODE_DEQUANTIZE", ":", "return", "_dequantize_wp", "(", "wp", ","...
Quantize WeightParam field in Neural Network Protobuf :param wp: MLModel.NeuralNetwork.WeightParam WeightParam field :param nbits: int Number of bits to be quantized :param qm: str Quantization mode :param shape: tuple Tensor shape held by wp :param axis: int ...
[ "Quantize", "WeightParam", "field", "in", "Neural", "Network", "Protobuf" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L269-L336
train
Quantize WeightParam field in Neural Network protobuf.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
compare_models
def compare_models(full_precision_model, quantized_model, sample_data): """ Utility function to compare the performance of a full precision vs quantized model :param full_precision_model: MLModel The full precision model with float32 weights :param quantized_model...
python
def compare_models(full_precision_model, quantized_model, sample_data): """ Utility function to compare the performance of a full precision vs quantized model :param full_precision_model: MLModel The full precision model with float32 weights :param quantized_model...
[ "def", "compare_models", "(", "full_precision_model", ",", "quantized_model", ",", "sample_data", ")", ":", "emessage", "=", "(", "\"\"\"\n Invalid sample data provided. Only a list of dictionaries\n containing sample data or path to a folder containing images is\n supported\"\"\"...
Utility function to compare the performance of a full precision vs quantized model :param full_precision_model: MLModel The full precision model with float32 weights :param quantized_model: MLModel Quantized version of the model with quantized weights :param sample_data: str | [dict] ...
[ "Utility", "function", "to", "compare", "the", "performance", "of", "a", "full", "precision", "vs", "quantized", "model" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L829-L874
train
Utility function to compare the performance of a full precision vs a quantized model with a list of sample data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py
quantize_weights
def quantize_weights(full_precision_model, nbits, quantization_mode="linear", sample_data=None, **kwargs): """ Utility function to convert a full precision (float) MLModel to a nbit quantized MLModel (float16). :param f...
python
def quantize_weights(full_precision_model, nbits, quantization_mode="linear", sample_data=None, **kwargs): """ Utility function to convert a full precision (float) MLModel to a nbit quantized MLModel (float16). :param f...
[ "def", "quantize_weights", "(", "full_precision_model", ",", "nbits", ",", "quantization_mode", "=", "\"linear\"", ",", "sample_data", "=", "None", ",", "*", "*", "kwargs", ")", ":", "qmode_mapping", "=", "{", "\"linear\"", ":", "_QUANTIZATION_MODE_LINEAR_QUANTIZATI...
Utility function to convert a full precision (float) MLModel to a nbit quantized MLModel (float16). :param full_precision_model: MLModel Model which will be converted to half precision. Currently conversion for only neural network models is supported. If a pipeline model is passed in th...
[ "Utility", "function", "to", "convert", "a", "full", "precision", "(", "float", ")", "MLModel", "to", "a", "nbit", "quantized", "MLModel", "(", "float16", ")", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/quantization_utils.py#L877-L977
train
Utility function to characterize the weights of a single neural network model in a base - 2 nbit - quantized MLModel.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/item_similarity_recommender.py
create
def create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, nearest_items=None, similarity_type='jaccard', threshold=0.001, only_top_k=64, verbose=True, target_memory_usage = 8*102...
python
def create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, nearest_items=None, similarity_type='jaccard', threshold=0.001, only_top_k=64, verbose=True, target_memory_usage = 8*102...
[ "def", "create", "(", "observation_data", ",", "user_id", "=", "'user_id'", ",", "item_id", "=", "'item_id'", ",", "target", "=", "None", ",", "user_data", "=", "None", ",", "item_data", "=", "None", ",", "nearest_items", "=", "None", ",", "similarity_type",...
Create a recommender that uses item-item similarities based on users in common. Parameters ---------- observation_data : SFrame The dataset to use for training the model. It must contain a column of user ids and a column of item ids. Each row represents an observed interaction b...
[ "Create", "a", "recommender", "that", "uses", "item", "-", "item", "similarities", "based", "on", "users", "in", "common", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/item_similarity_recommender.py#L17-L259
train
Creates a new recommender that uses item - item similarities based on the given observations.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
_get_elementwise_name_from_keras_layer
def _get_elementwise_name_from_keras_layer(keras_layer): """ Get the keras layer name from the activation name. """ if isinstance(keras_layer, _keras.layers.Add): return 'ADD' elif isinstance(keras_layer, _keras.layers.Multiply): return 'MULTIPLY' elif isinstance(keras_layer, _ke...
python
def _get_elementwise_name_from_keras_layer(keras_layer): """ Get the keras layer name from the activation name. """ if isinstance(keras_layer, _keras.layers.Add): return 'ADD' elif isinstance(keras_layer, _keras.layers.Multiply): return 'MULTIPLY' elif isinstance(keras_layer, _ke...
[ "def", "_get_elementwise_name_from_keras_layer", "(", "keras_layer", ")", ":", "if", "isinstance", "(", "keras_layer", ",", "_keras", ".", "layers", ".", "Add", ")", ":", "return", "'ADD'", "elif", "isinstance", "(", "keras_layer", ",", "_keras", ".", "layers", ...
Get the keras layer name from the activation name.
[ "Get", "the", "keras", "layer", "name", "from", "the", "activation", "name", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L76-L117
train
Get the elementwise name from the keras layer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_dense
def convert_dense(builder, layer, input_names, output_names, keras_layer): """ Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and o...
python
def convert_dense(builder, layer, input_names, output_names, keras_layer): """ Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and o...
[ "def", "convert_dense", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", "0", ...
Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "dense", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L137-L165
train
Convert a dense layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_embedding
def convert_embedding(builder, layer, input_names, output_names, keras_layer): """Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and ou...
python
def convert_embedding(builder, layer, input_names, output_names, keras_layer): """Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and ou...
[ "def", "convert_embedding", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", "...
Convert a dense layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "dense", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L167-L192
train
Convert a dense layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_activation
def convert_activation(builder, layer, input_names, output_names, keras_layer): """ Convert an activation layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get ...
python
def convert_activation(builder, layer, input_names, output_names, keras_layer): """ Convert an activation layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get ...
[ "def", "convert_activation", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", ...
Convert an activation layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "an", "activation", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L194-L267
train
Convert an activation layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_advanced_relu
def convert_advanced_relu(builder, layer, input_names, output_names, keras_layer): """ Convert an ReLU layer with maximum value from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. ...
python
def convert_advanced_relu(builder, layer, input_names, output_names, keras_layer): """ Convert an ReLU layer with maximum value from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. ...
[ "def", "convert_advanced_relu", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[",...
Convert an ReLU layer with maximum value from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "an", "ReLU", "layer", "with", "maximum", "value", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L269-L302
train
Convert an advanced RELU layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_convolution
def convert_convolution(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check...
python
def convert_convolution(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check...
[ "def", "convert_convolution", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names",...
Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "convolution", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L304-L383
train
Convert a convolution layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_convolution1d
def convert_convolution1d(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get...
python
def convert_convolution1d(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get...
[ "def", "convert_convolution1d", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[",...
Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "convolution", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L386-L449
train
Convert a convolution layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_separable_convolution
def convert_separable_convolution(builder, layer, input_names, output_names, keras_layer): """ Convert separable convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object....
python
def convert_separable_convolution(builder, layer, input_names, output_names, keras_layer): """ Convert separable convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object....
[ "def", "convert_separable_convolution", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "inp...
Convert separable convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "separable", "convolution", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L451-L529
train
Convert a separable convolution layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_batchnorm
def convert_batchnorm(builder, layer, input_names, output_names, keras_layer): """ Convert a Batch Normalization layer. Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and output names i...
python
def convert_batchnorm(builder, layer, input_names, output_names, keras_layer): """ Convert a Batch Normalization layer. Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and output names i...
[ "def", "convert_batchnorm", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", "...
Convert a Batch Normalization layer. Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "Batch", "Normalization", "layer", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L531-L581
train
Convert a Batch Normalization layer from keras to Neural Network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_flatten
def convert_flatten(builder, layer, input_names, output_names, keras_layer): """ Convert a flatten layer from keras to coreml. ---------- Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ input_name, ou...
python
def convert_flatten(builder, layer, input_names, output_names, keras_layer): """ Convert a flatten layer from keras to coreml. ---------- Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ input_name, ou...
[ "def", "convert_flatten", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", "0", "]", ")", "# blob_order ==...
Convert a flatten layer from keras to coreml. ---------- Parameters keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "flatten", "layer", "from", "keras", "to", "coreml", ".", "----------", "Parameters", "keras_layer", ":", "layer", "A", "keras", "layer", "object", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L584-L619
train
Convert a flatten layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_merge
def convert_merge(builder, layer, input_names, output_names, keras_layer): """ Convert concat layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and ou...
python
def convert_merge(builder, layer, input_names, output_names, keras_layer): """ Convert concat layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get input and ou...
[ "def", "convert_merge", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "output_name", "=", "output_names", "[", "0", "]", "mode", "=", "_get_elementwise_name_from_keras_layer", "(", ...
Convert concat layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "concat", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L621-L638
train
Convert concat layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_pooling
def convert_pooling(builder, layer, input_names, output_names, keras_layer): """ Convert pooling layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check_data_for...
python
def convert_pooling(builder, layer, input_names, output_names, keras_layer): """ Convert pooling layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check_data_for...
[ "def", "convert_pooling", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "...
Convert pooling layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "pooling", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L640-L729
train
Convert a pooling layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_padding
def convert_padding(builder, layer, input_names, output_names, keras_layer): """ Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural n...
python
def convert_padding(builder, layer, input_names, output_names, keras_layer): """ Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural n...
[ "def", "convert_padding", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", "...
Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "padding", "layer", "from", "keras", "to", "coreml", ".", "Keras", "only", "supports", "zero", "padding", "at", "this", "time", ".", "Parameters", "----------", "keras_layer", ":", "layer", "A", "keras", "layer", "object", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L731-L782
train
Convert a padding layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_cropping
def convert_cropping(builder, layer, input_names, output_names, keras_layer): """ Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural ...
python
def convert_cropping(builder, layer, input_names, output_names, keras_layer): """ Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural ...
[ "def", "convert_cropping", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", ...
Convert padding layer from keras to coreml. Keras only supports zero padding at this time. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "padding", "layer", "from", "keras", "to", "coreml", ".", "Keras", "only", "supports", "zero", "padding", "at", "this", "time", ".", "Parameters", "----------", "keras_layer", ":", "layer", "A", "keras", "layer", "object", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L784-L835
train
Convert a cropping layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_upsample
def convert_upsample(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check_dat...
python
def convert_upsample(builder, layer, input_names, output_names, keras_layer): """ Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ _check_dat...
[ "def", "convert_upsample", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "_check_data_format", "(", "keras_layer", ")", "# Get input and output names", "input_name", ",", "output_name", "=", "(", "input_names", ...
Convert convolution layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "convolution", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L837-L880
train
Convert a upsample layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_permute
def convert_permute(builder, layer, input_names, output_names, keras_layer): """ Convert a softmax layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ input_name, o...
python
def convert_permute(builder, layer, input_names, output_names, keras_layer): """ Convert a softmax layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ input_name, o...
[ "def", "convert_permute", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "input_name", ",", "output_name", "=", "(", "input_names", "[", "0", "]", ",", "output_names", "[", "0", "]", ")", "keras_dims", ...
Convert a softmax layer from keras to coreml. Parameters keras_layer: layer ---------- A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "softmax", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L882-L916
train
Convert a permute layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_simple_rnn
def convert_simple_rnn(builder, layer, input_names, output_names, keras_layer): """ Convert an SimpleRNN layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get i...
python
def convert_simple_rnn(builder, layer, input_names, output_names, keras_layer): """ Convert an SimpleRNN layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ # Get i...
[ "def", "convert_simple_rnn", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "# Get input and output names", "hidden_size", "=", "keras_layer", ".", "units", "input_size", "=", "keras_layer", ".", "input_shape", "...
Convert an SimpleRNN layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "an", "SimpleRNN", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L951-L995
train
Convert a SimpleRNN layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_lstm
def convert_lstm(builder, layer, input_names, output_names, keras_layer): """ Convert an LSTM layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ hidden_size = ker...
python
def convert_lstm(builder, layer, input_names, output_names, keras_layer): """ Convert an LSTM layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ hidden_size = ker...
[ "def", "convert_lstm", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "hidden_size", "=", "keras_layer", ".", "units", "input_size", "=", "keras_layer", ".", "input_shape", "[", "-", "1", "]", "output_all",...
Convert an LSTM layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "an", "LSTM", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L997-L1055
train
Convert an LSTM layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_gru
def convert_gru(builder, layer, input_names, output_names, keras_layer): """ Convert a GRU layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ hidden_size = keras_...
python
def convert_gru(builder, layer, input_names, output_names, keras_layer): """ Convert a GRU layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object. """ hidden_size = keras_...
[ "def", "convert_gru", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "hidden_size", "=", "keras_layer", ".", "units", "input_size", "=", "keras_layer", ".", "input_shape", "[", "-", "1", "]", "output_all", ...
Convert a GRU layer from keras to coreml. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "GRU", "layer", "from", "keras", "to", "coreml", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L1057-L1112
train
Convert a GRU layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py
convert_bidirectional
def convert_bidirectional(builder, layer, input_names, output_names, keras_layer): """ Convert a bidirectional layer from keras to coreml. Currently assumes the units are LSTMs. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A n...
python
def convert_bidirectional(builder, layer, input_names, output_names, keras_layer): """ Convert a bidirectional layer from keras to coreml. Currently assumes the units are LSTMs. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A n...
[ "def", "convert_bidirectional", "(", "builder", ",", "layer", ",", "input_names", ",", "output_names", ",", "keras_layer", ")", ":", "input_size", "=", "keras_layer", ".", "input_shape", "[", "-", "1", "]", "lstm_layer", "=", "keras_layer", ".", "forward_layer",...
Convert a bidirectional layer from keras to coreml. Currently assumes the units are LSTMs. Parameters ---------- keras_layer: layer A keras layer object. builder: NeuralNetworkBuilder A neural network builder object.
[ "Convert", "a", "bidirectional", "layer", "from", "keras", "to", "coreml", ".", "Currently", "assumes", "the", "units", "are", "LSTMs", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_layers2.py#L1114-L1232
train
Convert a bidirectional layer from keras to coreml.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/decompiler/simple_instructions.py
SimpleInstructions.SLICE_0
def SLICE_0(self, instr): 'obj[:]' value = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=None, step=None, upper=None, **kw) subscr = _ast.Subscript(value=value, slice=slice, ctx=_ast.Load(), **kw) self.ast_stack.append(subscr...
python
def SLICE_0(self, instr): 'obj[:]' value = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=None, step=None, upper=None, **kw) subscr = _ast.Subscript(value=value, slice=slice, ctx=_ast.Load(), **kw) self.ast_stack.append(subscr...
[ "def", "SLICE_0", "(", "self", ",", "instr", ")", ":", "value", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "kw", "=", "dict", "(", "lineno", "=", "instr", ".", "lineno", ",", "col_offset", "=", "0", ")", "slice", "=", "_ast", ".", "Slic...
obj[:]
[ "obj", "[", ":", "]" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/simple_instructions.py#L723-L731
train
Slice instruction.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/decompiler/simple_instructions.py
SimpleInstructions.STORE_SLICE_1
def STORE_SLICE_1(self, instr): 'obj[lower:] = expr' lower = self.ast_stack.pop() value = self.ast_stack.pop() expr = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=lower, step=None, upper=None, **kw) subscr = _ast.Subs...
python
def STORE_SLICE_1(self, instr): 'obj[lower:] = expr' lower = self.ast_stack.pop() value = self.ast_stack.pop() expr = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=lower, step=None, upper=None, **kw) subscr = _ast.Subs...
[ "def", "STORE_SLICE_1", "(", "self", ",", "instr", ")", ":", "lower", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "value", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "expr", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", ...
obj[lower:] = expr
[ "obj", "[", "lower", ":", "]", "=", "expr" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/simple_instructions.py#L802-L813
train
Store_SLICE_1 is an ast. Store_SLICE_1 instruction.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/decompiler/simple_instructions.py
SimpleInstructions.STORE_SLICE_3
def STORE_SLICE_3(self, instr): 'obj[lower:upper] = expr' upper = self.ast_stack.pop() lower = self.ast_stack.pop() value = self.ast_stack.pop() expr = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=lower, step...
python
def STORE_SLICE_3(self, instr): 'obj[lower:upper] = expr' upper = self.ast_stack.pop() lower = self.ast_stack.pop() value = self.ast_stack.pop() expr = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=lower, step...
[ "def", "STORE_SLICE_3", "(", "self", ",", "instr", ")", ":", "upper", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "lower", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "value", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", ...
obj[lower:upper] = expr
[ "obj", "[", "lower", ":", "upper", "]", "=", "expr" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/simple_instructions.py#L829-L849
train
STORE_SLICE_3 - Store a set of keys in the current stack.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/decompiler/simple_instructions.py
SimpleInstructions.DELETE_SLICE_0
def DELETE_SLICE_0(self, instr): 'obj[:] = expr' value = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=None, step=None, upper=None, **kw) subscr = _ast.Subscript(value=value, slice=slice, ctx=_ast.Del(), **kw) delete = _ast.D...
python
def DELETE_SLICE_0(self, instr): 'obj[:] = expr' value = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=None, step=None, upper=None, **kw) subscr = _ast.Subscript(value=value, slice=slice, ctx=_ast.Del(), **kw) delete = _ast.D...
[ "def", "DELETE_SLICE_0", "(", "self", ",", "instr", ")", ":", "value", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "kw", "=", "dict", "(", "lineno", "=", "instr", ".", "lineno", ",", "col_offset", "=", "0", ")", "slice", "=", "_ast", ".", ...
obj[:] = expr
[ "obj", "[", ":", "]", "=", "expr" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/simple_instructions.py#L851-L860
train
Delete SLICE_0 instruction.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/item_content_recommender.py
create
def create(item_data, item_id, observation_data = None, user_id = None, target = None, weights = 'auto', similarity_metrics = 'auto', item_data_transform = 'auto', max_item_neighborhood_size = 64, verbose=True): """Create a content-based recommender...
python
def create(item_data, item_id, observation_data = None, user_id = None, target = None, weights = 'auto', similarity_metrics = 'auto', item_data_transform = 'auto', max_item_neighborhood_size = 64, verbose=True): """Create a content-based recommender...
[ "def", "create", "(", "item_data", ",", "item_id", ",", "observation_data", "=", "None", ",", "user_id", "=", "None", ",", "target", "=", "None", ",", "weights", "=", "'auto'", ",", "similarity_metrics", "=", "'auto'", ",", "item_data_transform", "=", "'auto...
Create a content-based recommender model in which the similarity between the items recommended is determined by the content of those items rather than learned from user interaction data. The similarity score between two items is calculated by first computing the similarity between the item data for eac...
[ "Create", "a", "content", "-", "based", "recommender", "model", "in", "which", "the", "similarity", "between", "the", "items", "recommended", "is", "determined", "by", "the", "content", "of", "those", "items", "rather", "than", "learned", "from", "user", "inte...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/item_content_recommender.py#L20-L255
train
Create a content - based recommender model for the items in the item_data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py
lhs
def lhs(node): ''' Return a set of symbols in `node` that are assigned. :param node: ast node :returns: set of strings. ''' gen = ConditionalSymbolVisitor() if isinstance(node, (list, tuple)): gen.visit_list(node) else: gen.visit(node) return gen.lhs
python
def lhs(node): ''' Return a set of symbols in `node` that are assigned. :param node: ast node :returns: set of strings. ''' gen = ConditionalSymbolVisitor() if isinstance(node, (list, tuple)): gen.visit_list(node) else: gen.visit(node) return gen.lhs
[ "def", "lhs", "(", "node", ")", ":", "gen", "=", "ConditionalSymbolVisitor", "(", ")", "if", "isinstance", "(", "node", ",", "(", "list", ",", "tuple", ")", ")", ":", "gen", ".", "visit_list", "(", "node", ")", "else", ":", "gen", ".", "visit", "("...
Return a set of symbols in `node` that are assigned. :param node: ast node :returns: set of strings.
[ "Return", "a", "set", "of", "symbols", "in", "node", "that", "are", "assigned", ".", ":", "param", "node", ":", "ast", "node", ":", "returns", ":", "set", "of", "strings", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py#L363-L377
train
Return a set of symbols in node that are assigned.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py
conditional_lhs
def conditional_lhs(node): ''' Group outputs into conditional and stable :param node: ast node :returns: tuple of (conditional, stable) ''' gen = ConditionalSymbolVisitor() gen.visit(node) return gen.cond_lhs, gen.stable_lhs
python
def conditional_lhs(node): ''' Group outputs into conditional and stable :param node: ast node :returns: tuple of (conditional, stable) ''' gen = ConditionalSymbolVisitor() gen.visit(node) return gen.cond_lhs, gen.stable_lhs
[ "def", "conditional_lhs", "(", "node", ")", ":", "gen", "=", "ConditionalSymbolVisitor", "(", ")", "gen", ".", "visit", "(", "node", ")", "return", "gen", ".", "cond_lhs", ",", "gen", ".", "stable_lhs" ]
Group outputs into conditional and stable :param node: ast node :returns: tuple of (conditional, stable)
[ "Group", "outputs", "into", "conditional", "and", "stable", ":", "param", "node", ":", "ast", "node", ":", "returns", ":", "tuple", "of", "(", "conditional", "stable", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py#L395-L406
train
Group outputs into conditional and stable
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py
conditional_symbols
def conditional_symbols(node): ''' Group lhs and rhs into conditional, stable and undefined :param node: ast node :returns: tuple of (conditional_lhs, stable_lhs),(conditional_rhs, stable_rhs), undefined ''' gen = ConditionalSymbolVisitor() gen.visit(node) lhs = gen.cond_lhs,...
python
def conditional_symbols(node): ''' Group lhs and rhs into conditional, stable and undefined :param node: ast node :returns: tuple of (conditional_lhs, stable_lhs),(conditional_rhs, stable_rhs), undefined ''' gen = ConditionalSymbolVisitor() gen.visit(node) lhs = gen.cond_lhs,...
[ "def", "conditional_symbols", "(", "node", ")", ":", "gen", "=", "ConditionalSymbolVisitor", "(", ")", "gen", ".", "visit", "(", "node", ")", "lhs", "=", "gen", ".", "cond_lhs", ",", "gen", ".", "stable_lhs", "rhs", "=", "gen", ".", "cond_rhs", ",", "g...
Group lhs and rhs into conditional, stable and undefined :param node: ast node :returns: tuple of (conditional_lhs, stable_lhs),(conditional_rhs, stable_rhs), undefined
[ "Group", "lhs", "and", "rhs", "into", "conditional", "stable", "and", "undefined", ":", "param", "node", ":", "ast", "node", ":", "returns", ":", "tuple", "of", "(", "conditional_lhs", "stable_lhs", ")", "(", "conditional_rhs", "stable_rhs", ")", "undefined" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/asttools/visitors/cond_symbol_visitor.py#L409-L423
train
Group lhs rhs into conditional stable and undefined
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
_loadlib
def _loadlib(lib='standard'): """Load rabit library.""" global _LIB if _LIB is not None: warnings.warn('rabit.int call was ignored because it has'\ ' already been initialized', level=2) return if lib == 'standard': _LIB = ctypes.cdll.LoadLibrary(WRAPPER_...
python
def _loadlib(lib='standard'): """Load rabit library.""" global _LIB if _LIB is not None: warnings.warn('rabit.int call was ignored because it has'\ ' already been initialized', level=2) return if lib == 'standard': _LIB = ctypes.cdll.LoadLibrary(WRAPPER_...
[ "def", "_loadlib", "(", "lib", "=", "'standard'", ")", ":", "global", "_LIB", "if", "_LIB", "is", "not", "None", ":", "warnings", ".", "warn", "(", "'rabit.int call was ignored because it has'", "' already been initialized'", ",", "level", "=", "2", ")", "return...
Load rabit library.
[ "Load", "rabit", "library", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L25-L42
train
Load the rabit library.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
init
def init(args=None, lib='standard'): """Intialize the rabit module, call this once before using anything. Parameters ---------- args: list of str, optional The list of arguments used to initialized the rabit usually you need to pass in sys.argv. Defaults to sys.argv when it is N...
python
def init(args=None, lib='standard'): """Intialize the rabit module, call this once before using anything. Parameters ---------- args: list of str, optional The list of arguments used to initialized the rabit usually you need to pass in sys.argv. Defaults to sys.argv when it is N...
[ "def", "init", "(", "args", "=", "None", ",", "lib", "=", "'standard'", ")", ":", "if", "args", "is", "None", ":", "args", "=", "sys", ".", "argv", "_loadlib", "(", "lib", ")", "arr", "=", "(", "ctypes", ".", "c_char_p", "*", "len", "(", "args", ...
Intialize the rabit module, call this once before using anything. Parameters ---------- args: list of str, optional The list of arguments used to initialized the rabit usually you need to pass in sys.argv. Defaults to sys.argv when it is None. lib: {'standard', 'mock', 'mpi'} ...
[ "Intialize", "the", "rabit", "module", "call", "this", "once", "before", "using", "anything", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L56-L73
train
Intialize the rabit module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
tracker_print
def tracker_print(msg): """Print message to the tracker. This function can be used to communicate the information of the progress to the tracker Parameters ---------- msg : str The message to be printed to tracker. """ if not isinstance(msg, str): msg = str(msg) _LI...
python
def tracker_print(msg): """Print message to the tracker. This function can be used to communicate the information of the progress to the tracker Parameters ---------- msg : str The message to be printed to tracker. """ if not isinstance(msg, str): msg = str(msg) _LI...
[ "def", "tracker_print", "(", "msg", ")", ":", "if", "not", "isinstance", "(", "msg", ",", "str", ")", ":", "msg", "=", "str", "(", "msg", ")", "_LIB", ".", "RabitTrackerPrint", "(", "ctypes", ".", "c_char_p", "(", "msg", ")", ".", "encode", "(", "'...
Print message to the tracker. This function can be used to communicate the information of the progress to the tracker Parameters ---------- msg : str The message to be printed to tracker.
[ "Print", "message", "to", "the", "tracker", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L105-L118
train
Print a message to the tracker.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
allreduce
def allreduce(data, op, prepare_fun=None): """Perform allreduce, return the result. Parameters ---------- data: numpy array Input data. op: int Reduction operators, can be MIN, MAX, SUM, BITOR prepare_fun: function Lazy preprocessing function, if it is not None, prepare_...
python
def allreduce(data, op, prepare_fun=None): """Perform allreduce, return the result. Parameters ---------- data: numpy array Input data. op: int Reduction operators, can be MIN, MAX, SUM, BITOR prepare_fun: function Lazy preprocessing function, if it is not None, prepare_...
[ "def", "allreduce", "(", "data", ",", "op", ",", "prepare_fun", "=", "None", ")", ":", "if", "not", "isinstance", "(", "data", ",", "np", ".", "ndarray", ")", ":", "raise", "Exception", "(", "'allreduce only takes in numpy.ndarray'", ")", "buf", "=", "data...
Perform allreduce, return the result. Parameters ---------- data: numpy array Input data. op: int Reduction operators, can be MIN, MAX, SUM, BITOR prepare_fun: function Lazy preprocessing function, if it is not None, prepare_fun(data) will be called by the function b...
[ "Perform", "allreduce", "return", "the", "result", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L183-L226
train
Perform allreduce on the array.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
load_checkpoint
def load_checkpoint(with_local=False): """Load latest check point. Parameters ---------- with_local: bool, optional whether the checkpoint contains local model Returns ------- tuple : tuple if with_local: return (version, gobal_model, local_model) else return (versi...
python
def load_checkpoint(with_local=False): """Load latest check point. Parameters ---------- with_local: bool, optional whether the checkpoint contains local model Returns ------- tuple : tuple if with_local: return (version, gobal_model, local_model) else return (versi...
[ "def", "load_checkpoint", "(", "with_local", "=", "False", ")", ":", "gptr", "=", "ctypes", ".", "POINTER", "(", "ctypes", ".", "c_char", ")", "(", ")", "global_len", "=", "ctypes", ".", "c_ulong", "(", ")", "if", "with_local", ":", "lptr", "=", "ctype...
Load latest check point. Parameters ---------- with_local: bool, optional whether the checkpoint contains local model Returns ------- tuple : tuple if with_local: return (version, gobal_model, local_model) else return (version, gobal_model) if returned version =...
[ "Load", "latest", "check", "point", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L242-L281
train
Load the latest check point.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/xgboost/subtree/rabit/wrapper/rabit.py
checkpoint
def checkpoint(global_model, local_model=None): """Checkpoint the model. This means we finished a stage of execution. Every time we call check point, there is a version number which will increase by one. Parameters ---------- global_model: anytype that can be pickled globally shared mo...
python
def checkpoint(global_model, local_model=None): """Checkpoint the model. This means we finished a stage of execution. Every time we call check point, there is a version number which will increase by one. Parameters ---------- global_model: anytype that can be pickled globally shared mo...
[ "def", "checkpoint", "(", "global_model", ",", "local_model", "=", "None", ")", ":", "sglobal", "=", "pickle", ".", "dumps", "(", "global_model", ")", "if", "local_model", "is", "None", ":", "_LIB", ".", "RabitCheckPoint", "(", "sglobal", ",", "len", "(", ...
Checkpoint the model. This means we finished a stage of execution. Every time we call check point, there is a version number which will increase by one. Parameters ---------- global_model: anytype that can be pickled globally shared model/state when calling this function, the calle...
[ "Checkpoint", "the", "model", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L283-L314
train
Checkpoint the model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/object_detector/util/_output_formats.py
stack_annotations
def stack_annotations(annotations_sarray): """ Converts object detection annotations (ground truth or predictions) to stacked format (an `SFrame` where each row is one object instance). Parameters ---------- annotations_sarray: SArray An `SArray` with unstacked predictions, exactly form...
python
def stack_annotations(annotations_sarray): """ Converts object detection annotations (ground truth or predictions) to stacked format (an `SFrame` where each row is one object instance). Parameters ---------- annotations_sarray: SArray An `SArray` with unstacked predictions, exactly form...
[ "def", "stack_annotations", "(", "annotations_sarray", ")", ":", "_raise_error_if_not_sarray", "(", "annotations_sarray", ",", "variable_name", "=", "'annotations_sarray'", ")", "sf", "=", "_tc", ".", "SFrame", "(", "{", "'annotations'", ":", "annotations_sarray", "}"...
Converts object detection annotations (ground truth or predictions) to stacked format (an `SFrame` where each row is one object instance). Parameters ---------- annotations_sarray: SArray An `SArray` with unstacked predictions, exactly formatted as the annotations column when training a...
[ "Converts", "object", "detection", "annotations", "(", "ground", "truth", "or", "predictions", ")", "to", "stacked", "format", "(", "an", "SFrame", "where", "each", "row", "is", "one", "object", "instance", ")", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/util/_output_formats.py#L14-L63
train
Convert an object detection annotations to a stacked SFrame.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/object_detector/util/_output_formats.py
unstack_annotations
def unstack_annotations(annotations_sframe, num_rows=None): """ Converts object detection annotations (ground truth or predictions) to unstacked format (an `SArray` where each element is a list of object instances). Parameters ---------- annotations_sframe: SFrame An `SFrame` with s...
python
def unstack_annotations(annotations_sframe, num_rows=None): """ Converts object detection annotations (ground truth or predictions) to unstacked format (an `SArray` where each element is a list of object instances). Parameters ---------- annotations_sframe: SFrame An `SFrame` with s...
[ "def", "unstack_annotations", "(", "annotations_sframe", ",", "num_rows", "=", "None", ")", ":", "_raise_error_if_not_sframe", "(", "annotations_sframe", ",", "variable_name", "=", "\"annotations_sframe\"", ")", "cols", "=", "[", "'label'", ",", "'type'", ",", "'coo...
Converts object detection annotations (ground truth or predictions) to unstacked format (an `SArray` where each element is a list of object instances). Parameters ---------- annotations_sframe: SFrame An `SFrame` with stacked predictions, produced by the `stack_annotations` function...
[ "Converts", "object", "detection", "annotations", "(", "ground", "truth", "or", "predictions", ")", "to", "unstacked", "format", "(", "an", "SArray", "where", "each", "element", "is", "a", "list", "of", "object", "instances", ")", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/util/_output_formats.py#L66-L148
train
This function converts the annotations in the original dataset to unstacked format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/ranking_factorization_recommender.py
create
def create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, num_factors=32, regularization=1e-9, linear_regularization=1e-9, side_data_factorization=True, ranking_regularization=0.25, ...
python
def create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, num_factors=32, regularization=1e-9, linear_regularization=1e-9, side_data_factorization=True, ranking_regularization=0.25, ...
[ "def", "create", "(", "observation_data", ",", "user_id", "=", "'user_id'", ",", "item_id", "=", "'item_id'", ",", "target", "=", "None", ",", "user_data", "=", "None", ",", "item_data", "=", "None", ",", "num_factors", "=", "32", ",", "regularization", "=...
Create a RankingFactorizationRecommender that learns latent factors for each user and item and uses them to make rating predictions. Parameters ---------- observation_data : SFrame The dataset to use for training the model. It must contain a column of user ids and a column of item ids. ...
[ "Create", "a", "RankingFactorizationRecommender", "that", "learns", "latent", "factors", "for", "each", "user", "and", "item", "and", "uses", "them", "to", "make", "rating", "predictions", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/ranking_factorization_recommender.py#L19-L270
train
Creates a RankingFactorizationRecommender that learns latent factors for each user and item.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/mlmodel/docs/preprocess.py
preprocess
def preprocess(): "splits _sources/reference.rst into separate files" text = open("./_sources/reference.rst", "r").read() os.remove("./_sources/reference.rst") if not os.path.exists("./_sources/reference"): os.makedirs("./_sources/reference") def pairwise(iterable): "s -> (s0, s1)...
python
def preprocess(): "splits _sources/reference.rst into separate files" text = open("./_sources/reference.rst", "r").read() os.remove("./_sources/reference.rst") if not os.path.exists("./_sources/reference"): os.makedirs("./_sources/reference") def pairwise(iterable): "s -> (s0, s1)...
[ "def", "preprocess", "(", ")", ":", "text", "=", "open", "(", "\"./_sources/reference.rst\"", ",", "\"r\"", ")", ".", "read", "(", ")", "os", ".", "remove", "(", "\"./_sources/reference.rst\"", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "\"...
splits _sources/reference.rst into separate files
[ "splits", "_sources", "/", "reference", ".", "rst", "into", "separate", "files" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/mlmodel/docs/preprocess.py#L6-L29
train
splits _sources / reference. rst into separate files
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/wire_format.py
PackTag
def PackTag(field_number, wire_type): """Returns an unsigned 32-bit integer that encodes the field number and wire type information in standard protocol message wire format. Args: field_number: Expected to be an integer in the range [1, 1 << 29) wire_type: One of the WIRETYPE_* constants. """ if not ...
python
def PackTag(field_number, wire_type): """Returns an unsigned 32-bit integer that encodes the field number and wire type information in standard protocol message wire format. Args: field_number: Expected to be an integer in the range [1, 1 << 29) wire_type: One of the WIRETYPE_* constants. """ if not ...
[ "def", "PackTag", "(", "field_number", ",", "wire_type", ")", ":", "if", "not", "0", "<=", "wire_type", "<=", "_WIRETYPE_MAX", ":", "raise", "message", ".", "EncodeError", "(", "'Unknown wire type: %d'", "%", "wire_type", ")", "return", "(", "field_number", "<...
Returns an unsigned 32-bit integer that encodes the field number and wire type information in standard protocol message wire format. Args: field_number: Expected to be an integer in the range [1, 1 << 29) wire_type: One of the WIRETYPE_* constants.
[ "Returns", "an", "unsigned", "32", "-", "bit", "integer", "that", "encodes", "the", "field", "number", "and", "wire", "type", "information", "in", "standard", "protocol", "message", "wire", "format", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/wire_format.py#L80-L90
train
Packs a field number and wire type into a 32 - bit integer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/wire_format.py
_VarUInt64ByteSizeNoTag
def _VarUInt64ByteSizeNoTag(uint64): """Returns the number of bytes required to serialize a single varint using boundary value comparisons. (unrolled loop optimization -WPierce) uint64 must be unsigned. """ if uint64 <= 0x7f: return 1 if uint64 <= 0x3fff: return 2 if uint64 <= 0x1fffff: return 3 if uint...
python
def _VarUInt64ByteSizeNoTag(uint64): """Returns the number of bytes required to serialize a single varint using boundary value comparisons. (unrolled loop optimization -WPierce) uint64 must be unsigned. """ if uint64 <= 0x7f: return 1 if uint64 <= 0x3fff: return 2 if uint64 <= 0x1fffff: return 3 if uint...
[ "def", "_VarUInt64ByteSizeNoTag", "(", "uint64", ")", ":", "if", "uint64", "<=", "0x7f", ":", "return", "1", "if", "uint64", "<=", "0x3fff", ":", "return", "2", "if", "uint64", "<=", "0x1fffff", ":", "return", "3", "if", "uint64", "<=", "0xfffffff", ":",...
Returns the number of bytes required to serialize a single varint using boundary value comparisons. (unrolled loop optimization -WPierce) uint64 must be unsigned.
[ "Returns", "the", "number", "of", "bytes", "required", "to", "serialize", "a", "single", "varint", "using", "boundary", "value", "comparisons", ".", "(", "unrolled", "loop", "optimization", "-", "WPierce", ")", "uint64", "must", "be", "unsigned", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/wire_format.py#L232-L248
train
Returns the number of bytes required to serialize a single varint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/style_transfer/_utils.py
_seconds_as_string
def _seconds_as_string(seconds): """ Returns seconds as a human-friendly string, e.g. '1d 4h 47m 41s' """ TIME_UNITS = [('s', 60), ('m', 60), ('h', 24), ('d', None)] unit_strings = [] cur = max(int(seconds), 1) for suffix, size in TIME_UNITS: if size is not None: cur, res...
python
def _seconds_as_string(seconds): """ Returns seconds as a human-friendly string, e.g. '1d 4h 47m 41s' """ TIME_UNITS = [('s', 60), ('m', 60), ('h', 24), ('d', None)] unit_strings = [] cur = max(int(seconds), 1) for suffix, size in TIME_UNITS: if size is not None: cur, res...
[ "def", "_seconds_as_string", "(", "seconds", ")", ":", "TIME_UNITS", "=", "[", "(", "'s'", ",", "60", ")", ",", "(", "'m'", ",", "60", ")", ",", "(", "'h'", ",", "24", ")", ",", "(", "'d'", ",", "None", ")", "]", "unit_strings", "=", "[", "]", ...
Returns seconds as a human-friendly string, e.g. '1d 4h 47m 41s'
[ "Returns", "seconds", "as", "a", "human", "-", "friendly", "string", "e", ".", "g", ".", "1d", "4h", "47m", "41s" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/style_transfer/_utils.py#L10-L24
train
Returns a string representation of the given number of seconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter_internal.py
_get_converter_module
def _get_converter_module(sk_obj): """ Returns the module holding the conversion functions for a particular model). """ try: cv_idx = _converter_lookup[sk_obj.__class__] except KeyError: raise ValueError( "Transformer '%s' not supported; supported transformers are...
python
def _get_converter_module(sk_obj): """ Returns the module holding the conversion functions for a particular model). """ try: cv_idx = _converter_lookup[sk_obj.__class__] except KeyError: raise ValueError( "Transformer '%s' not supported; supported transformers are...
[ "def", "_get_converter_module", "(", "sk_obj", ")", ":", "try", ":", "cv_idx", "=", "_converter_lookup", "[", "sk_obj", ".", "__class__", "]", "except", "KeyError", ":", "raise", "ValueError", "(", "\"Transformer '%s' not supported; supported transformers are %s.\"", "%...
Returns the module holding the conversion functions for a particular model).
[ "Returns", "the", "module", "holding", "the", "conversion", "functions", "for", "a", "particular", "model", ")", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter_internal.py#L87-L100
train
Returns the module holding the conversion functions for a particular model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter_internal.py
_convert_sklearn_model
def _convert_sklearn_model(input_sk_obj, input_features = None, output_feature_names = None, class_labels = None): """ Converts a generic sklearn pipeline, transformer, classifier, or regressor into an coreML specification. """ if not(HAS_SKLEARN): raise RuntimeErr...
python
def _convert_sklearn_model(input_sk_obj, input_features = None, output_feature_names = None, class_labels = None): """ Converts a generic sklearn pipeline, transformer, classifier, or regressor into an coreML specification. """ if not(HAS_SKLEARN): raise RuntimeErr...
[ "def", "_convert_sklearn_model", "(", "input_sk_obj", ",", "input_features", "=", "None", ",", "output_feature_names", "=", "None", ",", "class_labels", "=", "None", ")", ":", "if", "not", "(", "HAS_SKLEARN", ")", ":", "raise", "RuntimeError", "(", "'scikit-lear...
Converts a generic sklearn pipeline, transformer, classifier, or regressor into an coreML specification.
[ "Converts", "a", "generic", "sklearn", "pipeline", "transformer", "classifier", "or", "regressor", "into", "an", "coreML", "specification", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_converter_internal.py#L109-L324
train
Converts a generic sklearn pipeline transformer classifier or regressor to a coreML specification.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py
TreeEnsembleBase.set_default_prediction_value
def set_default_prediction_value(self, values): """ Set the default prediction value(s). The values given here form the base prediction value that the values at activated leaves are added to. If values is a scalar, then the output of the tree must also be 1 dimensional; otherwi...
python
def set_default_prediction_value(self, values): """ Set the default prediction value(s). The values given here form the base prediction value that the values at activated leaves are added to. If values is a scalar, then the output of the tree must also be 1 dimensional; otherwi...
[ "def", "set_default_prediction_value", "(", "self", ",", "values", ")", ":", "if", "type", "(", "values", ")", "is", "not", "list", ":", "values", "=", "[", "float", "(", "values", ")", "]", "self", ".", "tree_parameters", ".", "numPredictionDimensions", "...
Set the default prediction value(s). The values given here form the base prediction value that the values at activated leaves are added to. If values is a scalar, then the output of the tree must also be 1 dimensional; otherwise, values must be a list with length matching the dimension...
[ "Set", "the", "default", "prediction", "value", "(", "s", ")", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py#L36-L55
train
Sets the default prediction value for the given set of values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py
TreeEnsembleBase.set_post_evaluation_transform
def set_post_evaluation_transform(self, value): r""" Set the post processing transform applied after the prediction value from the tree ensemble. Parameters ---------- value: str A value denoting the transform applied. Possible values are: - "...
python
def set_post_evaluation_transform(self, value): r""" Set the post processing transform applied after the prediction value from the tree ensemble. Parameters ---------- value: str A value denoting the transform applied. Possible values are: - "...
[ "def", "set_post_evaluation_transform", "(", "self", ",", "value", ")", ":", "self", ".", "tree_spec", ".", "postEvaluationTransform", "=", "_TreeEnsemble_pb2", ".", "TreeEnsemblePostEvaluationTransform", ".", "Value", "(", "value", ")" ]
r""" Set the post processing transform applied after the prediction value from the tree ensemble. Parameters ---------- value: str A value denoting the transform applied. Possible values are: - "NoTransform" (default). Do not apply a transform. ...
[ "r", "Set", "the", "post", "processing", "transform", "applied", "after", "the", "prediction", "value", "from", "the", "tree", "ensemble", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py#L57-L97
train
r Sets the post processing transform applied after the prediction value from the tree ensemble.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py
TreeEnsembleBase.add_branch_node
def add_branch_node(self, tree_id, node_id, feature_index, feature_value, branch_mode, true_child_id, false_child_id, relative_hit_rate = None, missing_value_tracks_true_child = False): """ Add a branch node to the tree ensemble. Parameters ---------- tre...
python
def add_branch_node(self, tree_id, node_id, feature_index, feature_value, branch_mode, true_child_id, false_child_id, relative_hit_rate = None, missing_value_tracks_true_child = False): """ Add a branch node to the tree ensemble. Parameters ---------- tre...
[ "def", "add_branch_node", "(", "self", ",", "tree_id", ",", "node_id", ",", "feature_index", ",", "feature_value", ",", "branch_mode", ",", "true_child_id", ",", "false_child_id", ",", "relative_hit_rate", "=", "None", ",", "missing_value_tracks_true_child", "=", "F...
Add a branch node to the tree ensemble. Parameters ---------- tree_id: int ID of the tree to add the node to. node_id: int ID of the node within the tree. feature_index: int Index of the feature in the input being split on. feature_...
[ "Add", "a", "branch", "node", "to", "the", "tree", "ensemble", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py#L99-L186
train
This method adds a branch node to the ensemble.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py
TreeEnsembleBase.add_leaf_node
def add_leaf_node(self, tree_id, node_id, values, relative_hit_rate = None): """ Add a leaf node to the tree ensemble. Parameters ---------- tree_id: int ID of the tree to add the node to. node_id: int ID of the node within the tree. val...
python
def add_leaf_node(self, tree_id, node_id, values, relative_hit_rate = None): """ Add a leaf node to the tree ensemble. Parameters ---------- tree_id: int ID of the tree to add the node to. node_id: int ID of the node within the tree. val...
[ "def", "add_leaf_node", "(", "self", ",", "tree_id", ",", "node_id", ",", "values", ",", "relative_hit_rate", "=", "None", ")", ":", "spec_node", "=", "self", ".", "tree_parameters", ".", "nodes", ".", "add", "(", ")", "spec_node", ".", "treeId", "=", "t...
Add a leaf node to the tree ensemble. Parameters ---------- tree_id: int ID of the tree to add the node to. node_id: int ID of the node within the tree. values: [float | int | list | dict] Value(s) at the leaf node to add to the prediction w...
[ "Add", "a", "leaf", "node", "to", "the", "tree", "ensemble", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/tree_ensemble.py#L188-L235
train
Adds a leaf node to the tree ensemble.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
create
def create (raw_properties = []): """ Creates a new 'PropertySet' instance for the given raw properties, or returns an already existing one. """ assert (is_iterable_typed(raw_properties, property.Property) or is_iterable_typed(raw_properties, basestring)) # FIXME: propagate to caller...
python
def create (raw_properties = []): """ Creates a new 'PropertySet' instance for the given raw properties, or returns an already existing one. """ assert (is_iterable_typed(raw_properties, property.Property) or is_iterable_typed(raw_properties, basestring)) # FIXME: propagate to caller...
[ "def", "create", "(", "raw_properties", "=", "[", "]", ")", ":", "assert", "(", "is_iterable_typed", "(", "raw_properties", ",", "property", ".", "Property", ")", "or", "is_iterable_typed", "(", "raw_properties", ",", "basestring", ")", ")", "# FIXME: propagate ...
Creates a new 'PropertySet' instance for the given raw properties, or returns an already existing one.
[ "Creates", "a", "new", "PropertySet", "instance", "for", "the", "given", "raw", "properties", "or", "returns", "an", "already", "existing", "one", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L36-L61
train
Creates a new PropertySet instance for the given raw properties and returns an existing one.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
create_with_validation
def create_with_validation (raw_properties): """ Creates new 'PropertySet' instances after checking that all properties are valid and converting implicit properties into gristed form. """ assert is_iterable_typed(raw_properties, basestring) properties = [property.create_from_string(s) fo...
python
def create_with_validation (raw_properties): """ Creates new 'PropertySet' instances after checking that all properties are valid and converting implicit properties into gristed form. """ assert is_iterable_typed(raw_properties, basestring) properties = [property.create_from_string(s) fo...
[ "def", "create_with_validation", "(", "raw_properties", ")", ":", "assert", "is_iterable_typed", "(", "raw_properties", ",", "basestring", ")", "properties", "=", "[", "property", ".", "create_from_string", "(", "s", ")", "for", "s", "in", "raw_properties", "]", ...
Creates new 'PropertySet' instances after checking that all properties are valid and converting implicit properties into gristed form.
[ "Creates", "new", "PropertySet", "instances", "after", "checking", "that", "all", "properties", "are", "valid", "and", "converting", "implicit", "properties", "into", "gristed", "form", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L63-L72
train
Creates a new PropertySet instance after checking that all properties are valid and converting implicit properties into gristed form.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
create_from_user_input
def create_from_user_input(raw_properties, jamfile_module, location): """Creates a property-set from the input given by the user, in the context of 'jamfile-module' at 'location'""" assert is_iterable_typed(raw_properties, basestring) assert isinstance(jamfile_module, basestring) assert isinstance(l...
python
def create_from_user_input(raw_properties, jamfile_module, location): """Creates a property-set from the input given by the user, in the context of 'jamfile-module' at 'location'""" assert is_iterable_typed(raw_properties, basestring) assert isinstance(jamfile_module, basestring) assert isinstance(l...
[ "def", "create_from_user_input", "(", "raw_properties", ",", "jamfile_module", ",", "location", ")", ":", "assert", "is_iterable_typed", "(", "raw_properties", ",", "basestring", ")", "assert", "isinstance", "(", "jamfile_module", ",", "basestring", ")", "assert", "...
Creates a property-set from the input given by the user, in the context of 'jamfile-module' at 'location
[ "Creates", "a", "property", "-", "set", "from", "the", "input", "given", "by", "the", "user", "in", "the", "context", "of", "jamfile", "-", "module", "at", "location" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L79-L94
train
Creates a property - set from the input given by the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
refine_from_user_input
def refine_from_user_input(parent_requirements, specification, jamfile_module, location): """Refines requirements with requirements provided by the user. Specially handles "-<property>value" syntax in specification to remove given requirements. - parent-requirements -- prope...
python
def refine_from_user_input(parent_requirements, specification, jamfile_module, location): """Refines requirements with requirements provided by the user. Specially handles "-<property>value" syntax in specification to remove given requirements. - parent-requirements -- prope...
[ "def", "refine_from_user_input", "(", "parent_requirements", ",", "specification", ",", "jamfile_module", ",", "location", ")", ":", "assert", "isinstance", "(", "parent_requirements", ",", "PropertySet", ")", "assert", "is_iterable_typed", "(", "specification", ",", ...
Refines requirements with requirements provided by the user. Specially handles "-<property>value" syntax in specification to remove given requirements. - parent-requirements -- property-set object with requirements to refine - specification -- string list of requirements provided by the use ...
[ "Refines", "requirements", "with", "requirements", "provided", "by", "the", "user", ".", "Specially", "handles", "-", "<property", ">", "value", "syntax", "in", "specification", "to", "remove", "given", "requirements", ".", "-", "parent", "-", "requirements", "-...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L97-L140
train
Refines requirements with requirements provided by the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.base
def base (self): """ Returns properties that are neither incidental nor free. """ result = [p for p in self.lazy_properties if not(p.feature.incidental or p.feature.free)] result.extend(self.base_) return result
python
def base (self): """ Returns properties that are neither incidental nor free. """ result = [p for p in self.lazy_properties if not(p.feature.incidental or p.feature.free)] result.extend(self.base_) return result
[ "def", "base", "(", "self", ")", ":", "result", "=", "[", "p", "for", "p", "in", "self", ".", "lazy_properties", "if", "not", "(", "p", ".", "feature", ".", "incidental", "or", "p", ".", "feature", ".", "free", ")", "]", "result", ".", "extend", ...
Returns properties that are neither incidental nor free.
[ "Returns", "properties", "that", "are", "neither", "incidental", "nor", "free", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L264-L270
train
Returns a list of properties that are neither incidental nor free.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.free
def free (self): """ Returns free properties which are not dependency properties. """ result = [p for p in self.lazy_properties if not p.feature.incidental and p.feature.free] result.extend(self.free_) return result
python
def free (self): """ Returns free properties which are not dependency properties. """ result = [p for p in self.lazy_properties if not p.feature.incidental and p.feature.free] result.extend(self.free_) return result
[ "def", "free", "(", "self", ")", ":", "result", "=", "[", "p", "for", "p", "in", "self", ".", "lazy_properties", "if", "not", "p", ".", "feature", ".", "incidental", "and", "p", ".", "feature", ".", "free", "]", "result", ".", "extend", "(", "self"...
Returns free properties which are not dependency properties.
[ "Returns", "free", "properties", "which", "are", "not", "dependency", "properties", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L272-L278
train
Returns the set of free properties which are not dependency properties.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.dependency
def dependency (self): """ Returns dependency properties. """ result = [p for p in self.lazy_properties if p.feature.dependency] result.extend(self.dependency_) return self.dependency_
python
def dependency (self): """ Returns dependency properties. """ result = [p for p in self.lazy_properties if p.feature.dependency] result.extend(self.dependency_) return self.dependency_
[ "def", "dependency", "(", "self", ")", ":", "result", "=", "[", "p", "for", "p", "in", "self", ".", "lazy_properties", "if", "p", ".", "feature", ".", "dependency", "]", "result", ".", "extend", "(", "self", ".", "dependency_", ")", "return", "self", ...
Returns dependency properties.
[ "Returns", "dependency", "properties", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L283-L288
train
Returns the dependency properties.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.non_dependency
def non_dependency (self): """ Returns properties that are not dependencies. """ result = [p for p in self.lazy_properties if not p.feature.dependency] result.extend(self.non_dependency_) return result
python
def non_dependency (self): """ Returns properties that are not dependencies. """ result = [p for p in self.lazy_properties if not p.feature.dependency] result.extend(self.non_dependency_) return result
[ "def", "non_dependency", "(", "self", ")", ":", "result", "=", "[", "p", "for", "p", "in", "self", ".", "lazy_properties", "if", "not", "p", ".", "feature", ".", "dependency", "]", "result", ".", "extend", "(", "self", ".", "non_dependency_", ")", "ret...
Returns properties that are not dependencies.
[ "Returns", "properties", "that", "are", "not", "dependencies", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L290-L295
train
Returns properties that are not dependencies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.incidental
def incidental (self): """ Returns incidental properties. """ result = [p for p in self.lazy_properties if p.feature.incidental] result.extend(self.incidental_) return result
python
def incidental (self): """ Returns incidental properties. """ result = [p for p in self.lazy_properties if p.feature.incidental] result.extend(self.incidental_) return result
[ "def", "incidental", "(", "self", ")", ":", "result", "=", "[", "p", "for", "p", "in", "self", ".", "lazy_properties", "if", "p", ".", "feature", ".", "incidental", "]", "result", ".", "extend", "(", "self", ".", "incidental_", ")", "return", "result" ...
Returns incidental properties.
[ "Returns", "incidental", "properties", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L307-L312
train
Returns the list of incidental properties.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.refine
def refine (self, requirements): """ Refines this set's properties using the requirements passed as an argument. """ assert isinstance(requirements, PropertySet) if requirements not in self.refined_: r = property.refine(self.all_, requirements.all_) self.refined_...
python
def refine (self, requirements): """ Refines this set's properties using the requirements passed as an argument. """ assert isinstance(requirements, PropertySet) if requirements not in self.refined_: r = property.refine(self.all_, requirements.all_) self.refined_...
[ "def", "refine", "(", "self", ",", "requirements", ")", ":", "assert", "isinstance", "(", "requirements", ",", "PropertySet", ")", "if", "requirements", "not", "in", "self", ".", "refined_", ":", "r", "=", "property", ".", "refine", "(", "self", ".", "al...
Refines this set's properties using the requirements passed as an argument.
[ "Refines", "this", "set", "s", "properties", "using", "the", "requirements", "passed", "as", "an", "argument", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L314-L323
train
Refines this set s properties using the requirements passed as an argument.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.target_path
def target_path (self): """ Computes the target path that should be used for target with these properties. Returns a tuple of - the computed path - if the path is relative to build directory, a value of 'true'. """ if not self.t...
python
def target_path (self): """ Computes the target path that should be used for target with these properties. Returns a tuple of - the computed path - if the path is relative to build directory, a value of 'true'. """ if not self.t...
[ "def", "target_path", "(", "self", ")", ":", "if", "not", "self", ".", "target_path_", ":", "# The <location> feature can be used to explicitly", "# change the location of generated targets", "l", "=", "self", ".", "get", "(", "'<location>'", ")", "if", "l", ":", "c...
Computes the target path that should be used for target with these properties. Returns a tuple of - the computed path - if the path is relative to build directory, a value of 'true'.
[ "Computes", "the", "target", "path", "that", "should", "be", "used", "for", "target", "with", "these", "properties", ".", "Returns", "a", "tuple", "of", "-", "the", "computed", "path", "-", "if", "the", "path", "is", "relative", "to", "build", "directory",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L395-L439
train
Computes the target path that should be used for the target with these properties.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.add
def add (self, ps): """ Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument. """ assert isinstance(ps, PropertySet) if ps not in self.added_: self.added_[ps] = create(self.all_ + ps.all()) ...
python
def add (self, ps): """ Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument. """ assert isinstance(ps, PropertySet) if ps not in self.added_: self.added_[ps] = create(self.all_ + ps.all()) ...
[ "def", "add", "(", "self", ",", "ps", ")", ":", "assert", "isinstance", "(", "ps", ",", "PropertySet", ")", "if", "ps", "not", "in", "self", ".", "added_", ":", "self", ".", "added_", "[", "ps", "]", "=", "create", "(", "self", ".", "all_", "+", ...
Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument.
[ "Creates", "a", "new", "property", "set", "containing", "the", "properties", "in", "this", "one", "plus", "the", "ones", "of", "the", "property", "set", "passed", "as", "argument", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L441-L448
train
Adds the properties in this one plus the ones of the passed property set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.get
def get (self, feature): """ Returns all values of 'feature'. """ if type(feature) == type([]): feature = feature[0] if not isinstance(feature, b2.build.feature.Feature): feature = b2.build.feature.get(feature) assert isinstance(feature, b2.build.feature.F...
python
def get (self, feature): """ Returns all values of 'feature'. """ if type(feature) == type([]): feature = feature[0] if not isinstance(feature, b2.build.feature.Feature): feature = b2.build.feature.get(feature) assert isinstance(feature, b2.build.feature.F...
[ "def", "get", "(", "self", ",", "feature", ")", ":", "if", "type", "(", "feature", ")", "==", "type", "(", "[", "]", ")", ":", "feature", "=", "feature", "[", "0", "]", "if", "not", "isinstance", "(", "feature", ",", "b2", ".", "build", ".", "f...
Returns all values of 'feature'.
[ "Returns", "all", "values", "of", "feature", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L457-L474
train
Returns all values of feature.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/tools/build/src/build/property_set.py
PropertySet.get_properties
def get_properties(self, feature): """Returns all contained properties associated with 'feature'""" if not isinstance(feature, b2.build.feature.Feature): feature = b2.build.feature.get(feature) assert isinstance(feature, b2.build.feature.Feature) result = [] for p in...
python
def get_properties(self, feature): """Returns all contained properties associated with 'feature'""" if not isinstance(feature, b2.build.feature.Feature): feature = b2.build.feature.get(feature) assert isinstance(feature, b2.build.feature.Feature) result = [] for p in...
[ "def", "get_properties", "(", "self", ",", "feature", ")", ":", "if", "not", "isinstance", "(", "feature", ",", "b2", ".", "build", ".", "feature", ".", "Feature", ")", ":", "feature", "=", "b2", ".", "build", ".", "feature", ".", "get", "(", "featur...
Returns all contained properties associated with 'feature
[ "Returns", "all", "contained", "properties", "associated", "with", "feature" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/build/property_set.py#L477-L487
train
Returns all contained properties associated with feature
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_create
def _create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, ranking=True, verbose=True): """ A unified interface for training recommender models. Based on simple characteristics of the data, a type of model is s...
python
def _create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, ranking=True, verbose=True): """ A unified interface for training recommender models. Based on simple characteristics of the data, a type of model is s...
[ "def", "_create", "(", "observation_data", ",", "user_id", "=", "'user_id'", ",", "item_id", "=", "'item_id'", ",", "target", "=", "None", ",", "user_data", "=", "None", ",", "item_data", "=", "None", ",", "ranking", "=", "True", ",", "verbose", "=", "Tr...
A unified interface for training recommender models. Based on simple characteristics of the data, a type of model is selected and trained. The trained model can be used to predict ratings and make recommendations. To use specific options of a desired model, use the ``create`` function of the correspond...
[ "A", "unified", "interface", "for", "training", "recommender", "models", ".", "Based", "on", "simple", "characteristics", "of", "the", "data", "a", "type", "of", "model", "is", "selected", "and", "trained", ".", "The", "trained", "model", "can", "be", "used"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L24-L175
train
Create a new unkown version of the training recommender model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
compare_models
def compare_models(dataset, models, model_names=None, user_sample=1.0, metric='auto', target=None, exclude_known_for_precision_recall=True, make_plot=False, verbose=True, **kwargs): """ Compare the ...
python
def compare_models(dataset, models, model_names=None, user_sample=1.0, metric='auto', target=None, exclude_known_for_precision_recall=True, make_plot=False, verbose=True, **kwargs): """ Compare the ...
[ "def", "compare_models", "(", "dataset", ",", "models", ",", "model_names", "=", "None", ",", "user_sample", "=", "1.0", ",", "metric", "=", "'auto'", ",", "target", "=", "None", ",", "exclude_known_for_precision_recall", "=", "True", ",", "make_plot", "=", ...
Compare the prediction or recommendation performance of recommender models on a common test dataset. Models that are trained to predict ratings are compared separately from models that are trained without target ratings. The ratings prediction models are compared on root-mean-squared error, and the re...
[ "Compare", "the", "prediction", "or", "recommendation", "performance", "of", "recommender", "models", "on", "a", "common", "test", "dataset", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L177-L328
train
Compare the model models with the training data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
precision_recall_by_user
def precision_recall_by_user(observed_user_items, recommendations, cutoffs=[10]): """ Compute precision and recall at a given cutoff for each user. In information retrieval terms, precision represents the ratio of relevant, retrieved items to the...
python
def precision_recall_by_user(observed_user_items, recommendations, cutoffs=[10]): """ Compute precision and recall at a given cutoff for each user. In information retrieval terms, precision represents the ratio of relevant, retrieved items to the...
[ "def", "precision_recall_by_user", "(", "observed_user_items", ",", "recommendations", ",", "cutoffs", "=", "[", "10", "]", ")", ":", "assert", "type", "(", "observed_user_items", ")", "==", "_SFrame", "assert", "type", "(", "recommendations", ")", "==", "_SFram...
Compute precision and recall at a given cutoff for each user. In information retrieval terms, precision represents the ratio of relevant, retrieved items to the number of relevant items. Recall represents the ratio of relevant, retrieved items to the number of relevant items. Let :math:`p_k` be a vecto...
[ "Compute", "precision", "and", "recall", "at", "a", "given", "cutoff", "for", "each", "user", ".", "In", "information", "retrieval", "terms", "precision", "represents", "the", "ratio", "of", "relevant", "retrieved", "items", "to", "the", "number", "of", "relev...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L331-L427
train
Compute precision and recall for each user in the information tree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
random_split_by_user
def random_split_by_user(dataset, user_id='user_id', item_id='item_id', max_num_users=1000, item_test_proportion=.2, random_seed=0): """Create a recommender-friendly train-test split of the p...
python
def random_split_by_user(dataset, user_id='user_id', item_id='item_id', max_num_users=1000, item_test_proportion=.2, random_seed=0): """Create a recommender-friendly train-test split of the p...
[ "def", "random_split_by_user", "(", "dataset", ",", "user_id", "=", "'user_id'", ",", "item_id", "=", "'item_id'", ",", "max_num_users", "=", "1000", ",", "item_test_proportion", "=", ".2", ",", "random_seed", "=", "0", ")", ":", "assert", "user_id", "in", "...
Create a recommender-friendly train-test split of the provided data set. The test dataset is generated by first choosing `max_num_users` out of the total number of users in `dataset`. Then, for each of the chosen test users, a portion of the user's items (determined by `item_test_proportion`) is random...
[ "Create", "a", "recommender", "-", "friendly", "train", "-", "test", "split", "of", "the", "provided", "data", "set", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L430-L508
train
Generates a train - test split of the provided dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._list_fields
def _list_fields(self): """ Get the current settings of the model. The keys depend on the type of model. Returns ------- out : list A list of fields that can be queried using the ``get`` method. """ response = self.__proxy__.list_fields() ...
python
def _list_fields(self): """ Get the current settings of the model. The keys depend on the type of model. Returns ------- out : list A list of fields that can be queried using the ``get`` method. """ response = self.__proxy__.list_fields() ...
[ "def", "_list_fields", "(", "self", ")", ":", "response", "=", "self", ".", "__proxy__", ".", "list_fields", "(", ")", "return", "[", "s", "for", "s", "in", "response", "[", "'value'", "]", "if", "not", "s", ".", "startswith", "(", "\"_\"", ")", "]" ...
Get the current settings of the model. The keys depend on the type of model. Returns ------- out : list A list of fields that can be queried using the ``get`` method.
[ "Get", "the", "current", "settings", "of", "the", "model", ".", "The", "keys", "depend", "on", "the", "type", "of", "model", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L543-L555
train
Returns a list of fields that can be queried using the get method.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._get_summary_struct
def _get_summary_struct(self): """ Returns a structured description of the model, including (where relevant) the schema of the training data, description of the training data, training statistics, and model hyperparameters. Returns ------- sections : list (of lis...
python
def _get_summary_struct(self): """ Returns a structured description of the model, including (where relevant) the schema of the training data, description of the training data, training statistics, and model hyperparameters. Returns ------- sections : list (of lis...
[ "def", "_get_summary_struct", "(", "self", ")", ":", "stats", "=", "self", ".", "_list_fields", "(", ")", "options", "=", "self", ".", "_get_current_options", "(", ")", "section_titles", "=", "[", "]", "sections", "=", "[", "]", "observation_columns", "=", ...
Returns a structured description of the model, including (where relevant) the schema of the training data, description of the training data, training statistics, and model hyperparameters. Returns ------- sections : list (of list of tuples) A list of summary sections...
[ "Returns", "a", "structured", "description", "of", "the", "model", "including", "(", "where", "relevant", ")", "the", "schema", "of", "the", "training", "data", "description", "of", "the", "training", "data", "training", "statistics", "and", "model", "hyperparam...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L634-L782
train
Returns a structured description of the model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._set_current_options
def _set_current_options(self, options): """ Set current options for a model. Parameters ---------- options : dict A dictionary of the desired option settings. The key should be the name of the option and each value is the desired value of the option. ...
python
def _set_current_options(self, options): """ Set current options for a model. Parameters ---------- options : dict A dictionary of the desired option settings. The key should be the name of the option and each value is the desired value of the option. ...
[ "def", "_set_current_options", "(", "self", ",", "options", ")", ":", "opts", "=", "self", ".", "_get_current_options", "(", ")", "opts", ".", "update", "(", "options", ")", "response", "=", "self", ".", "__proxy__", ".", "set_current_options", "(", "opts", ...
Set current options for a model. Parameters ---------- options : dict A dictionary of the desired option settings. The key should be the name of the option and each value is the desired value of the option.
[ "Set", "current", "options", "for", "a", "model", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L804-L818
train
Set the current options for a model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.__prepare_dataset_parameter
def __prepare_dataset_parameter(self, dataset): """ Processes the dataset parameter for type correctness. Returns it as an SFrame. """ # Translate the dataset argument into the proper type if not isinstance(dataset, _SFrame): def raise_dataset_type_exception(...
python
def __prepare_dataset_parameter(self, dataset): """ Processes the dataset parameter for type correctness. Returns it as an SFrame. """ # Translate the dataset argument into the proper type if not isinstance(dataset, _SFrame): def raise_dataset_type_exception(...
[ "def", "__prepare_dataset_parameter", "(", "self", ",", "dataset", ")", ":", "# Translate the dataset argument into the proper type", "if", "not", "isinstance", "(", "dataset", ",", "_SFrame", ")", ":", "def", "raise_dataset_type_exception", "(", ")", ":", "raise", "T...
Processes the dataset parameter for type correctness. Returns it as an SFrame.
[ "Processes", "the", "dataset", "parameter", "for", "type", "correctness", ".", "Returns", "it", "as", "an", "SFrame", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L820-L843
train
Processes the dataset parameter for type correctness.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._get_data_schema
def _get_data_schema(self): """ Returns a dictionary of (column : type) for the data used in the model. """ if not hasattr(self, "_data_schema"): response = self.__proxy__.get_data_schema() self._data_schema = {k : _turicreate._cython.cy_flexible_type.py...
python
def _get_data_schema(self): """ Returns a dictionary of (column : type) for the data used in the model. """ if not hasattr(self, "_data_schema"): response = self.__proxy__.get_data_schema() self._data_schema = {k : _turicreate._cython.cy_flexible_type.py...
[ "def", "_get_data_schema", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "\"_data_schema\"", ")", ":", "response", "=", "self", ".", "__proxy__", ".", "get_data_schema", "(", ")", "self", ".", "_data_schema", "=", "{", "k", ":", "_turi...
Returns a dictionary of (column : type) for the data used in the model.
[ "Returns", "a", "dictionary", "of", "(", "column", ":", "type", ")", "for", "the", "data", "used", "in", "the", "model", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L845-L857
train
Returns a dictionary of column type for the data used in the model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.predict
def predict(self, dataset, new_observation_data=None, new_user_data=None, new_item_data=None): """ Return a score prediction for the user ids and item ids in the provided data set. Parameters ---------- dataset : SFrame Dataset in the same for...
python
def predict(self, dataset, new_observation_data=None, new_user_data=None, new_item_data=None): """ Return a score prediction for the user ids and item ids in the provided data set. Parameters ---------- dataset : SFrame Dataset in the same for...
[ "def", "predict", "(", "self", ",", "dataset", ",", "new_observation_data", "=", "None", ",", "new_user_data", "=", "None", ",", "new_item_data", "=", "None", ")", ":", "if", "new_observation_data", "is", "None", ":", "new_observation_data", "=", "_SFrame", "(...
Return a score prediction for the user ids and item ids in the provided data set. Parameters ---------- dataset : SFrame Dataset in the same form used for training. new_observation_data : SFrame, optional ``new_observation_data`` gives additional observa...
[ "Return", "a", "score", "prediction", "for", "the", "user", "ids", "and", "item", "ids", "in", "the", "provided", "data", "set", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L859-L925
train
Predict the user and item ids of the provided data set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.get_similar_items
def get_similar_items(self, items=None, k=10, verbose=False): """ Get the k most similar items for each item in items. Each type of recommender has its own model for the similarity between items. For example, the item_similarity_recommender will return the most similar items acc...
python
def get_similar_items(self, items=None, k=10, verbose=False): """ Get the k most similar items for each item in items. Each type of recommender has its own model for the similarity between items. For example, the item_similarity_recommender will return the most similar items acc...
[ "def", "get_similar_items", "(", "self", ",", "items", "=", "None", ",", "k", "=", "10", ",", "verbose", "=", "False", ")", ":", "if", "items", "is", "None", ":", "get_all_items", "=", "True", "items", "=", "_SArray", "(", ")", "else", ":", "get_all_...
Get the k most similar items for each item in items. Each type of recommender has its own model for the similarity between items. For example, the item_similarity_recommender will return the most similar items according to the user-chosen similarity; the factorization_recommender will r...
[ "Get", "the", "k", "most", "similar", "items", "for", "each", "item", "in", "items", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L927-L988
train
Returns the k most similar items for each item in items.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.get_similar_users
def get_similar_users(self, users=None, k=10): """Get the k most similar users for each entry in `users`. Each type of recommender has its own model for the similarity between users. For example, the factorization_recommender will return the nearest users based on the cosine similarity ...
python
def get_similar_users(self, users=None, k=10): """Get the k most similar users for each entry in `users`. Each type of recommender has its own model for the similarity between users. For example, the factorization_recommender will return the nearest users based on the cosine similarity ...
[ "def", "get_similar_users", "(", "self", ",", "users", "=", "None", ",", "k", "=", "10", ")", ":", "if", "users", "is", "None", ":", "get_all_users", "=", "True", "users", "=", "_SArray", "(", ")", "else", ":", "get_all_users", "=", "False", "if", "i...
Get the k most similar users for each entry in `users`. Each type of recommender has its own model for the similarity between users. For example, the factorization_recommender will return the nearest users based on the cosine similarity between latent user factors. (This method is not ...
[ "Get", "the", "k", "most", "similar", "users", "for", "each", "entry", "in", "users", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L990-L1053
train
Return the k most similar users for each user in users.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.recommend
def recommend(self, users=None, k=10, exclude=None, items=None, new_observation_data=None, new_user_data=None, new_item_data=None, exclude_known=True, diversity=0, random_seed=None, verbose=True): """ Recommend the ``k`` highest scored items for each...
python
def recommend(self, users=None, k=10, exclude=None, items=None, new_observation_data=None, new_user_data=None, new_item_data=None, exclude_known=True, diversity=0, random_seed=None, verbose=True): """ Recommend the ``k`` highest scored items for each...
[ "def", "recommend", "(", "self", ",", "users", "=", "None", ",", "k", "=", "10", ",", "exclude", "=", "None", ",", "items", "=", "None", ",", "new_observation_data", "=", "None", ",", "new_user_data", "=", "None", ",", "new_item_data", "=", "None", ","...
Recommend the ``k`` highest scored items for each user. Parameters ---------- users : SArray, SFrame, or list, optional Users or observation queries for which to make recommendations. For list, SArray, and single-column inputs, this is simply a set of user I...
[ "Recommend", "the", "k", "highest", "scored", "items", "for", "each", "user", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1056-L1308
train
This method recommends the highest scored items for each user in the set of items.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.recommend_from_interactions
def recommend_from_interactions( self, observed_items, k=10, exclude=None, items=None, new_user_data=None, new_item_data=None, exclude_known=True, diversity=0, random_seed=None, verbose=True): """ Recommend the ``k`` highest scored items based on the ...
python
def recommend_from_interactions( self, observed_items, k=10, exclude=None, items=None, new_user_data=None, new_item_data=None, exclude_known=True, diversity=0, random_seed=None, verbose=True): """ Recommend the ``k`` highest scored items based on the ...
[ "def", "recommend_from_interactions", "(", "self", ",", "observed_items", ",", "k", "=", "10", ",", "exclude", "=", "None", ",", "items", "=", "None", ",", "new_user_data", "=", "None", ",", "new_item_data", "=", "None", ",", "exclude_known", "=", "True", ...
Recommend the ``k`` highest scored items based on the interactions given in `observed_items.` Parameters ---------- observed_items : SArray, SFrame, or list A list/SArray of items to use to make recommendations, or an SFrame of items and optionally ratings and/or...
[ "Recommend", "the", "k", "highest", "scored", "items", "based", "on", "the", "interactions", "given", "in", "observed_items", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1310-L1470
train
This function recommends the most scored items based on the given interactions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.evaluate_precision_recall
def evaluate_precision_recall(self, dataset, cutoffs=list(range(1,11,1))+list(range(11,50,5)), skip_set=None, exclude_known=True, verbose=True, **kwargs): """ Compute a model's precision and recall scores for a particular dataset. ...
python
def evaluate_precision_recall(self, dataset, cutoffs=list(range(1,11,1))+list(range(11,50,5)), skip_set=None, exclude_known=True, verbose=True, **kwargs): """ Compute a model's precision and recall scores for a particular dataset. ...
[ "def", "evaluate_precision_recall", "(", "self", ",", "dataset", ",", "cutoffs", "=", "list", "(", "range", "(", "1", ",", "11", ",", "1", ")", ")", "+", "list", "(", "range", "(", "11", ",", "50", ",", "5", ")", ")", ",", "skip_set", "=", "None"...
Compute a model's precision and recall scores for a particular dataset. Parameters ---------- dataset : SFrame An SFrame in the same format as the one used during training. This will be compared to the model's recommendations, which exclude the (user, item) p...
[ "Compute", "a", "model", "s", "precision", "and", "recall", "scores", "for", "a", "particular", "dataset", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1492-L1574
train
Compute a model s precision and recall scores for a particular dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.evaluate_rmse
def evaluate_rmse(self, dataset, target): """ Evaluate the prediction error for each user-item pair in the given data set. Parameters ---------- dataset : SFrame An SFrame in the same format as the one used during training. target : str T...
python
def evaluate_rmse(self, dataset, target): """ Evaluate the prediction error for each user-item pair in the given data set. Parameters ---------- dataset : SFrame An SFrame in the same format as the one used during training. target : str T...
[ "def", "evaluate_rmse", "(", "self", ",", "dataset", ",", "target", ")", ":", "assert", "target", "in", "dataset", ".", "column_names", "(", ")", ",", "'Provided dataset must contain a target column with the same \\\n name as the target used during training.'", ...
Evaluate the prediction error for each user-item pair in the given data set. Parameters ---------- dataset : SFrame An SFrame in the same format as the one used during training. target : str The name of the target rating column in `dataset`. Ret...
[ "Evaluate", "the", "prediction", "error", "for", "each", "user", "-", "item", "pair", "in", "the", "given", "data", "set", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1576-L1635
train
Evaluate the prediction error for each user - item pair in the given data set and target.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.evaluate
def evaluate(self, dataset, metric='auto', exclude_known_for_precision_recall=True, target=None, verbose=True, **kwargs): r""" Evaluate the model's ability to make rating predictions or recommendations. If the model is trained to predic...
python
def evaluate(self, dataset, metric='auto', exclude_known_for_precision_recall=True, target=None, verbose=True, **kwargs): r""" Evaluate the model's ability to make rating predictions or recommendations. If the model is trained to predic...
[ "def", "evaluate", "(", "self", ",", "dataset", ",", "metric", "=", "'auto'", ",", "exclude_known_for_precision_recall", "=", "True", ",", "target", "=", "None", ",", "verbose", "=", "True", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "dat...
r""" Evaluate the model's ability to make rating predictions or recommendations. If the model is trained to predict a particular target, the default metric used for model comparison is root-mean-squared error (RMSE). Suppose :math:`y` and :math:`\widehat{y}` are vectors of lengt...
[ "r", "Evaluate", "the", "model", "s", "ability", "to", "make", "rating", "predictions", "or", "recommendations", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1637-L1761
train
r Evaluates the model s ability to make rating predictions or recommendations or model comparison.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._get_popularity_baseline
def _get_popularity_baseline(self): """ Returns a new popularity model matching the data set this model was trained with. Can be used for comparison purposes. """ response = self.__proxy__.get_popularity_baseline() from .popularity_recommender import PopularityRecommen...
python
def _get_popularity_baseline(self): """ Returns a new popularity model matching the data set this model was trained with. Can be used for comparison purposes. """ response = self.__proxy__.get_popularity_baseline() from .popularity_recommender import PopularityRecommen...
[ "def", "_get_popularity_baseline", "(", "self", ")", ":", "response", "=", "self", ".", "__proxy__", ".", "get_popularity_baseline", "(", ")", "from", ".", "popularity_recommender", "import", "PopularityRecommender", "return", "PopularityRecommender", "(", "response", ...
Returns a new popularity model matching the data set this model was trained with. Can be used for comparison purposes.
[ "Returns", "a", "new", "popularity", "model", "matching", "the", "data", "set", "this", "model", "was", "trained", "with", ".", "Can", "be", "used", "for", "comparison", "purposes", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1763-L1772
train
Returns a new PopularityRecommender object that is trained with the data set this model was trained with. Can be used for comparison purposes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender._get_item_intersection_info
def _get_item_intersection_info(self, item_pairs): """ For a collection of item -> item pairs, returns information about the users in that intersection. Parameters ---------- item_pairs : 2-column SFrame of two item columns, or a list of (item_1, item_2) tupl...
python
def _get_item_intersection_info(self, item_pairs): """ For a collection of item -> item pairs, returns information about the users in that intersection. Parameters ---------- item_pairs : 2-column SFrame of two item columns, or a list of (item_1, item_2) tupl...
[ "def", "_get_item_intersection_info", "(", "self", ",", "item_pairs", ")", ":", "if", "type", "(", "item_pairs", ")", "is", "list", ":", "if", "not", "all", "(", "type", "(", "t", ")", "in", "[", "list", ",", "tuple", "]", "and", "len", "(", "t", "...
For a collection of item -> item pairs, returns information about the users in that intersection. Parameters ---------- item_pairs : 2-column SFrame of two item columns, or a list of (item_1, item_2) tuples. Returns ------- out : SFrame A ...
[ "For", "a", "collection", "of", "item", "-", ">", "item", "pairs", "returns", "information", "about", "the", "users", "in", "that", "intersection", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1774-L1809
train
Returns information about the items in that intersection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/recommender/util.py
_Recommender.export_coreml
def export_coreml(self, filename): """ Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml('myModel.mlmodel') """ print...
python
def export_coreml(self, filename): """ Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml('myModel.mlmodel') """ print...
[ "def", "export_coreml", "(", "self", ",", "filename", ")", ":", "print", "(", "'This model is exported as a custom Core ML model. In order to use it in your\\n'", "'application, you must also include \"libRecommender.dylib\". For additional\\n'", "'details see:\\n'", "'https://apple.github...
Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml('myModel.mlmodel')
[ "Export", "the", "model", "in", "Core", "ML", "format", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/recommender/util.py#L1811-L1830
train
Export the model in Core ML format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/regression/random_forest_regression.py
RandomForestRegression.evaluate
def evaluate(self, dataset, metric='auto', missing_value_action='auto'): """ Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be ...
python
def evaluate(self, dataset, metric='auto', missing_value_action='auto'): """ Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be ...
[ "def", "evaluate", "(", "self", ",", "dataset", ",", "metric", "=", "'auto'", ",", "missing_value_action", "=", "'auto'", ")", ":", "_raise_error_evaluation_metric_is_valid", "(", "metric", ",", "[", "'auto'", ",", "'rmse'", ",", "'max_error'", "]", ")", "retu...
Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be the same as that used in training. metric : str, optional Name of the ev...
[ "Evaluate", "the", "model", "on", "the", "given", "dataset", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/regression/random_forest_regression.py#L179-L228
train
Evaluate the model on the given dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/unity/python/turicreate/toolkits/regression/random_forest_regression.py
RandomForestRegression.predict
def predict(self, dataset, missing_value_action='auto'): """ Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.random_forest_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters...
python
def predict(self, dataset, missing_value_action='auto'): """ Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.random_forest_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters...
[ "def", "predict", "(", "self", ",", "dataset", ",", "missing_value_action", "=", "'auto'", ")", ":", "return", "super", "(", "RandomForestRegression", ",", "self", ")", ".", "predict", "(", "dataset", ",", "output_type", "=", "'margin'", ",", "missing_value_ac...
Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.random_forest_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters ---------- dataset : SFrame A dataset that has the...
[ "Predict", "the", "target", "column", "of", "the", "given", "dataset", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/regression/random_forest_regression.py#L230-L272
train
Predict the target column of the given dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
src/external/coremltools_wrap/coremltools/coremltools/models/feature_vectorizer.py
create_feature_vectorizer
def create_feature_vectorizer(input_features, output_feature_name, known_size_map = {}): """ Creates a feature vectorizer from input features, return the spec for a feature vectorizer that puts everything into a single array of length equal to the total size of all the inpu...
python
def create_feature_vectorizer(input_features, output_feature_name, known_size_map = {}): """ Creates a feature vectorizer from input features, return the spec for a feature vectorizer that puts everything into a single array of length equal to the total size of all the inpu...
[ "def", "create_feature_vectorizer", "(", "input_features", ",", "output_feature_name", ",", "known_size_map", "=", "{", "}", ")", ":", "spec", "=", "_Model_pb2", ".", "Model", "(", ")", "spec", ".", "specificationVersion", "=", "SPECIFICATION_VERSION", "input_featur...
Creates a feature vectorizer from input features, return the spec for a feature vectorizer that puts everything into a single array of length equal to the total size of all the input features. Returns a 2-tuple `(spec, num_dimension)` Parameters ---------- input_features: [list of 2-tuples] ...
[ "Creates", "a", "feature", "vectorizer", "from", "input", "features", "return", "the", "spec", "for", "a", "feature", "vectorizer", "that", "puts", "everything", "into", "a", "single", "array", "of", "length", "equal", "to", "the", "total", "size", "of", "al...
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/coremltools/models/feature_vectorizer.py#L15-L94
train
Creates a feature vectorizer from input features and outputs the output feature name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
apple/turicreate
deps/src/boost_1_68_0/libs/predef/tools/ci/common.py
utils.query_boost_version
def query_boost_version(boost_root): ''' Read in the Boost version from a given boost_root. ''' boost_version = None if os.path.exists(os.path.join(boost_root,'Jamroot')): with codecs.open(os.path.join(boost_root,'Jamroot'), 'r', 'utf-8') as f: for lin...
python
def query_boost_version(boost_root): ''' Read in the Boost version from a given boost_root. ''' boost_version = None if os.path.exists(os.path.join(boost_root,'Jamroot')): with codecs.open(os.path.join(boost_root,'Jamroot'), 'r', 'utf-8') as f: for lin...
[ "def", "query_boost_version", "(", "boost_root", ")", ":", "boost_version", "=", "None", "if", "os", ".", "path", ".", "exists", "(", "os", ".", "path", ".", "join", "(", "boost_root", ",", "'Jamroot'", ")", ")", ":", "with", "codecs", ".", "open", "("...
Read in the Boost version from a given boost_root.
[ "Read", "in", "the", "Boost", "version", "from", "a", "given", "boost_root", "." ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/libs/predef/tools/ci/common.py#L421-L435
train
Read in the Boost version from a given boost_root.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...