Skip to content

Task Isolation Forest Model on ODDS Shuttle dataset#23

Open
NikhByte wants to merge 9 commits into
Tasksfrom
task-nikhil
Open

Task Isolation Forest Model on ODDS Shuttle dataset#23
NikhByte wants to merge 9 commits into
Tasksfrom
task-nikhil

Conversation

@NikhByte

@NikhByte NikhByte commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Related Issue

Closes #16


Task Summary

Provide a brief overview of your implementation.

  • What did you implement?
  • I trained a model on the shuttle ODDS dataset using the isolation forest to detect the the anomalies in the dataset. In this i learned the benchmarking and the evaluation of the anomaly detection in the unsupervised anomaly detection algorithm isolation forest.
  • What approach did you follow?
  • Firstly after importing the data and converted the data into the DataFrame i looked for the missing valeus(NaN) luckily there weren't any so there was almost no preprocessing required.
    Major Challenge i faced during training of the model was recalling the correct syntax and some libs, I took some help from the medium page.To decide the best parameters values like n_estimators,contamination and sample size i did some hard yakka, by running the loops to decide the n_estimators in range(1,700,50) luckily i got the highest f1 scores for values 101 and 151 but i took 100 because it had higher f1_score as well as auc_value both tending to one if i took approximaiton upto 2 decimal places.

Dataset

  • Mammography
  • Shuttle

Dataset Source:


Preprocessing

Describe any preprocessing performed.

  • Missing value handling - No,It has nil NaN values confirmed it by df.isnull().sum()==0
  • Feature scaling - No isolation forest can handle without scaling.
  • Encoding - No data contained the numeric values so not needed.
  • Feature selection - No verly low dimensionality.

Model Configuration

List the important hyperparameters used.

Hyperparameter Value
n_estimators 100
contamination 0.075
max_samples 256
max_features 1
random_state 42

Evaluation Results

Metric Value
Precision 0.9332
Recall 0.9789
F1-score 0.955
ROC-AUC (Optional) 0.9975

Visualizations

Attach at least 2 plots from your analysis.

anomalyscore confusionmatrix roc_auc_curve Screenshot From 2026-07-13 02-28-36

Key Observations

Briefly summarize:

  • What worked well?
  • Preprocessing,luckily it needed no preprocessing it featured low dimensional features(only 9) and all the data was numeric and there wasn't any NaN values.
  • Which hyperparameter had the biggest impact?
  • Contamination value.increasing it slightly helped me achieved the good f1_score,recall slight more auc_val.
  • Challenges faced (if any)
  • Since new to Isolation forest faced slight issues with syntax and libs.

Checklist

  • Code runs successfully
  • Notebook (.ipynb) included
  • Code is well-commented
  • README/documentation updated
  • At least 2 plots included
  • PR is linked to the corresponding issue

@NikhByte NikhByte changed the title Task nikhil Task Isolation Forest Model on OODS Shuttle dataset Jul 13, 2026
@NikhByte NikhByte changed the title Task Isolation Forest Model on OODS Shuttle dataset Task Isolation Forest Model on ODDS Shuttle dataset Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant