Hi, and welcome!
First off, English is a world language, spoken and written many different ways, even within the countries where it is the dominant language. There is no single right
way to express a thought in English and everybody who uses English experiences difficulties in communication and/or feels unsure about it. Don't here. If we don't understand a question, we'll ask for clarifications.
Second, if applicable, see the homework policy. This is such a general question, that most of that need not apply here.
Third, a reproducible example, called a reprex is always very helpful in attracting more and better answers. The data can be an extract of the data you are using or, ideally, a built-in R
dataset with the same structure or code to transform it into the same structure. (I get a lot of mileage out of mtcars
that way!)
Both your questions depend quite a bit on the specific neural network package that you are using. With a reprex
, the community can look at the possibility and offer advice.
Often it comes down to a key insight: Using R
is school algebra f(x) = y writ large. The key is understanding the arguments to f() and the results.