项目作者: hosein-m

项目描述 :
Forward and backward feature selection with adjusted R squared in R
高级语言: R
项目地址: git://github.com/hosein-m/R_FeatureSelection.git
创建时间: 2020-07-05T15:51:50Z
项目社区:https://github.com/hosein-m/R_FeatureSelection

开源协议:

下载


R_FeatureSelection

Forward and backward feature selection with adjusted R squared in R

Usage

  1. dataset_path <- "./insurance.csv"
  2. data <- read.csv(dataset_path, header=TRUE, sep=',')
  3. data$children <- as.factor(data$children)
  4. # Backward Selection with Adjusted R Squared:
  5. reg_backw <- backwardSelection_adjRsquared(data, response = "charges", verbose = TRUE)
  6. # Forward Selection with Adjusted R Squared:
  7. reg_forw <- forwardSelection_adjRsquared(data, response = "charges", verbose = TRUE)