Skip to content

Commit

Permalink
Cosmetics, clone array of numbers to avoid modifying the original par…
Browse files Browse the repository at this point in the history
…ameters.
  • Loading branch information
arnocandel committed Sep 20, 2014
1 parent 7b2a507 commit 9062096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hex/deeplearning/DeepLearning.java
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ public final DeepLearningModel trainModel(DeepLearningModel model) {
if (class_sampling_factors != null) {
if (class_sampling_factors.length != train.lastVec().domain().length)
throw new IllegalArgumentException("class_sampling_factors must have " + train.lastVec().domain().length + " elements");
trainSamplingFactors = class_sampling_factors;
trainSamplingFactors = class_sampling_factors.clone(); //clone: don't modify the original
}
train = updateFrame(train, sampleFrameStratified(
train, train.lastVec(), trainSamplingFactors, (long)(mp.max_after_balance_size*train.numRows()), mp.seed, true, false));
Expand Down

0 comments on commit 9062096

Please sign in to comment.