Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ruleheat

RuleHeatmap


Description

Produces a heatmap that allows to identify what observations are covered by the most important decision rules. Details can be found in Nalenz & Villani (2017).

Usage

ruleheat(model, k)

Arguments

model

list containing a model of class "HorseRuleFit".

k

number of most important rules to be shown in the RuleHeat plot. library(MASS) data(Boston) # Split in train and test data N = nrow(Boston) train = sample(1:N, 400) Xtrain = Boston[train,-14] ytrain = Boston[train, 14] Xtest = Boston[-train, -14] ytest = Boston[-train, 14]

hrres = HorseRuleFit(X = Xtrain, y=ytrain, thin=1, niter=200, burnin=10, L=5, S=6, ensemble = "both", mix=0.3, ntree=100, intercept=FALSE, linterms=1:13, ytransform = "log", alpha=1, beta=2, linp = 1, restricted = 0)

#Create a ruleheat plot. ruleheat(hrres = 10)


horserule

Flexible Non-Linear Regression with the HorseRule Algorithm

v1.0.0
GPL-3
Authors
Malte Nalenz <malte.nlz@googlemail.com>, Mattias Villani <mattias.villani@liu.se>
Initial release
2018-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.