Ciaren

Feature Engineering

Feature Engineering

Before training a model, you usually reshape the raw columns into good features. Ciaren's Machine Learning nodes cover the common steps — scaling, encoding, selection, and dimensionality reduction — and each one previews on real rows so you can see the effect immediately.

You'll use: File Input → Fill Nulls → Encode Categories → Scale Features → Select Features → Reduce Dimensions (PCA).

File Input
applicants.csv
input
Fill Nulls
income → median
clean
Encode Categories
onehot: region
ml
Scale Features
standard: age, income
ml
Select Features
kbest by target
ml
Reduce Dimensions
PCA → pc_1, pc_2
ml

Sample data

Save this as applicants.csv and upload it on the Datasets page (📥 download applicants.csv):

applicant_id,age,income,region,score,approved
1,25,42000,North,0.61,0
2,41,88000,South,0.82,1
3,33,,North,0.55,0
4,52,120000,East,0.91,1
5,29,51000,South,0.64,0
6,46,99000,East,0.88,1

Build the flow

  1. File Input — File type CSV, select the applicants.csv dataset.
  2. Fill Nullsstrategy: "median", columns: ["income"]. (Use the standard cleaning Fill Nulls node — it works on both engines.)
  3. Encode Categoriesmethod: "onehot", columns: ["region"]. Creates dummy columns like region_North, region_South, region_East.
  4. Scale Featuresmethod: "standard" (z-score) over ["age", "income"]. Other options are minmax and robust.
  5. Select Featuresmethod: "kbest" against the approved target to keep the most relevant columns (or use a variance threshold / correlation filter).
  6. Reduce Dimensions — PCA; keep a number of components or a variance fraction. The selected columns are replaced by pc_1, pc_2, ….

Preview after each node to watch the feature space change. This flow ends at a feature-prep node, so to Run or export it as a whole, add a terminal — a File Output to save the engineered table, or feed the features into a Train node (see below). A flow needs at least one output or model-terminal node to run; on its own it's ideal for live preview.

Scaling, visualized

After Fill Nulls (row 3's missing income becomes the median, 88000):

Before
ageincome
2542000
4188000
3388000
52120000
2951000
4699000
6 rows · 2 cols
Scale Features (standard)
After
agenewincomenew
-1.33-1.46
0.350.25
-0.490.25
1.511.43
-0.91-1.12
0.880.66
6 rows · 2 cols

Engineer features inside the model instead

For modeling, you often want the same transformations reapplied automatically at predict time. Rather than wiring scaling/encoding/imputation as separate nodes, open a train node's Advanced → Preprocessing options — Ciaren bundles numeric scaling, imputation, and one-hot encoding into the model Pipeline, so the exported scikit-learn script reproduces them exactly when scoring new data.

The standalone nodes above are ideal for exploration and preview; the in-model preprocessing is ideal for production scoring.

Next steps