% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LearnerClassifFeatureless.R
\name{mlr_learners_classif.featureless}
\alias{mlr_learners_classif.featureless}
\alias{LearnerClassifFeatureless}
\title{Featureless Classification Learner}
\description{
A simple \link{LearnerClassif} which only analyzes the labels during train, ignoring all features.
Hyperparameter \code{method} determines the mode of operation during prediction:
\describe{
\item{mode:}{
Predicts the most frequent label. If there are two or more labels tied, randomly selects one per prediction.
Probabilities correspond to the relative frequency of the class labels in the training set.
For weighted data, the label(s) with the highest weighted frequency are selected.
}
\item{sample:}{
Randomly predict a label uniformly.
Probabilities correspond to a uniform distribution of class labels, i.e. 1 divided by the number of classes.
Weights are ignored, if present.
}
\item{weighted.sample:}{
Randomly predict a label, with probability estimated from the training distribution.
For consistency, probabilities are 1 for the sampled label and 0 for all other labels.
For weighted data, sample weights are used to weight the class labels.
}
}
}
\section{Dictionary}{

This \link{Learner} can be instantiated via the \link[mlr3misc:Dictionary]{dictionary} \link{mlr_learners} or with the associated sugar function \code{\link[=lrn]{lrn()}}:

\if{html}{\out{<div class="sourceCode">}}\preformatted{mlr_learners$get("classif.featureless")
lrn("classif.featureless")
}\if{html}{\out{</div>}}
}

\section{Meta Information}{

\itemize{
\item Task type: \dQuote{classif}
\item Predict Types: \dQuote{response}, \dQuote{prob}
\item Feature Types: \dQuote{logical}, \dQuote{integer}, \dQuote{numeric}, \dQuote{character}, \dQuote{factor}, \dQuote{ordered}, \dQuote{POSIXct}, \dQuote{Date}
\item Required Packages: \CRANpkg{mlr3}
}
}

\section{Parameters}{
\tabular{llll}{
   Id \tab Type \tab Default \tab Levels \cr
   method \tab character \tab mode \tab mode, sample, weighted.sample \cr
}
}

\seealso{
\itemize{
\item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}:
\url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html#sec-learners}
\item Package \CRANpkg{mlr3learners} for a solid collection of essential learners.
\item Package \href{https://github.com/mlr-org/mlr3extralearners}{mlr3extralearners} for more learners.
\item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Learner]{Learners}: \link{mlr_learners}
\item \code{as.data.table(mlr_learners)} for a table of available \link[=Learner]{Learners} in the running session (depending on the loaded packages).
\item \CRANpkg{mlr3pipelines} to combine learners with pre- and postprocessing steps.
\item Package \CRANpkg{mlr3viz} for some generic visualizations.
\item Extension packages for additional task types:
\itemize{
\item \CRANpkg{mlr3proba} for probabilistic supervised regression and survival analysis.
\item \CRANpkg{mlr3cluster} for unsupervised clustering.
}
\item \CRANpkg{mlr3tuning} for tuning of hyperparameters, \CRANpkg{mlr3tuningspaces}
for established default tuning spaces.
}

Other Learner:
\code{\link{Learner}},
\code{\link{LearnerClassif}},
\code{\link{LearnerRegr}},
\code{\link{mlr_learners}},
\code{\link{mlr_learners_classif.debug}},
\code{\link{mlr_learners_classif.rpart}},
\code{\link{mlr_learners_regr.debug}},
\code{\link{mlr_learners_regr.featureless}},
\code{\link{mlr_learners_regr.rpart}}
}
\concept{Learner}
\section{Super classes}{
\code{\link[mlr3:Learner]{Learner}} -> \code{\link[mlr3:LearnerClassif]{LearnerClassif}} -> \code{LearnerClassifFeatureless}
}
\section{Methods}{
\subsection{Public methods}{
  \itemize{
    \item \href{#method-LearnerClassifFeatureless-initialize}{\code{LearnerClassifFeatureless$new()}}
    \item \href{#method-LearnerClassifFeatureless-importance}{\code{LearnerClassifFeatureless$importance()}}
    \item \href{#method-LearnerClassifFeatureless-selected_features}{\code{LearnerClassifFeatureless$selected_features()}}
    \item \href{#method-LearnerClassifFeatureless-clone}{\code{LearnerClassifFeatureless$clone()}}
  }
}
\if{html}{\out{<details><summary>Inherited methods</summary>
<ul>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="base_learner"><a href='../../mlr3/html/Learner.html#method-Learner-base_learner'><code>Learner$base_learner()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="configure"><a href='../../mlr3/html/Learner.html#method-Learner-configure'><code>Learner$configure()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="encapsulate"><a href='../../mlr3/html/Learner.html#method-Learner-encapsulate'><code>Learner$encapsulate()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="format"><a href='../../mlr3/html/Learner.html#method-Learner-format'><code>Learner$format()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="help"><a href='../../mlr3/html/Learner.html#method-Learner-help'><code>Learner$help()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="predict"><a href='../../mlr3/html/Learner.html#method-Learner-predict'><code>Learner$predict()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="predict_newdata"><a href='../../mlr3/html/Learner.html#method-Learner-predict_newdata'><code>Learner$predict_newdata()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="print"><a href='../../mlr3/html/Learner.html#method-Learner-print'><code>Learner$print()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="reset"><a href='../../mlr3/html/Learner.html#method-Learner-reset'><code>Learner$reset()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="Learner" data-id="train"><a href='../../mlr3/html/Learner.html#method-Learner-train'><code>Learner$train()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3" data-topic="LearnerClassif" data-id="predict_newdata_fast"><a href='../../mlr3/html/LearnerClassif.html#method-LearnerClassif-predict_newdata_fast'><code>LearnerClassif$predict_newdata_fast()</code></a></span></li>
</ul>
</details>}}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-LearnerClassifFeatureless-initialize"></a>}}
\if{latex}{\out{\hypertarget{method-LearnerClassifFeatureless-initialize}{}}}
\subsection{\code{LearnerClassifFeatureless$new()}}{
  Creates a new instance of this \link[R6:R6Class]{R6} class.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{LearnerClassifFeatureless$new()}
    \if{html}{\out{</div>}}
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-LearnerClassifFeatureless-importance"></a>}}
\if{latex}{\out{\hypertarget{method-LearnerClassifFeatureless-importance}{}}}
\subsection{\code{LearnerClassifFeatureless$importance()}}{
  All features have a score of \code{0} for this learner.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{LearnerClassifFeatureless$importance()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    Named \code{numeric()}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-LearnerClassifFeatureless-selected_features"></a>}}
\if{latex}{\out{\hypertarget{method-LearnerClassifFeatureless-selected_features}{}}}
\subsection{\code{LearnerClassifFeatureless$selected_features()}}{
  Selected features are always the empty set for this learner.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{LearnerClassifFeatureless$selected_features()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    \code{character(0)}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-LearnerClassifFeatureless-clone"></a>}}
\if{latex}{\out{\hypertarget{method-LearnerClassifFeatureless-clone}{}}}
\subsection{\code{LearnerClassifFeatureless$clone()}}{
  The objects of this class are cloneable with this method.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{LearnerClassifFeatureless$clone(deep = FALSE)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{deep}}{Whether to make a deep clone.}
    }
    \if{html}{\out{</div>}}
  }
}

}
