top of page
Completed
Wellesley High School

Breast Cancer Predication Algorithm with Java

Using AP CSA (Computer Science Advanced) knowledge to create an algorithm that can categorize breast cancer tumors as low, moderate, or high risk of malignancy.

TIMELINE
2026
FIELD
Data science & 
Computer science
ROLE
Student Researcher
STATUS
Completed
PROJECT OVERVIEW

In this project, I sourced a famous breast cancer dataset from the University of Wisconsin to help classify a new tumor as low, medium, or high risk based off the following variables:
1.  Area
2. Texture
3. Concavity
4. Concavity points

Though I also considered:
5. Smoothness
6. Perimeter
7. Radius

Click HERE to find the dataset I used on Kaggle.

In the dataset, most variables are in decimal form (ie. smoothness = local variation in radius length, concavity = severity of concave portions of contour), which makes them numerically interpretable. Input values correspond to features extracted from digitized images of fine needle aspirates (FNA) of breast masses in the Wisconsin Diagnostic Breast Cancer dataset.

My program has two main classes: CancerAnalysis and Patient. The prior contains the main class and performs all the computations, while the latter creates an object for each patient with their individual parameters. 

CODE OVERVIEW
THE SCORING SYSTEM
HOW ARE TUMORS SCORED?

The scoring system goes from 0-7, with higher scores corresponding to higher risk. The scale is:
0 - 1 = low risk
2 - 4 = medium risk
5 - 7 = high risk

Variables earn points depending on where they stand compared to low/high cutoffs. These cutoffs are determined by averages––the low cutoff is the average for the benign tumors in the dataset, while the high cutoff is the average for the malignant ones. However, the variables are weighed a bit differently, so they are not scored the same in relation to the cutoffs. The table below shows exact scoring:

Screenshot 2026-08-11 at 12.12.15 AM.png
FUTURE WORK

Drop Me a Line, Let Me Know What You Think

© 2035 by Train of Thoughts. Powered and secured by Wix

bottom of page