Commit 4c0f7562 authored by wuzekai's avatar wuzekai

update

parent 811c8b90
...@@ -11,6 +11,7 @@ RUN echo 'options(radiant.shinyFiles = FALSE)' >> /usr/local/lib/R/etc/Rprofile. ...@@ -11,6 +11,7 @@ RUN echo 'options(radiant.shinyFiles = FALSE)' >> /usr/local/lib/R/etc/Rprofile.
COPY . /srv/shiny-server/ COPY . /srv/shiny-server/
COPY set_path.R /usr/local/lib/R/etc/Rprofile.site.d/00-radiant-path.R COPY set_path.R /usr/local/lib/R/etc/Rprofile.site.d/00-radiant-path.R
RUN echo 'source("/srv/shiny-server/radiant.model/R/coxp.R")' >> /usr/local/lib/R/etc/Rprofile.site RUN echo 'source("/srv/shiny-server/radiant.model/R/coxp.R")' >> /usr/local/lib/R/etc/Rprofile.site
Run echo 'load("/srv/shiny-server/data/test.state.rda")' >> /usr/local/lib/R/etc/Rprofile.site
# 安装所有模块 # 安装所有模块
RUN R -e "remotes::install_local('/srv/shiny-server/radiant.data',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" RUN R -e "remotes::install_local('/srv/shiny-server/radiant.data',dependencies=TRUE, type='source', upgrade='never',force=TRUE)"
...@@ -22,7 +23,6 @@ RUN R -e "remotes::install_local('/srv/shiny-server/radiant.quickgen',dependenci ...@@ -22,7 +23,6 @@ RUN R -e "remotes::install_local('/srv/shiny-server/radiant.quickgen',dependenci
RUN R -e "remotes::install_local('/srv/shiny-server/radiant-master',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" RUN R -e "remotes::install_local('/srv/shiny-server/radiant-master',dependencies=TRUE, type='source', upgrade='never',force=TRUE)"
WORKDIR /data WORKDIR /data
RUN R -e "load('/data/test.state.rda')"
CMD ["R", "-e", "radiant::radiant(host='0.0.0.0', port=3838)"] CMD ["R", "-e", "radiant::radiant(host='0.0.0.0', port=3838)"]
#docker images | grep radiant 查看镜像 #docker images | grep radiant 查看镜像
......
This source diff could not be displayed because it is too large. You can view the blob instead.
name,alignment,gender,publisher Thor,good,male,Marvel Iron Man,good,male,Marvel Hulk,good,male,Marvel Hawkeye,good,male,Marvel Black Widow,good,female,Marvel Captain America,good,male,Marvel Magneto,bad,male,Marvel
\ No newline at end of file
This diff is collapsed.
name,alignment,gender,publisher Magneto,bad,male,Marvel Storm,good,female,Marvel Mystique,bad,female,Marvel Batman,good,male,DC Joker,bad,male,DC Catwoman,bad,female,DC Hellboy,good,male,Dark Horse Comics
\ No newline at end of file
No preview for this file type
...@@ -1192,3 +1192,8 @@ Survival curves,生存曲线,coxp_ui.R ...@@ -1192,3 +1192,8 @@ Survival curves,生存曲线,coxp_ui.R
Cumulative hazard,累积风险,coxp_ui.R Cumulative hazard,累积风险,coxp_ui.R
Schoenfeld residuals,Schoenfeld残差图,coxp_ui.R Schoenfeld residuals,Schoenfeld残差图,coxp_ui.R
Martingale residuals,鞅残差图,coxp_ui.R Martingale residuals,鞅残差图,coxp_ui.R
Decimal places:,小数位数:,svm_ui.R
AI chat guidance,大模型对话引导助手,init.R
One-click generation > AI chat guidance,一键生成 > 大模型对话引导助手,init.R
Decision Boundary (2 vars),决策边界(两变量),svm_ui.R
Support Vectors & Margin(2 vars),支持向量与间隔(两变量),svm_ui.R
...@@ -42,6 +42,7 @@ Imports: ...@@ -42,6 +42,7 @@ Imports:
vip (>= 0.3.2), vip (>= 0.3.2),
stringi, stringi,
yaml, yaml,
survminer,
shiny.i18n shiny.i18n
Suggests: Suggests:
testthat (>= 2.0.0), testthat (>= 2.0.0),
......
...@@ -20,6 +20,7 @@ S3method(plot,repeater) ...@@ -20,6 +20,7 @@ S3method(plot,repeater)
S3method(plot,rforest) S3method(plot,rforest)
S3method(plot,rforest.predict) S3method(plot,rforest.predict)
S3method(plot,simulater) S3method(plot,simulater)
S3method(plot,svm)
S3method(plot,uplift) S3method(plot,uplift)
S3method(predict,coxp) S3method(predict,coxp)
S3method(predict,crtree) S3method(predict,crtree)
...@@ -84,6 +85,7 @@ export(cv.crtree) ...@@ -84,6 +85,7 @@ export(cv.crtree)
export(cv.gbt) export(cv.gbt)
export(cv.nn) export(cv.nn)
export(cv.rforest) export(cv.rforest)
export(cv.svm)
export(dtree) export(dtree)
export(dtree_parser) export(dtree_parser)
export(evalbin) export(evalbin)
......
...@@ -15,8 +15,6 @@ coxp <- function(dataset, ...@@ -15,8 +15,6 @@ coxp <- function(dataset,
if (!requireNamespace("survival", quietly = TRUE)) if (!requireNamespace("survival", quietly = TRUE))
stop("survival package is required but not installed.") stop("survival package is required but not installed.")
attachNamespace("survival")
on.exit(detach("package:survival"), add = TRUE)
## ---- 公式入口 ---------------------------------------------------------- ## ---- 公式入口 ----------------------------------------------------------
if (!missing(form)) { if (!missing(form)) {
......
This diff is collapsed.
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svm.R
\name{cv.svm}
\alias{cv.svm}
\title{Cross-validation for SVM}
\usage{
cv.svm(
object,
K = 5,
repeats = 1,
kernel = c("linear", "radial"),
cost = seq(0.1, 10, by = 0.5),
gamma = seq(0.1, 5, by = 0.5),
seed = 1234,
trace = TRUE,
fun,
...
)
}
\description{
Cross-validation for SVM
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svm.R
\name{plot.svm}
\alias{plot.svm}
\title{Plot method for the svm function}
\usage{
\method{plot}{svm}(
x,
plots = "vip",
size = 12,
nrobs = -1,
incl = NULL,
incl_int = NULL,
shiny = FALSE,
custom = FALSE,
...
)
}
\description{
Plot method for the svm function
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
% Please edit documentation in R/svm.R % Please edit documentation in R/svm.R
\name{predict.svm} \name{predict.svm}
\alias{predict.svm} \alias{predict.svm}
\title{Predict method} \title{Predict method for the svm function}
\usage{ \usage{
\method{predict}{svm}( \method{predict}{svm}(
object, object,
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
) )
} }
\description{ \description{
Predict method Predict method for the svm function
} }
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
% Please edit documentation in R/svm.R % Please edit documentation in R/svm.R
\name{print.svm.predict} \name{print.svm.predict}
\alias{print.svm.predict} \alias{print.svm.predict}
\title{Print predictions} \title{Print method for predict.svm}
\usage{ \usage{
\method{print}{svm.predict}(x, ..., n = 10) \method{print}{svm.predict}(x, ..., n = 10)
} }
\description{ \description{
Print predictions Print method for predict.svm
} }
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R % Please edit documentation in R/nn.R, R/svm.R
\name{scale_df} \name{scale_df}
\alias{scale_df} \alias{scale_df}
\title{Center or standardize variables in a data frame} \title{Center or standardize variables in a data frame}
\usage{ \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) scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
} }
\arguments{ \arguments{
...@@ -23,5 +25,7 @@ scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE) ...@@ -23,5 +25,7 @@ scale_df(dataset, center = TRUE, scale = TRUE, sf = 2, wts = NULL, calc = TRUE)
Scaled data frame Scaled data frame
} }
\description{ \description{
Center or standardize variables in a data frame
Center or standardize variables in a data frame Center or standardize variables in a data frame
} }
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
% Please edit documentation in R/svm.R % Please edit documentation in R/svm.R
\name{summary.svm} \name{summary.svm}
\alias{summary.svm} \alias{summary.svm}
\title{Summary method} \title{Summary method for the svm function}
\usage{ \usage{
\method{summary}{svm}(object, ...) \method{summary}{svm}(object, prn = TRUE, ...)
} }
\description{ \description{
Summary method Summary method for the svm function
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
% Please edit documentation in R/svm.R % Please edit documentation in R/svm.R
\name{svm} \name{svm}
\alias{svm} \alias{svm}
\title{Support Vector Machine using e1071} \title{Support Vector Machine}
\usage{ \usage{
svm( svm(
dataset, dataset,
...@@ -12,15 +12,10 @@ svm( ...@@ -12,15 +12,10 @@ svm(
lev = "", lev = "",
kernel = "radial", kernel = "radial",
cost = 1, cost = 1,
gamma = "auto", gamma = 1,
degree = 3,
coef0 = 0,
nu = 0.5,
epsilon = 0.1,
probability = FALSE,
wts = "None", wts = "None",
seed = 1234, seed = NA,
check = NULL, check = "standardize",
form, form,
data_filter = "", data_filter = "",
arr = "", arr = "",
...@@ -29,5 +24,5 @@ svm( ...@@ -29,5 +24,5 @@ svm(
) )
} }
\description{ \description{
Support Vector Machine using e1071 Support Vector Machine
} }
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R % Please edit documentation in R/nn.R, R/svm.R
\name{varimp} \name{varimp}
\alias{varimp} \alias{varimp}
\title{Variable importance using the vip package and permutation importance} \title{Variable importance using the vip package and permutation importance}
\usage{ \usage{
varimp(object, rvar, lev, data = NULL, seed = 1234)
varimp(object, rvar, lev, data = NULL, seed = 1234) varimp(object, rvar, lev, data = NULL, seed = 1234)
} }
\arguments{ \arguments{
...@@ -18,5 +20,7 @@ varimp(object, rvar, lev, data = NULL, seed = 1234) ...@@ -18,5 +20,7 @@ varimp(object, rvar, lev, data = NULL, seed = 1234)
\item{seed}{Random seed for reproducibility} \item{seed}{Random seed for reproducibility}
} }
\description{ \description{
Variable importance using the vip package and permutation importance
Variable importance using the vip package and permutation importance Variable importance using the vip package and permutation importance
} }
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R % Please edit documentation in R/nn.R, R/svm.R
\name{varimp_plot} \name{varimp_plot}
\alias{varimp_plot} \alias{varimp_plot}
\title{Plot permutation importance} \title{Plot permutation importance}
\usage{ \usage{
varimp_plot(object, rvar, lev, data = NULL, seed = 1234)
varimp_plot(object, rvar, lev, data = NULL, seed = 1234) varimp_plot(object, rvar, lev, data = NULL, seed = 1234)
} }
\arguments{ \arguments{
...@@ -18,5 +20,7 @@ varimp_plot(object, rvar, lev, data = NULL, seed = 1234) ...@@ -18,5 +20,7 @@ varimp_plot(object, rvar, lev, data = NULL, seed = 1234)
\item{seed}{Random seed for reproducibility} \item{seed}{Random seed for reproducibility}
} }
\description{ \description{
Plot permutation importance
Plot permutation importance Plot permutation importance
} }
# === 配置 === # === 配置 ===
MODELSCOPE_OPENAI_URL <- "https://api-inference.modelscope.cn/v1" MODELSCOPE_OPENAI_URL <- "https://api-inference.modelscope.cn/v1"
MODELSCOPE_API_KEY <- Sys.getenv("MODELSCOPE_API_KEY", "ms-6638b00e-57e4-4623-996d-214e375d220f") MODELSCOPE_API_KEY <- Sys.getenv("MODELSCOPE_API_KEY", "ms-5b9f3668-ea8e-4a2c-8cd3-a1a9ba04810b")
MODEL_ID <- "deepseek-ai/DeepSeek-V3.1" MODEL_ID <- "deepseek-ai/DeepSeek-V3.1"
# === 低层封装:单次对话 === # === 低层封装:单次对话 ===
......
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