% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hnp_package.r
\name{train_nn_and_get_scores}
\alias{train_nn_and_get_scores}
\title{Neural Network Classifier Helper Function}
\usage{
train_nn_and_get_scores(X, Y)
}
\arguments{
\item{X}{A data.frame or matrix of predictors/features.}

\item{Y}{A vector or factor of class labels of length \code{nrow(X)}, with at
least two classes.}
}
\value{
A list with components: \code{model} (the fitted \code{nnet} object),
\code{class_levels} (the ordered class labels), and \code{feature_names} (the column
names of \code{X}).
}
\description{
Fit a single-hidden-layer softmax neural network
(\code{nnet::nnet}) for multi-class classification and return the trained model
together with the metadata needed to produce class scores. This can be used
to supply a pretrained scoring model to the HNP Umbrella pipeline.
}
\examples{
set.seed(123)
X <- data.frame(x1 = rnorm(60), x2 = rnorm(60))
Y <- factor(sample(c("1", "2", "3"), 60, replace = TRUE))
fit <- train_nn_and_get_scores(X, Y)
}
