Learn R Programming

kinn (version 0.2)

kinn.plot: Plots model graphs and (optional) saves them as files in a gml format

Description

Plots model graphs and (optional) saves them as files in a gml format

Usage

kinn.plot(gmodel, filename = NULL)

Arguments

gmodel
kinn model generated from kinn function
filename
prefix for the subgraphs files in gml format(optional)

Examples

Run this code
library(kinn)
library(caret)
x<-runif(100,min = 0,max=10)
e<-rnorm(100)
y<-2*x+3+e
df<-data.frame(x,y)
inTrain <- createDataPartition(y = df$y, p = 0.7, list = FALSE)
train <-df[inTrain, ]
test <- df[-inTrain, ]
model=kinn.train("y~x",train)
kinn.plot(model,'subgraphfile')

Run the code above in your browser using DataLab