4paradigm / 4paradigm/OpenMLDB

The continuous feature values in the gcformat sample data generated by the OpenMLDB SQL feature extraction script are incorrect

Đang mở
#3,922 0 bình luận 0 reaction 1 người được giao Được giao cho @wyl4pd Xem trên GitHub
bug
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

**Bug Description**
Service Version: 0.9.0
The gcformat sample data generated by the OpenMLDB SQL feature extraction script contains incorrect continuous feature values, all of which are set to 0.

**Expected Behavior**
Current incorrect format: label| slot:sign:origin-value
Correct format: label index| slot:sign:origin-value

**Relation Case**
OpenMLDB SQL Feature Extraction Example:
```
0| 1:0:1 2:4599670039981440374 3:6365000770384461703 4:0:93.200000
1| 1:0:2 2:5613161932270271752 3:-1384602352766124944 4:0:93.075000
0| 1:0:3 2:4599670039981440374 3:-6239076729344379818 4:0:92.893000
```
PICO Feature Extraction Example:
```
0 0| 2:-8773247204422130117:1 3:4042412524814531440 4:6048373541161169225 5:4681710344575317709:0x1.74ccccccccccdp6
1 1| 2:-8773247204422130117:2 3:6142047291687075953 4:1461111459061395210 5:4681710344575317709:0x1.744cccccccccdp6
0 2| 2:-8773247204422130117:3 3:4042412524814531440 4:3353218529862650678 5:4681710344575317709:0x1.73926e978d4fep6
```

**Steps to Reproduce**
1. data schema:
```
id[Int],age[Int],job[String],cons_price_idx[Double],y[Int]
```
2. PICO Feature Extraction Script:
```
target_y = binary_label(y)
f_id = continuous(id)
f_age = discrete(age)
f_job = discrete(job)
f_cons_price_idx = continuous(cons_price_idx)
```
4. OpenMLDB SQL Feature Extraction Script:
```
select gcformat(
binary_label(bool(y)),
continuous(id),
discrete(age),
discrete(job),
continuous(cons_price_idx)
) as instance from main_table
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue is about the `gcformat` function in OpenMLDB's SQL feature extraction script incorrectly outputting continuous feature values as 0. Look at the SQL function implementation for `gcformat`, likely in the SQL engine or UDF code. Compare the output format with the expected PICO format. The fix involves adjusting the formatting logic for continuous values. Test with the provided sample schema and SQL query to verify the corrected output.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
sql
Lĩnh vực
databases, machine-learning
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.