Several errors running functions in FuzzyR

I am trying to implement an Adaptive Neuro-Fuzzy Inference System (ANFIS) using the FuzzyR package but I keep getting errors.
The complete codes are shown below.

The ANFIS code is for an eight-input and one-output system.

train = round(nrow(concrete)*.70)
test = round((nrow(concrete)-train)*0.5)
val <- 1030 = concrete[1:train,]    #training data set <-[sample(1:nrow(,] # shuffled training dataset = concrete[(train+1):(train+test),] #test data set <-[sample(1:nrow(,] = concrete[(train+test+1):(val), ]  #validation data set <-[sample(1:nrow(,] #shuffled validation data set = concrete[,1:8]  # input dataset
data.range <- matrix(0, ncol=2, nrow=ncol( #zero matrix for input ranges 
for (i in 1:ncol( {data.range[i,] = range([,i])}  #loop to fill zero matrix 
input.num <- 8

#number of membership functions in each fuzzy variable <- 4 <- 4 <- 4 <- 3 <- 3 <- 3 <- 4 <- 3

# total number of possible rules 
mf.num <- prod(,,,,,,,
# naive accuracy case 
naive.trn <-[,5]
naive.tst <-[,5]
naive.chk <-[, 5]
scale.mase <- mean(abs([,9] - naive.trn))
# rule base
rule.num <- 100
rule.which <- sort(sample(1:mf.num, rule.num))

#automated fis builder
concrete.strength <- fis.builder(x.range =  data.range, input.num = input.num, = mf.num, = 'T1', rule.num = rule.num, rule.which = rule.which, defuzzMethod = 'KM')

The code runs fine until it gets to fis.builder then It throws the following error.

Error in if (a == 0) a = 1 : missing value where TRUE/FALSE needed

I can't seem to understand what part of the code is causing these issues. Is there anyone that could be of assistance?
Thanks in advance

Edit: the problem has been solved. The issue was with the definition of the membership functions and the input data was is a dataframe instead of a matrix

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.