zmjones / mmpf Goto Github PK
View Code? Open in Web Editor NEWMonte-Carlo methods for prediction functions
Monte-Carlo methods for prediction functions
See mlr-org/mlr#2439. makeDesign
changes the order of data columns:
> colnames(iris)
[1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
> colnames(mmpf::makeDesign(iris, "Petal.Width", dim(iris)))
[1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Species" "Petal.Width"
which is fine by itself. However, when it is used in marginalPrediction
, the predict
function is then called with this reordered data, which breaks in some cases where predict
expects the order of columns to match the order during model fitting. A fix for this would be a design = design[colnames(vars)data)]
, or a change in makeDesign
that preserves column order.
I'm getting the following error, and it's not clear how to resolve this:
Error in marginalPrediction(sample.features[, -c("revenue_log_s")], "empcount_s", :
Assertion on 'x' failed: Must be of type 'data.frame', not 'logical'.
I successfully fit a randomForest model, and then call marginalPrediction like so:
mp = marginalPrediction(data[, -c('revenue_log_s')],
"empcount_s",
c(10, nrow(data)),
fit)
I'm not sure what 'x' is referring to, as the data I pass in the first row is a dataframe, and I'm sure that the second argument is supposed to be a character vector, and not a dataframe.
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.