概率回归的POLR失败

时间:2020-06-01 12:47:55

标签: r regression

我正在尝试使用以下设置来调整一些模型以为实验做准备:


export const Types = {
  PAUSE: 'player/PAUSE',
};

const initialState = {
  status: 'PLAYING',
};

export default function reducer(state = initialState, action) {
  switch (action.type) {
    case Types.PAUSE:
      return { ...state, status: 'PAUSE' };
    default:
      return state;
  }
}

// Action Creators
export function pause() {
  return dispatch => {
    dispatch({
       type: Types.PAUSE
    });
  };
}

我加载了必要的库和默认数据集:



R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Microsoft R Open 3.5.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2019 Microsoft

Loading Microsoft Machine Learning Server packages, version 9.4.7.
Type 'readme()' for release notes, privacy() for privacy policy, or
'RevoLicense()' for licensing information.

Using the Intel MKL for parallel mathematical computing (using 6 cores).
Default CRAN mirror snapshot taken on 2019-02-01.
See: https://mran.microsoft.com/.

运行这段代码时,出现以下错误和警告:

# load libraries
library(mlbench)
library(caret)
library(doMC)
registerDoMC(cores=8)

# load data
data(PimaIndiansDiabetes)
dataset <- PimaIndiansDiabetes
x <- dataset[,1:8]
y <- dataset[,9]

# prepare simple test suite
control <- trainControl(method="cv", number=5)
seed <- 7
metric <- "Accuracy"

# Ordered Logistic or Probit Regression
set.seed(seed)
fit.polr <- train(diabetes~., data=dataset, method="polr", metric=metric, preProc=c("center", "scale"), trControl=control)

我不确定如何更正这些错误。

0 个答案:

没有答案
相关问题