% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitting-methods.R
\name{.fit_surface}
\alias{.fit_surface}
\title{Fitting the map surface}
\usage{
.fit_surface(X, y, npoints = 300, weights = NULL, knots = 10, rescale = FALSE)
}
\arguments{
\item{X}{Ordination; numerical matrix}

\item{y}{Expression values; numerical vector}

\item{npoints}{Number of points along x and y axis}

\item{weights}{Cluster states (defines weights based on fraction
of non-detects per state)}

\item{knots}{Number of knots in spline function}
}
\value{
A list containing the following components:
\item{\code{fit}}{GAM fit object}
\item{\code{grid}}{Fitted values}
}
\description{
Fits the smooth surface of CellTrails maps
}
\author{
Daniel C. Ellwanger
}
\keyword{internal}
