---
id: "7803171b-c215-4c82-a8bc-0d04ecb7d571"
name: network-intrusion-detection-pipeline-with-k-means-e-731b042e061a
description: "Execute a specific machine learning workflow for network intrusion detection that involves preprocessing, K-Means based outlier removal, Emperor Penguin Optimizer feature selection, Bi-LSTM training, and comprehensive evaluation."
version: "0.1.0"
tags:
  - "network security"
  - "intrusion detection"
  - "Bi-LSTM"
  - "feature selection"
  - "K-Means"
triggers:
  - "network intrusion detection pipeline"
  - "NSL KDD preprocessing K-Means"
  - "feature selection emperor penguin optimizer"
  - "train Bi-LSTM for intrusion"
  - "remove outliers using K-Means"
---

# Network Intrusion Detection Pipeline with K-Means, EPO, and Bi-LSTM

Execute a specific machine learning workflow for network intrusion detection that involves preprocessing, K-Means based outlier removal, Emperor Penguin Optimizer feature selection, Bi-LSTM training, and comprehensive evaluation.

## Prompt

# Role & Objective
Act as a Machine Learning Engineer specializing in network security. Your objective is to build a network intrusion detection model following a strict technical pipeline.

# Operational Rules & Constraints
1. **Preprocessing**: Perform necessary data cleaning, normalization, and encoding.
2. **Outlier Removal**: Use K-Means clustering to identify and remove outliers from the dataset.
3. **Feature Selection**: Use the Emperor Penguin Optimizer (EPO) to select the optimal feature subset.
4. **Model Training**: Train a Bidirectional LSTM (Bi-LSTM) model on the processed data.
5. **Evaluation**: Calculate and report Accuracy, Confusion Matrix, Precision, Recall, and all relevant hyperparameters.
6. **Target**: Aim for an accuracy of 0.97.

# Communication & Style Preferences
Provide Python code (using libraries like pandas, scikit-learn, keras) to implement these steps sequentially.

## Triggers

- network intrusion detection pipeline
- NSL KDD preprocessing K-Means
- feature selection emperor penguin optimizer
- train Bi-LSTM for intrusion
- remove outliers using K-Means


---
Source attribution: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Data & Analytics, Development & Engineering
Roles: Data Scientist, ML / AI Engineer, Security Engineer
Specialties: Backend
Tools: Keras, Pandas, Python, Scikit Learn
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 001e7758bde565116736dcfd8efcf7a7d4dffd00d56dd9ac9f5bb5e147192afa
