closes #12 - Abhishek#28
Open
abhishekreddy22 wants to merge 4 commits into
Open
Conversation
Had completed the task but put the contents of PULL_REQUEST_TEMPLATE.md in README.md
There was some issue, most of the files were not pushed correctly, i pushed them in this commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Related Issue
Closes # 12
Task Summary
Provide a brief overview of your implementation.
What did you implement?
Implemented the Isolation Forest model for detecting anomalous mammography data
What approach did you follow?
I extracted the data from a csv file,
selected the features to detect the anomaly
used dropna() to eliminate rows with missing values
used StandardScaler to scale features
split the data into test and train (test=0.1)
trained the isolation forest model
used iso_forest.predict() to get the number of anomaly
used matplotlib to plot the data
Dataset
Dataset Source: OpenML
Preprocessing
Handled missing values with pandas' built in function df.dropna()
which drops rows with NaN
Found out using SHAP, that col 4/5/6 were the major contributors to the model and rest of the columns were just noise, omitting col 1/2/3 increased f1_score drastically
Omitted using Standard Scaler as the the data was already scaled
Model Configuration
List the important hyperparameters used.
Evaluation Results
Visualizations
Attach at least 2 plots from your analysis.
Confusion Matrix

Scatter Plot

Key Observations
Briefly summarize:
What worked well?
The most important function that helped tune the model better was precision_recall_curve(), which helped me know the exact threshold value, instead of blindly going for predict()
Which hyperparameter had the biggest impact?
3 Main hyperparameters Contamination|n_estimators|max_samples had high impacts on f1score, especially Contamination and max_features
Any interesting findings?\
Challenges faced (if any)
Most of the challenge faced was getting familiar with the syntax of different libraries, and researching how to improve the f1_score took a lot of time
initial f1_score: 0.264
final f1_score: 0.535
Understanding how to evaluate the model (i.e implementing the precision_score etc) was a big challenge due to different conventions among OpenML|Isolation_Forest|Precision_Score
Checklist
.ipynb) included