Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f51daf8

Browse files
fix(KDP): improving docs UX
1 parent fe3a014 commit f51daf8

19 files changed

+9360
-1397
lines changed

docs/advanced/custom-preprocessing.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,70 @@
11
# 🛠️ Custom Preprocessing Pipelines
22

3-
> Create specialized preprocessing flows for your features
3+
<div class="feature-header">
4+
<div class="feature-title">
5+
<h2>Custom Preprocessing Pipelines</h2>
6+
<p>Create specialized preprocessing flows for your features with complete control over transformations</p>
7+
</div>
8+
</div>
9+
10+
## 📋 Overview
11+
12+
<div class="overview-card">
13+
<p>KDP allows you to define custom preprocessing pipelines for your features, giving you complete control over how each feature is processed before being fed into your model. This is particularly useful when the standard preprocessing options don't meet your specific needs.</p>
14+
</div>
15+
16+
<div class="key-benefits">
17+
<div class="benefit-card">
18+
<span class="benefit-icon">🔍</span>
19+
<h3>Specific Transformations</h3>
20+
<p>Define custom preprocessing steps not covered by built-in options</p>
21+
</div>
22+
<div class="benefit-card">
23+
<span class="benefit-icon">🔄</span>
24+
<h3>Combined Techniques</h3>
25+
<p>Combine multiple preprocessing techniques in a single pipeline</p>
26+
</div>
27+
<div class="benefit-card">
28+
<span class="benefit-icon">🧪</span>
29+
<h3>Domain-Specific</h3>
30+
<p>Handle specialized data with custom preprocessing logic</p>
31+
</div>
32+
<div class="benefit-card">
33+
<span class="benefit-icon">🔬</span>
34+
<h3>Novel Approaches</h3>
35+
<p>Experiment with new preprocessing methods</p>
36+
</div>
37+
<div class="benefit-card">
38+
<span class="benefit-icon">🧩</span>
39+
<h3>Legacy Integration</h3>
40+
<p>Incorporate existing preprocessing logic</p>
41+
</div>
42+
</div>
43+
44+
## 🚀 Getting Started
45+
46+
<div class="code-container">
447

5-
## 🌟 Overview
48+
```python
49+
from kdp.features import NumericalFeature, FeatureType
50+
from tensorflow.keras.layers import Normalization, Dense, Activation
51+
52+
# Create a feature with custom preprocessing steps
53+
log_transform_feature = NumericalFeature(
54+
name="revenue",
55+
feature_type=FeatureType.FLOAT_NORMALIZED,
56+
preprocessors=[
57+
"Lambda", # Using a standard Keras layer by name
58+
"Dense", # Another standard layer
59+
"ReLU" # Activation function
60+
],
61+
# Parameters for the layers
62+
function=lambda x: tf.math.log1p(x), # For Lambda layer
63+
units=16, # For Dense layer
64+
)
65+
```
666

7-
KDP allows you to define custom preprocessing pipelines for your features, giving you complete control over how each feature is processed before being fed into your model. This is particularly useful when the standard preprocessing options don't meet your specific needs.
67+
</div>
868

969
## 🤔 When to Use Custom Preprocessing
1070

0 commit comments

Comments
 (0)