there are several soft classifiers in r, such as linear discriminant analysis. Functions such as lda {MASS} show the likelihood of each case being classified to belong to each of the classes defined in training. That's prefect.

However, as far as I could see, lda {MASS} and others, such as randomForest {randomForest} only work with 'hard' training. That is, each case of the training data has to belong to a single class. For example, the famous Fisher's iris data, which can be seen just by entering "iris" (without quotes) in the R console, shows a dataframe with 150 cases (rows) and 5 variables (columns) named Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, and Species. Each of the 150 cases is labelled with only one class in the columns Species: setosa, versicolor and virginica.

Now say that one needs to train a classifier with 'soft' labelling, and that instead of labelling each case as one of the three classes only, each case is assigned a level of membership to the classes. For example, the Fisher's iris data could show the columns Species1, Species2 and Species3. Then, a given case could show the membership 0.4, 0.6 and 0 to Species1, Species2 and Species3 respectively.

I could find something similar in Classifier for uncertain class labels. However, the answer of cbeleites is quite unclear although helpful. As far as I understood, one can weight the cases used for training but the cases that belong to more than one class have to be repeated with different weights. I was looking for something more straightforward.

There is any classifier implemented in R that accepts partial membership of cases to classes without the need of supplying two or more instances of the same case? Thank you very much!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.