Books to Scrape Price Predictor

Random Forest regressor that predicts the price of a book (in GBP) from a scraped books catalog (1000 books from books.toscrape.com).

Model Characteristics

  • Type: Regression (RandomForestRegressor, 300 trees)
  • Inputs: star rating (1-5), title length, title word count, presence of ':', + 8 title TF-IDF topics via TruncatedSVD
  • Output: predicted price in GBP
  • CV MAE: 13.3 GBP (+/- 0.33) on 5-fold cross-validation

Data Overview

  • Dataset: books-to-scrape-catalog-dataset (1000 rows)
  • Raw HTML-wrapped prices cleaned via regex; word ratings (One-Five) mapped to integers

Evaluation Results

  • 5-fold CV Mean Absolute Error: 13.3 GBP
  • Baseline (predict median): 12.5 GBP
  • Title-only features give weak signal; adding category/genre would improve accuracy

Files

  • model.joblib โ€” trained RandomForestRegressor
  • tfidf.joblib โ€” fitted TfidfVectorizer
  • svd.joblib โ€” fitted TruncatedSVD
  • numeric_feats.joblib โ€” list of numeric feature names
  • feature_names.npy โ€” full feature names

Usage

import joblib
model = joblib.load("model.joblib")

Provenance

Trained by Anuj Bolewar (anujbolewar on Kaggle) on the books-to-scrape catalog dataset.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support