Classcenter
Jump to navigation
Jump to search
Purpose
Centers classes in data to the mean of each class.
Synopsis
- [ccx,mn,cls] = classcenter(x,classset); %calibrate using classset
- ccx = classcenter(x,mn,cls); %apply (classset = 1)
- ccx = classcenter(x,classset,mn,cls); %apply using specific classset
Description
Rows in the input data are centered by class. The result is that each class in the output will have mean response of zero. If no classes are present or all rows belong to the same class, this is equivalent to mean centering.
Inputs
- x = DataSet object to be class-centered.
Optional Inputs
- classset = Class set (from rows) which should be used to center data. Default is class set 1.
- mn = Means from previous call to classcenter. Must be passed with associated classes (see next input)
- cls = Classes associated with each mean (see previous). Used to apply previously-calculated means to new data.
Outputs
- ccx = Class-centered x. Dataset where each class has been centered.
- mn = Row vectors of means for each class.
- cls = Class numbers associated with each row of mn.