Dataset Viewer
Auto-converted to Parquet
Category
stringclasses
5 values
Age
int64
18
80
Sex
stringclasses
2 values
ALB
float64
18.8
108
ALP
float64
22.6
1.06k
ALT
float64
2.28
572
AST
float64
11.1
711
BIL
float64
0.92
631
CHE
float64
3.16
23.3
CHOL
float64
2.6
15.8
CREA
float64
11
2.61k
GGT
float64
4.37
1.66k
PROT
float64
48.9
211
0=Blood Donor
35
f
33.150264
46.029294
7.169183
18.703139
7.35489
6.076685
2.596394
96.196133
10.389864
66.78897
0=Blood Donor
42
m
42.03732
78.055312
20.359405
25.488218
4.145439
12.606193
5.289418
79.802459
17.424093
81.426594
0=Blood Donor
39
m
46.8698
75.256661
36.090077
51.65233
6.443171
9.226078
5.547076
83.545993
31.521596
84.682337
0=Blood Donor
45
m
46.432292
56.25169
32.329714
25.630135
22.524035
7.815105
4.891883
85.499488
40.784733
82.731769
0=Blood Donor
72
m
55.848918
95.632914
44.868914
32.545349
13.202738
13.112971
6.064972
100.607253
42.870916
106.544612
0=Blood Donor
22
m
36.343033
36.415962
15.438516
16.355959
11.009162
8.599849
5.482914
100.726937
74.222601
66.394004
0=Blood Donor
53
m
54.72904
49.624441
19.059821
20.92594
10.292702
8.482992
5.84513
85.150617
21.08093
83.458734
1=Hepatitis
25
m
45.809912
52.524025
36.878674
33.222148
17.709517
6.976462
5.622475
132.876989
24.071298
72.745897
0=Blood Donor
39
m
49.580541
73.428472
22.914689
20.197497
7.396746
9.130591
4.117008
83.817131
14.666234
80.981738
0=Blood Donor
58
f
45.132115
95.032402
21.354147
22.472431
40.207377
6.183401
4.991759
93.345699
17.78935
75.485379
0=Blood Donor
45
m
49.516484
54.667669
25.369814
24.563688
18.443765
4.758517
4.079657
84.904927
25.611786
83.185426
0=Blood Donor
32
m
46.463215
70.813623
10.796939
20.463946
5.382917
8.028272
4.166148
77.208746
18.558855
67.819258
0=Blood Donor
36
m
34.560281
77.230046
22.485848
21.266933
6.754506
9.167239
5.763142
79.527248
19.675387
71.153936
0=Blood Donor
53
m
44.330417
55.979584
19.380443
26.626205
7.406725
7.748967
4.089711
78.743103
8.019276
85.549856
1=Hepatitis
36
m
47.65383
53.079569
31.815741
29.140117
5.391741
6.090086
6.17872
79.660703
18.213654
92.127957
0s=suspect Blood Donor
47
f
46.811169
72.755872
37.93435
39.26011
7.435843
10.227599
5.071386
77.463086
26.167004
81.644103
0=Blood Donor
45
m
45.394786
81.018086
19.791225
24.775051
11.711047
7.575937
5.971705
100.711648
15.11826
75.298959
0=Blood Donor
37
m
46.295816
88.473148
30.537201
30.032487
10.292036
9.860955
5.842417
106.074079
47.296412
79.812621
0s=suspect Blood Donor
70
m
56.66818
81.109888
60.053888
61.306776
37.40642
15.196586
7.712751
173.473916
43.851845
106.507552
0=Blood Donor
52
m
45.381475
82.740712
38.646177
41.12275
13.957626
7.725999
4.50878
131.233361
21.896356
84.492895
0=Blood Donor
20
m
37.512604
42.826276
30.379686
16.456667
11.865268
6.457257
4.707336
89.291074
26.842499
65.491353
0=Blood Donor
47
m
50.897708
98.479155
27.180006
26.038924
8.786706
10.046305
5.104315
86.156814
34.569667
78.042541
0=Blood Donor
37
m
47.058402
63.433725
46.980577
29.428047
22.267687
10.944884
5.422589
76.013382
99.159799
68.071162
1=Hepatitis
55
m
63.766098
71.080812
149.042072
74.027849
17.531413
12.607247
5.787548
104.176593
56.62736
109.41998
0=Blood Donor
35
m
40.902115
32.852533
28.698997
27.799638
5.728748
10.824803
4.653953
96.355783
25.987979
68.069123
1=Hepatitis
43
f
54.575511
105.15568
46.242138
38.128142
24.321445
12.380023
7.278252
98.316891
28.393032
93.202023
0=Blood Donor
51
m
50.696614
33.760524
22.419518
24.266336
8.110002
9.386109
7.839272
99.624371
17.003468
80.244986
0=Blood Donor
55
m
35.80077
51.015153
35.964831
17.7532
5.222152
8.032447
4.554336
73.464956
17.742795
59.255185
0=Blood Donor
30
m
39.58883
76.107047
20.325873
27.876827
5.343501
6.751985
4.408599
86.941978
9.474041
64.131234
0s=suspect Blood Donor
40
m
53.466053
73.362707
29.416962
27.370055
27.276667
11.95652
5.608314
100.105095
26.173146
90.621336
0=Blood Donor
39
m
47.674279
80.916838
30.813976
37.492476
6.318269
10.988404
6.270443
93.778513
48.64269
71.651481
0=Blood Donor
37
m
43.142835
71.731343
32.933507
30.140666
7.491614
7.515725
4.124299
90.671877
14.474673
72.954779
0=Blood Donor
66
m
59.977719
79.672602
60.2438
39.887647
23.531302
11.737993
6.821651
133.758976
29.376858
91.556463
0=Blood Donor
49
f
40.032425
70.995663
40.110473
25.018247
7.560974
10.992269
5.445943
82.468424
28.140254
65.776971
0=Blood Donor
29
m
38.404128
62.61909
34.018594
52.815495
10.474565
8.68222
4.671349
99.352709
16.275829
70.448281
0=Blood Donor
56
m
56.258831
94.569787
62.489792
35.846043
12.918833
13.64183
8.859342
105.655394
97.754357
92.043629
0=Blood Donor
70
m
55.748014
164.513322
32.928006
40.814464
8.277917
12.961445
5.939761
104.612527
28.910641
94.288057
0=Blood Donor
57
m
57.807376
87.667604
29.946886
39.512482
57.216071
10.869674
5.061151
111.610811
23.955486
90.975048
0=Blood Donor
26
m
43.714688
81.342819
25.797645
21.697103
6.161065
10.840597
5.580344
70.517563
32.175512
70.041284
1=Hepatitis
39
f
56.397205
80.275903
31.460182
29.78149
5.697228
11.327675
4.789155
95.02405
24.855928
84.72349
0=Blood Donor
60
m
56.718208
65.435417
23.181387
27.156578
12.891928
9.267451
7.663366
83.302918
37.864107
96.003942
2=Fibrosis
36
m
91.534006
138.905164
48.940202
42.519097
14.192406
19.041045
8.055387
141.257878
40.941797
124.607757
0=Blood Donor
50
f
28.725258
105.8035
31.283845
26.452403
8.936713
7.073249
4.479458
65.963518
47.091168
89.885139
0=Blood Donor
54
m
53.542316
71.115838
31.051602
30.629232
7.049337
7.957858
5.472752
89.002947
12.277149
100.111508
0=Blood Donor
33
m
43.684359
54.98432
20.853972
18.109838
6.968813
5.170814
4.175544
86.519558
60.521348
77.719092
0=Blood Donor
44
m
46.521645
81.312284
118.455482
53.82571
11.444643
13.43849
6.056985
90.385491
23.783999
78.230776
1=Hepatitis
18
f
46.328324
62.975423
27.795123
27.70173
10.691527
5.346787
4.806115
92.242402
23.099619
69.089539
0s=suspect Blood Donor
32
m
47.895934
74.307237
11.909355
19.355833
8.016013
8.779916
7.814391
70.933535
14.471904
77.938376
0=Blood Donor
41
m
54.536137
77.022944
41.87432
22.786689
8.444184
9.623248
5.552371
77.16316
36.930305
82.551778
1=Hepatitis
30
m
64.356707
108.35712
57.299676
45.865282
10.308424
9.8261
7.809125
117.911771
27.885281
96.101775
0=Blood Donor
64
m
54.931836
77.02678
41.96222
36.06412
22.458363
14.798616
5.365773
129.397638
47.133202
90.329553
0s=suspect Blood Donor
27
m
40.853629
48.379797
20.596342
26.135699
6.004815
9.224732
5.285156
76.360914
17.251323
72.074702
0=Blood Donor
39
m
49.552767
88.192981
17.799703
26.912426
9.281442
9.189883
5.532305
107.320471
15.368547
81.296097
0=Blood Donor
46
m
37.471454
125.59586
19.145732
17.945916
2.448535
6.30188
6.374883
75.512671
23.265504
82.638717
0=Blood Donor
62
m
55.896312
75.230073
20.049247
29.54169
20.174726
11.891733
8.719696
112.911895
83.959277
89.326743
0=Blood Donor
27
f
36.766153
49.324844
20.968008
19.372035
8.053069
8.483308
4.849106
72.214818
31.607735
63.951127
0=Blood Donor
58
m
53.175518
79.157948
28.41135
36.146134
11.913806
7.232214
4.569409
128.239992
13.673521
85.78171
0=Blood Donor
45
m
51.240945
76.823114
43.660647
53.044973
6.608651
10.43653
7.578686
95.136363
23.909888
85.62651
0=Blood Donor
33
m
45.626705
90.595699
33.183451
34.820651
6.172411
9.12177
4.113594
111.945649
22.620056
67.075233
2=Fibrosis
50
m
70.236331
121.924584
45.281089
62.398059
14.564379
11.903538
8.333292
133.364954
18.881697
94.210556
0=Blood Donor
47
m
58.518863
100.040414
21.001343
26.195095
10.77114
9.754199
7.28165
102.860014
28.724606
96.544374
1=Hepatitis
37
m
60.69915
96.108082
31.325649
36.433541
5.671546
11.856794
5.169058
121.677619
19.66833
94.681262
0=Blood Donor
45
m
46.858616
49.727501
49.053017
26.267229
6.945961
10.931236
5.409429
83.693517
22.433307
74.965074
1=Hepatitis
40
m
71.500758
72.511404
26.566745
39.724292
16.060286
7.967484
6.711317
127.362803
38.53621
96.484938
0=Blood Donor
46
m
35.03667
71.701134
97.11805
53.736033
10.388209
9.076346
6.212092
107.460221
34.227319
82.859424
1=Hepatitis
52
m
68.955559
92.29184
143.964726
67.493842
15.366036
11.493282
7.037809
136.730995
52.196133
105.945454
0=Blood Donor
64
m
51.601533
147.850268
21.964774
27.098885
3.747993
11.742436
5.725206
111.282664
16.220284
99.474495
0=Blood Donor
30
m
38.480595
75.270709
50.889966
42.453291
12.834112
7.796205
4.404866
66.806997
91.835048
72.943845
1=Hepatitis
70
m
82.876526
95.731164
37.153888
45.849637
16.397564
15.438896
10.001487
141.89494
40.029309
144.36998
0=Blood Donor
21
m
40.925883
53.01246
17.141074
17.218411
36.861648
7.846977
3.223721
70.745348
13.057707
62.360254
0=Blood Donor
43
m
49.38341
76.176303
13.293906
16.4924
5.968134
9.129699
3.956902
95.345079
9.790308
74.345232
0=Blood Donor
52
m
46.69313
81.099554
81.669958
54.075316
11.986809
13.559889
8.050763
119.288071
105.257171
86.523458
0=Blood Donor
48
m
55.238998
51.865009
18.186916
25.526518
13.093194
9.893157
6.437948
110.660601
16.270466
74.908235
0=Blood Donor
37
m
44.09377
58.025151
50.432373
46.641726
10.161993
11.539094
6.319174
86.383159
31.129831
75.90642
0=Blood Donor
42
m
43.456782
44.477642
20.848472
23.307704
10.608664
6.199824
4.082128
67.170009
76.614047
72.311099
0=Blood Donor
39
m
47.367647
71.967418
49.630376
33.493719
16.875135
7.153022
4.034631
69.760787
18.182787
76.767883
0=Blood Donor
37
f
37.355323
39.716277
33.0566
40.828598
3.013266
5.681447
4.107256
91.829952
13.711086
57.950335
0=Blood Donor
55
m
60.907583
54.840043
28.575506
26.27325
9.500162
13.825981
8.984909
107.748693
53.332568
98.126356
0=Blood Donor
49
f
40.641649
88.841317
69.109685
34.519738
15.287683
11.266561
5.138731
88.881876
45.881892
72.058012
0=Blood Donor
36
m
40.903332
66.838164
18.695797
23.614992
6.492328
8.466782
6.080068
87.616357
20.403344
76.988062
0=Blood Donor
55
m
54.878439
80.891781
29.35081
24.607728
12.093355
10.916474
5.90457
92.891852
34.083692
80.202366
0=Blood Donor
48
m
48.490959
57.865236
62.648517
33.346675
10.99483
11.881123
7.510079
87.445862
37.670283
84.71053
0=Blood Donor
54
f
53.299232
69.203452
25.874753
34.306593
10.65258
11.028063
6.819092
82.021369
56.043392
90.850329
0=Blood Donor
52
m
47.775157
83.860379
35.304677
31.206463
7.361468
7.042033
6.061337
90.650485
29.475756
78.979768
0=Blood Donor
35
m
44.955137
91.789619
93.695384
63.665819
9.106318
9.629672
4.57559
88.695049
101.596629
60.540046
1=Hepatitis
38
m
59.565248
67.345153
45.757499
48.264444
31.817585
12.678153
6.707879
81.769675
30.322313
94.608082
0=Blood Donor
53
m
39.570909
42.910574
23.206784
31.350466
3.950426
10.172464
4.85344
111.459892
28.653987
87.342291
0=Blood Donor
52
m
53.038697
80.511395
57.183485
39.870486
6.007915
11.59725
5.564148
97.714402
22.335351
85.366899
0=Blood Donor
44
m
37.468831
90.565084
34.867534
27.730866
3.236502
10.623427
7.667924
78.056543
31.443958
78.599801
0=Blood Donor
46
m
53.007363
112.281155
49.093643
28.581015
4.847286
10.487077
10.219561
116.339411
75.422066
82.621806
0=Blood Donor
60
f
54.157952
69.744798
22.521474
25.581609
51.950205
9.70531
5.176036
82.424386
19.489729
91.293183
0=Blood Donor
37
m
44.873036
78.311923
35.88061
35.599392
4.08583
13.68987
8.242339
103.594537
78.794412
63.95027
0=Blood Donor
51
m
53.884595
78.303353
20.464389
27.396518
9.465722
11.01266
7.164069
104.514046
26.691925
89.194929
0=Blood Donor
42
f
43.441211
43.471806
26.448482
24.319708
9.284445
9.306322
4.299074
76.826593
15.575621
71.96544
0=Blood Donor
42
m
41.683239
67.665327
61.671644
37.32666
7.981928
4.771234
5.888312
81.372
94.327365
75.484957
0=Blood Donor
58
m
52.205749
91.417833
28.045432
39.682084
14.624898
10.904455
8.872174
116.306061
29.821669
92.227218
0=Blood Donor
54
m
49.701266
82.398274
41.184878
39.649433
17.647936
9.579447
6.12289
99.474409
20.205264
69.786557
0=Blood Donor
54
m
54.294331
76.893989
47.616802
37.919769
23.406968
13.613427
5.793095
111.833337
20.948603
83.738457
0=Blood Donor
60
m
55.607696
69.813804
51.567617
34.063991
13.148736
13.706529
9.198007
112.003662
50.878724
101.865557
2=Fibrosis
45
m
82.381798
120.107675
50.230671
75.121863
12.491643
13.041418
9.474808
165.051143
26.261809
142.043245
End of preview. Expand in Data Studio

This dataset contains laboratory values of blood donors and Hepatitis C patients with demographic information. The dataset provides comprehensive medical data for Hepatitis C research and machine learning applications.

Dataset Summary

  • Total Samples: 615
  • Features: 13 (Patient ID, Category, Age, Sex, 9 laboratory values)
  • Task: Multi-class classification of Hepatitis C diagnosis and disease progression
  • Format: Parquet files for efficient storage and loading

Features

Patient Information

  • Unnamed: 0: Patient ID/Number (integer)
  • Category: diagnosis category (string)
    • 0=Blood Donor: Healthy blood donor
    • 0s=suspect Blood Donor: Suspect blood donor
    • 1=Hepatitis: Hepatitis C infection
    • 2=Fibrosis: Liver fibrosis
    • 3=Cirrhosis: Liver cirrhosis
  • Age: Age in years (integer)
  • Sex: Gender (f=female, m=male)

Laboratory Values

  • ALB: Albumin (g/dL) - Liver function marker
  • ALP: Alkaline phosphatase (U/L) - Bone and liver enzyme
  • ALT: Alanine aminotransferase (U/L) - Liver enzyme
  • AST: Aspartate aminotransferase (U/L) - Liver enzyme
  • BIL: Bilirubin (mg/dL) - Liver function marker
  • CHE: Cholinesterase (U/L) - Liver enzyme
  • CHOL: Cholesterol (mg/dL) - Lipid marker
  • CREA: Creatinine (mg/dL) - Kidney function marker
  • GGT: Gamma-glutamyltransferase (U/L) - Liver enzyme
  • PROT: Total protein (g/dL) - Protein marker

Dataset Statistics

Category Distribution

Category Count Percentage
0=Blood Donor 452 73.5%
1=Hepatitis 73 11.9%
3=Cirrhosis 30 4.9%
2=Fibrosis 30 4.9%
0s=suspect Blood Donor 30 4.9%

Demographics

  • Sex Distribution: 55.1% male, 44.9% female
  • Age Range: 18-80 years
  • Mean Age: 47.4 years

Age by Category

Category Mean Age Age Range
Blood Donor 44.5 32-77
Suspect Blood Donor 41.3 47-74
Hepatitis 44.1 19-61
Fibrosis 50.4 29-75
Cirrhosis 58.8 38-74

Usage

Loading the Dataset

import pandas as pd

# Load the dataset
df = pd.read_parquet('data/hepatitis_c.parquet')

# Display basic information
print(f"Dataset shape: {df.shape}")
print(f"Columns: {list(df.columns)}")

Data Exploration

# View category distribution
print("Category distribution:")
print(df['Category'].value_counts())

# View sex distribution
print("\nSex distribution:")
print(df['Sex'].value_counts())

# Summary statistics for laboratory values
print("\nLaboratory values summary:")
print(df[['ALB', 'ALP', 'ALT', 'AST', 'BIL', 'CHE', 'CHOL', 'CREA', 'GGT', 'PROT']].describe())

Machine Learning Applications

from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier

# Prepare features and target
feature_cols = ['Age', 'Sex', 'ALB', 'ALP', 'ALT', 'AST', 'BIL', 'CHE', 'CHOL', 'CREA', 'GGT', 'PROT']
X = df[feature_cols]
y = df['Category']

# Encode categorical variables
X = pd.get_dummies(X, columns=['Sex'], drop_first=True)

# Split the data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y)

# Train a model
model = RandomForestClassifier(random_state=42)
model.fit(X_train, y_train)

# Evaluate
accuracy = model.score(X_test, y_test)
print(f"Model accuracy: {accuracy:.3f}")

Data Types and Missing Values

  • All features are numerical except Category and Sex
  • No missing values in the dataset
  • Category and Sex should be encoded for machine learning models
  • Age is provided as integers (years)
  • Laboratory values are floating-point numbers

Target Variable

The Category column serves as the classification target:

  • Multi-class classification: 5 categories of liver health status
  • Binary classification: Consider grouping (0, 0s vs 1, 2, 3) for healthy vs diseased
  • Ordinal classification: Disease progression from healthy to cirrhosis

Feature Engineering Suggestions

  • Demographic encoding: Convert Sex to binary (0/1)
  • Age groups: Create age brackets if needed
  • Laboratory ratios: Consider ALT/AST ratios, BIL/ALB ratios
  • Feature scaling: Laboratory values may benefit from standardization

Performance Considerations

  • Memory efficient: Parquet format provides fast loading and compression
  • Stratified sampling: Use stratified cross-validation due to class imbalance
  • Class weights: Consider balanced class weights for imbalanced categories
Downloads last month
20

Collection including electricsheepafrica/Africa-Hepatitis-C-prediction-dataset