Commit c56c5069 authored by wuzekai's avatar wuzekai

修复了神经网络界面的bug

parent 4bde86d7
......@@ -112,6 +112,7 @@ export(repeater)
export(rforest)
export(rig)
export(scale_df)
export(scale_sv)
export(sdw)
export(sensitivity)
export(sim_cleaner)
......
This diff is collapsed.
......@@ -60,7 +60,7 @@ svm <- function(dataset, rvar, evar,
# 标准化
if ("standardize" %in% check) {
dataset <- scale_df(dataset)
dataset <- scale_sv(dataset)
}
## ---- 3. 分类任务的响应变量 ----
......@@ -135,7 +135,7 @@ svm <- function(dataset, rvar, evar,
#' Center or standardize variables in a data frame
#' @export
scale_df <- function(dataset, center = TRUE, scale = TRUE,
scale_sv <- function(dataset, center = TRUE, scale = TRUE,
sf = 2, wts = NULL, calc = TRUE) {
isNum <- sapply(dataset, function(x) is.numeric(x))
if (length(isNum) == 0 || sum(isNum) == 0) {
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R, R/svm.R
% Please edit documentation in R/nn.R
\name{scale_df}
\alias{scale_df}
\title{Center or standardize variables in a data frame}
\usage{
scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
}
\arguments{
......@@ -25,7 +23,5 @@ scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
Scaled data frame
}
\description{
Center or standardize variables in a data frame
Center or standardize variables in a data frame
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svm.R
\name{scale_sv}
\alias{scale_sv}
\title{Center or standardize variables in a data frame}
\usage{
scale_sv(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
}
\description{
Center or standardize variables in a data frame
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment