如何为.dae模型添加透明度?

时间:2017-01-12 04:01:12

标签: javascript three.js

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

other attached packages:
[1] DMwR_0.4.1          caret_6.0-70        ggplot2_2.1.0      
[4] lattice_0.20-34     forestFloor_1.9.5   randomForest_4.6-12
[7] mlbench_2.1-1

library(mlbench)
library(randomForest)
library(forestFloor)

data(PimaIndiansDiabetes)
y = PimaIndiansDiabetes$diabetes
X = PimaIndiansDiabetes
X = X[,!names(X)=="diabetes"]
rf.randomForest  = randomForest(X,y,sampsize=25,ntree=5000,mtry=4,
 keep.inbag = T,keep.forest = T)

## Use forestFloor on randomForest output, works great
ff = forestFloor(rf.randomForest,X,binary_reg = T,calc_np=T)
Col = fcol(ff,cols=1,outlier.lim = 2.5)
plot(ff,col=Col,plot_GOF = T)

## Now fit random forest using SMOTE from caret package
ctrl <- trainControl(method = "cv", number=5,
                     classProbs = TRUE,
                     summaryFunction = twoClassSummary,
                     sampling = "smote")
rf.SMOTE <- train(x=X,y=y,
                      method = "rf",
                      tuneGrid = data.frame(mtry = 3),
                      metric = "ROC",
                      trControl = ctrl,
                      keep.inbag=TRUE,
                      keep.forest=TRUE)
rf.caret <- rf.SMOTE$finalModel

## Use forestFloor on caret output, throws error
ff = forestFloor(rf.caret,X,binary_reg = T,calc_np=T)

1 个答案:

答案 0 :(得分:0)

尝试添加:

mesh7.material.transparent = true;
mesh7.material.opacity = 0.5;