Inspiration

Even a trip to our closest neighbor Mars is 480 million kilometers and takes approximately seven months. Instead of taking this long trip, why not stay on Earth and save a different galaxy: the Lego world. The problem is, some Lego worlds are more expensive than others. Thus, we wrote a program to find the most cost-efficient galaxy to save.

What it does

  • Predicts the price of a Lego set based on piece count, age, difficulty, rating, and theme using a decision tree regressor. Now you can find the set which provides the most fun/dollar!
  • Used program to summarize what characteristics made certain sets more expensive

Data from: https://www.kaggle.com/mterzolo/lego-sets

How we built it

We used pandas, NumPy to clean the data set before processing. We applied linear regression, decision tree regressor (highest accuracy), lasso using sklearn, completed cross-validation, and compared their scores. Used matplotlib to visualzie data for summary.

Challenges we ran into

  • Dealing with null values: some columns contained 20% NaN. We replaced all NaN with the same value after analyzing the patterns in their price distribution.
  • Running basic commands - first time using NumPy/pandas/matplotlib/sklearn = lots of compile errors

Accomplishments that we're proud of

  • We can predict prices for lego sets!

What we learned

  • Some basic commands in NumPy, pandas to clean datasets
  • How to plot diagrams with matplotlib
  • How to apply a model in sklearn

Built With

Share this project:

Updates

Submission history