You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Factorization Machines is not limited to using binary features. All features, binary or not, can be represented in sparse format as a list of vector_index:value pairs.
Activity
yangaws commentedon May 24, 2018
Hi @ChandraLingam ,
Factorization Machines is not limited to using binary features. All features, binary or not, can be represented in sparse format as a list of vector_index:value pairs.
ChandraLingam commentedon May 25, 2018
Hi @yangaws - Thank you for the clarification.
For Factorization Machines, SageMaker accepts only recordIO/protobuf formatted input.
What is the recommended process for converting a sparse matrix to recordio/protobuf format?
I used scikit OneHotEncoder to encode my data and it returns a CSR Sparse matrix.
How do I convert this CSR Sparse Matrix efficiently into recordIO file?
winstonaws commentedon May 25, 2018
One way to do so is to use the data conversion functions provided in sagemaker.amazon.common in the sagemaker python SDK. I think this should work: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/amazon/common.py#L113
ChandraLingam commentedon May 26, 2018
Yes, I found out about that method after searching for it and tested it with my dataset. Thank you!
Sandy4321 commentedon Mar 19, 2019
may you share example how to use write_spmatrix_to_sparse_tensor?
yangaws commentedon Mar 21, 2019
Hi @Sandy4321 ,
We have unit tests for this function here:
https://github.com/aws/sagemaker-python-sdk/blob/master/tests/unit/test_common.py#L66
These tests will illustrate basic usage of this function. Feel free to reply if you have further questions.
yangaws commentedon Mar 21, 2019
@Sandy4321
Let's use #707 to track this issue. If you have more questions, please reply #707.
Thanks
Eureka master (aws#273)
Eureka master (aws#273)
Eureka master (#273)
Eureka master (aws#273)