diff --git a/src/machine_learning/nearest_neighbour/CrossValidation.java b/src/machine_learning/nearest_neighbour/CrossValidation.java index f19f4d6..8087217 100644 --- a/src/machine_learning/nearest_neighbour/CrossValidation.java +++ b/src/machine_learning/nearest_neighbour/CrossValidation.java @@ -12,8 +12,8 @@ import java.util.stream.IntStream; public class CrossValidation { - private int paramMin; - private int paramMax; + private final int paramMin; + private final int paramMax; public CrossValidation(int paramMin, int paramMax) { diff --git a/src/machine_learning/nearest_neighbour/KNearestNeighbour.java b/src/machine_learning/nearest_neighbour/KNearestNeighbour.java index 2dea8c7..6e63038 100644 --- a/src/machine_learning/nearest_neighbour/KNearestNeighbour.java +++ b/src/machine_learning/nearest_neighbour/KNearestNeighbour.java @@ -15,9 +15,9 @@ public class KNearestNeighbour implements MachineLearning private List positives; private List negatives; - private Distance distance; + private final Distance distance; - private int k; + private final int k; public KNearestNeighbour(Distance distance) {