Code Monkey home page Code Monkey logo

crossvalidation's Introduction

CrossValidation Plugin

This repo contains the CrossValidation tool in Alteryx. Shown below is a brief description of the contents.

File Description
CrossValidationConfig.xml Configuration for plugin (auto generated)
app.css Custom style sheet for Gui.html
Macros/ Macro backend
Extras/ Gui, Tests, Samples and Help

Development

Use branches to work on features and bug fixes. Commit often. Send a PR to the upstream repo to merge your changes back in. Make sure to sync your clone with the upstream repo before sending a PR, so that merge conflicts are avoided.

The source files that will be modified directly include

  1. Macros/CrossValidation.yxmc (backend)
  2. Macros/CrossValidation1.R (backend)
  3. Extras/Gui/overrides.yaml (gui)
  4. Extras/Gui/layout.html (gui)
  5. Extras/Gui/App/src/* (gui)

Whenever you manipulate one of these source files, you can run the createPluginFromMacro() function shown below to update the plugin and then run copyHtmlPlugin to install it in Alteryx. Make sure that your working directory is the plugin directory and also remember to set options(alterx.path = <path to alteryx directory>) before the install.

library(AlteryxRhelper)
options(alteryx.path = <path to alteryx>)
createPluginFromMacro()
copyHtmlPlugin()

crossvalidation's People

Contributors

btoomey avatar ramnathv avatar johnkabler avatar

Watchers

James Cloos avatar  avatar  avatar

crossvalidation's Issues

Naive Bayes model call does not store Laplace parameter

The model call appears to not store the Laplace smoothing parameter from Naive Bayes models. Thus, the tool currently errors when these models are used. We need to figure out an appropriate way to deal with this issue. Some ideas include:

  1. Re-factor the Alteryx Naive Bayes tool to add the Laplace parameter and use it in the code.
  2. Skip NB models and warn the user that they're not being examined in the C-V tool.
  3. Assume that the Laplace parameter is 0 (or some other value) and warn the user that this assumption is being made.

Refactor library loading code

This refers to these lines. We can replace this safely by this function. The key advantage is that you only need to update the package map when support is added for more models.

#' Load packages based on a set of model classes. 
#' 
#' @param models list of model objects
#' @export
getPkgListForModels <- function(models, load = FALSE){
  modelClasses <- unlist(lapply(models, class))
  pkgMap = list(
    gbm = "gbm", rpart = "rpart", svm.formula = "e1071", svm = "e1071",
    naiveBayes = "e1071", svyglm = "survey", nnet.formula = "nnet",
    randomForest.formula = "randomForest", earth = "earth"
  )
  pkgsToLoad <- unique(unlist(pkgMap[modelClasses]))
  if (load){
    for(pkg in pkgsToLoad) library(pkg, character.only = TRUE)
  } 
  pkgsToLoad
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.