Skip to content

Commit

Permalink
supported ensembles for libsvm (radial kernel)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtesei committed Oct 1, 2015
1 parent b6cd638 commit a6e7d55
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R-package/R/fastRegression.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ xgb_cross_val = function( data ,
gc()
}
} else {
bst.cv = ff.xgb.cv(param=param, data = data, label = y,
bst.cv = ff.xgb.cv(params=param, data = data, label = y,
nfold = nfold, nrounds=cv.nround , folds = foldList,
feval = xgb.metric.fun , maximize = xgb.maximize, verbose=FALSE)

Expand Down Expand Up @@ -217,17 +217,16 @@ removePredictorsMakingIllConditionedSquareMatrix_IFFragileLinearModel = function
fragile_LinearModels = c('glm','pls','lda')
}

removePredictorsMakingIllConditionedSquareMatrix = TRUE
if (! model.label %in% fragile_LinearModels || ! removePredictorsMakingIllConditionedSquareMatrix_forLinearModels) {
return (list(
Xtrain = Xtrain,
Xtest = Xtest))
removePredictorsMakingIllConditionedSquareMatrix = FALSE
}

l = ff.featureFilter (Xtrain,
Xtest,
removeOnlyZeroVariacePredictors=TRUE,
performVarianceAnalysisOnTrainSetOnly = TRUE ,
removePredictorsMakingIllConditionedSquareMatrix = TRUE,
removePredictorsMakingIllConditionedSquareMatrix = removePredictorsMakingIllConditionedSquareMatrix,
removeHighCorrelatedPredictors = FALSE,
featureScaling = FALSE)

Expand Down

0 comments on commit a6e7d55

Please sign in to comment.