0

Am working with R language and am trying to get accuracy for testing data and am having trained data sets in .CSV format

I've tried to run the program but it does't working I need help with that

train<-read.csv('LOCATION OF THE CSV FILE')
test<-read.csv('LOCATION OF THE CSV FILE')

train<-data.matrix(train)
test<-data.matrix(test)

train.x<-train[,1:15] #what is meaning of the line...?
train.y<-train[,16]  #use of this line how to select the value

train.x<-t(train.x/255)  # what is the use of 255 value 

test_org<-test  # explain the lines

test<-test[,1:15]
test<-t(test/255)

table(train.y)
train.y

This is my part of code I get this code from website and I need help with this code.

Wil
  • 3,076
  • 2
  • 12
  • 31
  • please provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) by providing example data and explicitly stating your expected results and how they differ from your actual results. – Wil Mar 26 '19 at 16:16
  • Sir, Am new to stack overflow i'll send whole program please explain the program. – Sivachandiran V Mar 26 '19 at 16:21
  • I understand you are new and we are happy to have you. Asking us to explain the program is too broad of a question. You stated that the program doesn't work, but you haven't told us what "doesn't work" means. We need you to tell us what it is doing and how that is different from what you are expecting it to do, and we also need the data used in the example, otherwise we cannot reproduce your problem to help you solve it. – Wil Mar 26 '19 at 16:32
  • It's hard to help without being able to see any of your data or knowing what exactly is going wrong ("it doesn't work" isn't very specific). For example, dividing by 255 probably has some relevance to your data, but without seeing it, we don't know. The link in the first comment shows you how to set up a question we can help with, even if you're new to SO; [this one](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) helps with R-specific posts – camille Mar 26 '19 at 16:33

0 Answers0