File size: 2,684 Bytes
3c4d2c6
 
 
 
 
d23615b
 
 
3c4d2c6
 
 
d23615b
 
3c4d2c6
 
 
 
d23615b
3c4d2c6
 
 
 
 
 
 
 
 
 
d23615b
 
 
 
 
 
 
 
 
 
 
 
3c4d2c6
853c181
c5205a6
853c181
d23615b
 
c5205a6
 
853c181
3c4d2c6
c5205a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d23615b
c5205a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
language: 
- en
tags:
- automl
- tabular-classification
- autogluon
- cmu-course
datasets:
- aedupuga/lego-sizes
metrics:
- type: accuracy
- type: f1
model-index:
- name: Lego Brick Classification (Classical AutoML)
  results:
  - task:
      type: tabular-classification
      name: Tabular Classification
    dataset:
      name: aedupuga/lego-sizes
      type: classification
      split: augmented
    metrics:
    - type: accuracy
      value: 0.97
    - type: f1
      value: 0.96
  - task:
      type: tabular-classification
      name: Tabular Classification
    dataset:
      name: aedupuga/lego-sizes
      type: classification
      split: original
    metrics:
    - type: accuracy
      value: 0.90
    - type: f1
      value: 0.89
---

# Model Card for Lego Brick Classification (Classical AutoML)

This model classifies LEGO pieces into three types — **Standard**, **Flat**, and **Sloped** — using their geometric dimensions (*Length, Height, Width, Studs*).  
It was trained using **AutoGluon Tabular AutoML**, which automatically searched over classical ML models (LightGBM, XGBoost, CatBoost, Random Forest, k-NN, Neural Network) and selected the best-performing one.

---

## Model Details

### Model Description
- **Developed by:** Xinxuan Tang (CMU)  
- **Dataset curated by:** Anuhya Edupuganti (CMU)  
- **Model type:** AutoML ensemble (best model = LightGBM)  
- **Language(s):** N/A (tabular data)  
- **Finetuned from:** Not applicable  

### Model Sources
- **Repository:** [Hugging Face Model Repo](https://huggingface.co/)  
- **Dataset:** [aedupuga/lego-sizes](https://huggingface.co/datasets/aedupuga/lego-sizes)

---

## Uses

### Direct Use
- Educational practice in **tabular classification**.  
- Experimenting with AutoML search and hyperparameter tuning.  

### Downstream Use
- Could be used as a **teaching example** for AutoML pipelines on small tabular datasets.  

### Out-of-Scope Use
- **Not suitable for industrial LEGO quality control**, since dataset is synthetic and small.

---

## Bias, Risks, and Limitations

- **Small dataset**: only 30 original bricks, augmented to 300 synthetic samples.  
- **Synthetic data bias**: jitter augmentation may not reflect real-world LEGO variations.  

### Recommendations
Users should treat results as **proof-of-concept** and not deploy in production.

---

## How to Get Started with the Model

```python
from autogluon.tabular import TabularPredictor
import pandas as pd

# Load trained predictor
predictor = TabularPredictor.load("autogluon_model/")

# Run inference
test_data = pd.DataFrame([{"Length": 4, "Height": 1.2, "Width": 2, "Studs": 4}])
print(predictor.predict(test_data))