Accessing the machine learning by using the REST APIs
The REST API documentation contains URLs, description of each URL and sample input and output data for the machine learning APIs.
>There are three types of REST APIs used for machine learning:
- Training REST APIs - Using the input given in a MongoDB collection, trains the data, and stores the model in the MongoDB database and stores the model in the MongoDB database for Standardization and Attributes ML Service. For Categorization, the model is stored on the server in the $TOP/mdmui/machinelearning/data/categorization folder and details are stored in the MongoDB database. Maintain sufficient disk space to store the categorization model.
- Prediction REST APIs - Loads and queries the model that is created by the training REST API to predict appropriate output.
- Status REST API - Returns status of current models.
>The training REST APIs require data in Microsoft Excel format that gets added in the database. The data needs to be precise, accurate, and clean for the machine learning module to conduct training operation.
>Create a Microsoft Excel XLSX format file in English language with the following columns.
Categorization
First column | Second column | Third column |
---|---|---|
Category | Spec Name / Attribute Name | Spec Name/Attribute Name |
Primary Hierarchy/Electronics/Mobile and Smartphones/Apple | iPad pro 11 (2020) smartphone was launched on March 2020. The phone comes with an 11-inch touchscreen display with a resolution of 1668 x 2388 pixels at a pixel density of 265 pixels per inch (ppi). iPad pro 11 (2020) is powered by an Octa-core Apple A12Z Bionic processor. It comes with 4 GB of RAM. The iPad pro 11(2019) runs iOS 13.4.1 and is powered by 8134 mAh nonremovable battery. | Apple XS |
Primary Hierarchy/Electronics/Mobile and Smartphones/Apple | iPhone 7 Plus provides better cameras, long-lasting battery life, powerful processor, enhanced stereo speakers along with vibrant display. Sleek design with water- and splash-resistant enclosure makes it every bit impressive. | Apple iPad |
- Category
- Full path of category including the hierarchy, for example, Primary Hierarchy/Electronics/Mobile and Smartphones/Apple.
- Attribute
- Full path of attribute (specName/Attribute Name), for example, Product Specification/Model Name
Note: The Lookup table configuration and training sheet can have multiple attributes for
standardization. Following is the list of the supported attributes: String and Rich Text.
- For Categorization, all categories must have enough products in the training data file. Training on 100 products per category should be sufficient for a good model.
Standardization
>
Where,
First column | Second column |
---|---|
Spec Name / Attribute Name | Spec Name / Attribute2 Name |
iPad pro 11 (2020) smartphone was launched on March 2020. The phone comes with an 11-inch touchscreen display with a resolution of 1668 x 2388 pixels at a pixel density of 265 pixels per inch (PPI). iPad pro 11 (2020) is powered by an Octa-core Apple A12Z Bionic processor. It comes with 4 GB of RAM. The iPad pro 11(2019) runs iOS 13.4.1 and is powered by 8134 mAh nonremovable battery. | Apple 2022 11-inch iPad Pro (Wi-Fi + Cellular, 128 GB) Space Grey (4th Generation) |
iPhone 7 Plus provides better cameras, long-lasting battery life, powerful processor, enhanced stereo speakers along with vibrant display. Sleek design with water- and splash-resistant enclosure makes it every bit impressive. | Apple iPhone 14 (128 GB) – Midnight |
- Category
- Full path of category including the hierarchy, for example, Primary Hierarchy/Electronics/Mobile and Smartphones/Apple.
- Attribute
- Full path of attribute (specName/Attribute Name), for example, Product Specification/Model Name.
Note: The Lookup table configuration and training sheet can have multiple attributes for
standardization. Following is the list of the supported attributes: String and Rich Text.
- For Categorization, all categories must have enough products in the training data file. Training on 100 products per category should be sufficient for a good model.
Attributes
>
Where,
First column | Second column | Third column | Fourth column | N number of columns |
---|---|---|---|---|
Full path of Category | Full path of Attribute | Actual Value for attribute | Variation 1 for attribute value | Variation n for attribute value |
Primary Hierarchy/Electronics/Mobile and Smartphones/Apple | Product Specification/Model Name | Apple | Apple-7s | Apple7 |
Primary Hierarchy/Electronics/Mobile and Smartphones/Apple | Product Specification/Model Name | iPhone 7 | IPhone - 7 | |
Primary Hierarchy/Electronics/Mobile and Smartphones/Apple | Product Specification/Colors | Blue | Blues |
- Category
- Full path of category including the hierarchy, for example, Primary Hierarchy/Electronics/Mobile and Smartphones/Apple.
- Attribute
- Full path of attribute (specName/Attribute Name), for example, Product Specification/Model Name.
- Value
- Actual value for the attribute which machine learning model should predict, for example, Apple 4.
- Variation
- Variation in the actual value of attributes, for example, Apple
7.Note: Training sheet can have n number of variations for the actual value in the N number of columns.
For more information, see the following machine learning REST API documentation: