Turi Create
4.0
|
#include <toolkits/feature_engineering/feature_binner.hpp>
Public Member Functions | |
virtual | ~feature_binner () |
void | init_options (const std::map< std::string, flexible_type > &_options) override |
size_t | get_version () const override |
void | save_impl (turi::oarchive &oarc) const override |
void | load_version (turi::iarchive &iarc, size_t version) override |
void | init_transformer (const std::map< std::string, flexible_type > &_options) override |
void | fit (gl_sframe data) override |
gl_sframe | transform (gl_sframe data) override |
gl_sframe | fit_transform (gl_sframe data) |
std::vector< std::string > | list_fields () |
const variant_type & | get_value_from_state (std::string key) |
const std::map< std::string, flexible_type > & | get_current_options () const |
std::map< std::string, flexible_type > | get_default_options () const |
const flexible_type & | get_option_value (const std::string &name) const |
const std::map< std::string, variant_type > & | get_state () const |
bool | is_trained () const |
void | set_options (const std::map< std::string, flexible_type > &_options) |
void | add_or_update_state (const std::map< std::string, variant_type > &dict) |
const std::vector< option_handling::option_info > & | get_option_info () const |
virtual const char * | name ()=0 |
virtual const std::string & | uid ()=0 |
void | save_to_url (const std::string &url, const variant_map_type &side_data={}) |
void | save_model_to_data (std::ostream &out) |
const std::map< std::string, std::vector< std::string > > & | list_functions () |
const std::vector< std::string > & | list_get_properties () |
const std::vector< std::string > & | list_set_properties () |
variant_type | call_function (const std::string &function, variant_map_type argument) |
variant_type | get_property (const std::string &property) |
variant_type | set_property (const std::string &property, variant_map_type argument) |
const std::string & | get_docstring (const std::string &symbol) |
virtual void | perform_registration () |
Protected Member Functions | |
void | register_function (std::string fnname, const std::vector< std::string > &arguments, impl_fn fn) |
void | register_defaults (const std::string &fnname, const variant_map_type &arguments) |
void | register_setter (const std::string &propname, impl_fn setfn) |
void | register_getter (const std::string &propname, impl_fn getfn) |
void | register_docstring (const std::pair< std::string, std::string > &fnname_docstring) |
Protected Attributes | |
std::map< std::string, variant_type > | state |
This transformation 1) creates a set of named bins and a mapping from the reals to each bin, and 2) for each value returns the name of the assigned bin.
int/reals: returns the name of the bin for which bin_l < x < bin_r.
Bin creation options include:
Options: bins = 'quantile'=> creates quantile bins? bins = 'exponential'=> bins = [0, 1, 5] => creates 5 bins: (-Inf, 0), [0, 1), [1, 5), [5,Inf)
Definition at line 50 of file feature_binner.hpp.
|
inlinevirtual |
Definition at line 70 of file feature_binner.hpp.
|
inherited |
Append the key value store of the model.
[in] | dict | Options (Key-Value pairs) to set |
|
inherited |
Calls a user defined function.
|
overridevirtual |
Set constant.
[in] | data | (SFrame of data) |
Implements turi::sdk_model::feature_engineering::transformer_base.
|
inline |
Fit and transform the given data. Intended as an optimization because fit and transform are usually always called together. The default implementaiton calls fit and then transform.
[in] | data | (SFrame of data) |
Definition at line 129 of file feature_binner.hpp.
|
inherited |
Get current options.
Interfaces with the get_current_options function in the Python side.
|
inherited |
Get default options.
Interfaces with the get_default_options function in the Python side.
|
inherited |
Returns the toolkit documentation for a function or property.
|
inherited |
Returns the option information struct for each of the set parameters.
|
inherited |
Returns the value of an option. Throws an error if the option does not exist.
[in] | name | Name of the option to get. |
|
inherited |
Reads a property.
|
inherited |
Get model.
|
inherited |
Returns the value of a particular key from the state.
From the python side, this is interfaced with the get() function or the [] operator in python.
|
overridevirtual |
Get a version for the object.
Implements turi::sdk_model::feature_engineering::transformer_base.
|
overridevirtual |
Set one of the options in the model. Use the option manager to set these options. If the option does not satisfy the conditions that the option manager has imposed on it. Errors will be thrown.
[in] | options | Options to set |
Implements turi::sdk_model::feature_engineering::transformer_base.
|
overridevirtual |
Initialize the transformer.
Implements turi::sdk_model::feature_engineering::transformer_base.
|
inherited |
Is this model trained.
|
inherited |
Lists all the keys accessible in the "model" map.
This is the function that the list_fields should call in python.
|
inherited |
Lists all the registered functions. Returns a map of function name to array of argument names for the function.
|
inherited |
Lists all the get-table properties of the class.
|
inherited |
Lists all the set-table properties of the class.
|
overridevirtual |
Load the object using Turi's iarc.
Implements turi::sdk_model::feature_engineering::transformer_base.
|
pure virtualinherited |
Returns the name of the toolkit class, as exposed to client code. For example, the Python proxy for this instance will have a type with this name.
Note: this function is typically overridden using the BEGIN_CLASS_MEMBER_REGISTRATION macro.
|
virtualinherited |
Declare the base registration function. This class has to be handled specially; the macros don't work here due to the override declarations.
Reimplemented in turi::model_proxy.
|
protectedinherited |
Registers default argument values
|
protectedinherited |
Adds a docstring for the specified function or property name.
|
protectedinherited |
Adds a function with the specified name, and argument list.
|
protectedinherited |
Adds a property getter with the specified name.
|
protectedinherited |
Adds a property setter with the specified name.
|
overridevirtual |
Save the object using Turi's oarc.
Implements turi::sdk_model::feature_engineering::transformer_base.
|
inherited |
Save a toolkit class to a data stream.
|
inherited |
Save a toolkit class to disk.
url | The destination url to store the class. |
sidedata | Any additional side information |
|
inherited |
Set one of the options in the algorithm.
The value are checked with the requirements given by the option instance.
[in] | name | Name of the option. |
[in] | value | Value for the option. |
|
inherited |
Sets a property. The new value of the property should appear in the argument map under the key "value".
|
overridevirtual |
Transform the given data.
[in] | data | (SFrame of data) |
This function directly interfaces with "transform" in python.
Implements turi::sdk_model::feature_engineering::transformer_base.
|
pure virtualinherited |
Returns a unique identifier for the toolkit class. It can be any unique ID. The UID is only used at runtime (to determine the concrete type of an arbitrary model_base instance) and is never stored.
Note: this function is typically overridden using the BEGIN_CLASS_MEMBER_REGISTRATION macro.
Implemented in turi::model_proxy.
|
protectedinherited |
All things python
Definition at line 206 of file ml_model.hpp.