Artificial Intelligence 8 min read

Mercari Price Prediction Using TFIDF, GRU, and Ensemble Models

By converting Mercari’s product titles, descriptions, and categorical data into TF‑IDF vectors and embeddings, training MLP and GRU networks, and ensembling them with weighted averaging, the authors achieve a 0.3873 RMSLE—matching the competition’s top score—and demonstrate the power of text‑only price prediction for C2C marketplaces.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Mercari Price Prediction Using TFIDF, GRU, and Ensemble Models

The second‑hand market relies on price advantage; consumers seek affordable yet quality items. Mercari launched the Price Suggestion Challenge, providing product titles, descriptions, categories, condition, and shipping information to predict prices. The competition uses RMSLE as the evaluation metric, with the winner achieving 0.3875. Our experiments on the same dataset reached an RMSLE of 0.3873, comparable to the top result.

Data analysis shows the training set contains 1.186 million records and the test set 0.296 million, each with textual and categorical fields.

Before modeling we addressed two key questions: (1) selecting an appropriate loss function – RMSLE is chosen because price is a non‑negative real value and logarithmic scaling reduces the influence of high‑price outliers; (2) transforming raw data into model inputs – categorical features are one‑hot encoded, while text fields are vectorized.

TFIDF‑based MLP model : Titles and descriptions are converted to TFIDF vectors; categorical features are one‑hot encoded. A five‑layer MLP with ReLU activation is trained. Individual models achieve RMSLE ≈ 0.4138 (original data) and 0.4179 (binarized data). An ensemble of four models reduces RMSLE to 0.3952.

MLP variant with title‑category cross features : Additional cross‑features between title and category are introduced. The ensemble of this variant yields RMSLE ≈ 0.3977.

GRU‑based recurrent model : Titles are right‑padded, one‑hot encoded, and passed through a word‑embedding layer followed by a GRU. The same pipeline processes descriptions. A single GRU model attains RMSLE 0.4223; ensembling four GRU models lowers RMSLE to 0.4152.

Combining the TFIDF‑MLP and GRU models via weighted averaging further reduces the final RMSLE to 0.3873.

Conclusion : Text‑only price estimation is effective for C2C marketplaces. Future improvements could integrate image features and advanced ensemble techniques such as boosting and stacking.

e-commerceMachine LearningensembleGRUprice predictionTFIDF
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.