This is the multi-page printable view of this section. Click here to print.
MADLib Expressions (ML)
- 1: Data Type Transformations
- 1.1: Array Operations
- 1.2: Encoding Categorical Variables
- 1.3: Low-Rank Matrix Factorization
- 1.4: Matrix Operations
- 1.5: Norms and Distance Functions
- 1.6: Path
- 1.7: Pivot
- 1.8: Sessionize
- 1.9: Single Value Decomposition
- 1.10: Sparse Vectors
- 1.11: Stemming
- 2: Deep Learning
- 3: Machine Learning
1 - Data Type Transformations
1.1 - Array Operations
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.array_add(array1,array2);
In PlaidCloud Expressions & Filters
func.madlib.array_add(array1,array2)
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.2 - Encoding Categorical Variables
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.encode_categorical_variables ('abalone', 'abalone_out', 'height::TEXT');
In PlaidCloud Expressions & Filters
func.madlib.encode_categorical_variables ('abalone', 'abalone_out', 'height::TEXT')
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.3 - Low-Rank Matrix Factorization
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.lmf_igd_run('lmf_model', 'lmf_data', 'row', 'col', 'val', 999, 10000, 3, 0.1, 2, 10, 1e-9);
In PlaidCloud Expressions & Filters
func.madlib.lmf_igd_run('lmf_model', 'lmf_data', 'row', 'col', 'val', 999, 10000, 3, 0.1, 2, 10, 1e-9)
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.4 - Matrix Operations
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.matrix_trans('"mat_B"', 'row=row_id, val=vector', 'mat_r');
In PlaidCloud Expressions & Filters
func.madlib.matrix_trans('"mat_B"', 'row=row_id, val=vector', 'mat_r')
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.5 - Norms and Distance Functions
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.squared_dist_norm2(a, b);
In PlaidCloud Expressions & Filters
func.madlib.squared_dist_norm2(a, b)
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.6 - Path
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.path('eventlog', 'path_output', 'session_id', 'event_timestamp ASC', 'buy:=page=''CHECKOUT''', '(buy)', 'sum(revenue) as checkout_rev', TRUE);
In PlaidCloud Expressions & Filters
func.madlib.path('eventlog', 'path_output', 'session_id', 'event_timestamp ASC', "buy:=page='CHECKOUT'", '(buy)', 'sum(revenue) as checkout_rev', True)
External References
Apache MADLib Official Documentation for this method can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.7 - Pivot
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.pivot('pivset_ext', 'pivout', 'id', 'piv', 'val', 'sum');
In PlaidCloud Expressions & Filters
func.madlib.pivot('pivset_ext', 'pivout', 'id', 'piv', 'val', 'sum')
External References
Apache MADLib Official Documentation for this method can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.8 - Sessionize
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.sessionize('eventlog', 'sessionize_output_view', 'user_id', 'event_timestamp', '0:30:0');
In PlaidCloud Expressions & Filters
func.madlib.sessionize('eventlog', 'sessionize_output_view', 'user_id', 'event_timestamp', '0:30:0')
External References
Apache MADLib Official Documentation for this method can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.9 - Single Value Decomposition
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.matrix_sparsify('mat', 'row=row_id, val=row_vec', 'mat_sparse', 'row=row_id, col=col_id, val=value');
In PlaidCloud Expressions & Filters
func.madlib.matrix_sparsify('mat', 'row=row_id, val=row_vec', 'mat_sparse', 'row=row_id, col=col_id, val=value')
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.10 - Sparse Vectors
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.gen_doc_svecs('svec_output', 'dictionary_table', 'id', 'term', 'documents_table', 'id', 'term', 'count');
In PlaidCloud Expressions & Filters
func.madlib.gen_doc_svecs('svec_output', 'dictionary_table', 'id', 'term', 'documents_table', 'id', 'term', 'count')
External References
Apache MADLib Official Documentation for these methods can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
1.11 - Stemming
PlaidCloud expressions and filters provide use of most non-administrative Apache MADLib methods. Apache MADLib methods are accessed by prefixing the standard method name with func.madlib.
.
In SQL
madlib.stem_token(word)
In PlaidCloud Expressions & Filters
func.madlib.stem_token(word)
External References
Apache MADLib Official Documentation for this method can be found here.
Additional capabilities and usage examples can be found in the Apache MADLib documentation.
2 - Deep Learning
Content coming soon
3 - Machine Learning
Analyze utilizes the expansive and powerful MADLib extension. MADlib helps you take advantage of the investments you’ve made in your database while using its computational power rather than extracting the data into an external system.
Additional documentation on how to use machine learning is coming soon.