How to do multivariate outlier detection in mixed data with category? I have a data table where the entries are in the following format. The first column is category, which represent the product category. I have 5 such categories. Feature 1,2 and 3 are different features associated with each of these categories. These features may be either categorical or numerical. 
I am planning to apply multivariate outlier detection mvoutlier in R package to explore this data. 
I have following questions that I am trying to answer:


*

*Should I consider each of these categories separately and perform the  analyses independent of other categories?

*How to handle the categorical values in this data?
Thanks 
category    f1  f2  f3
a1  1   33.4    333
a1  0   23  444
a1  0   30  333
a1  0   34  300
a2  1   56  600
a2  1   60  609
a2  1   64  630
a2  1   66  650
a3  0   99  900
a1  0   30  320
a3  0   99  1000
a1  0   30  340
a2  0   59  600

 A: To answer your first question, the whole purpose of the mvoutlier package is to perform multivariate outlier detection, so it wouldn't make much sense to do the outlier detection using one variable and a time.  Multivariate outlier detection is the better approach since outliers can be completely hidden in the three-dimensional space of our independent variables, but may not appear so in one-dimensional space.
In preparing your data for the analysis, as mentioned in my comment, I would refrain from discretizing your data as suggested in the other answer by @Andrey Sapegin as doing so results in loss of important information which could prove valuable in the outlier detection algorithm.
If your data contains categorical variables as you assert, then I would recommend using the R package HDoutliers, the latest update, of which occurred as recently as July 10, 2020, so the package employs some current methods in outlier detection.  The outlier detection algorithm is the one suggested by Leland Wilkinson's paper Visualizing Outliers.  The package performs multivariate outlier detection that "can handle a) data with a mixed categorical and continuous variables, b) many columns of data, c) many rows of data, d) outliers that mask other outliers, and e) both unidimensional and multidimensional datasets" so it should perform well on your data.
Here's an example of how you might use this package in R:
install.packages("HDoutliers")
toread<-"category    f1  f2  f3
a1  1   33.4    333
a1  0   23  444
a1  0   30  333
a1  0   34  300
a2  1   56  600
a2  1   60  609
a2  1   64  630
a2  1   66  650
a3  0   99  900
a1  0   30  320
a3  0   99  1000
a1  0   30  340
a2  0   59  600"
mydata<-read.table(textConnection(toread), header = TRUE)
closeAllConnections()

out.W<-HDoutliers(mydata[,-1])
plotHDoutliers(mydata[,-1], out.W)

Which produces the following output where no outliers appear (outliers are denoted by an asterisk rather than a blue point):
If there are the only three variables in your dataset for which you intend to perform outlier detection, another, less desirable method you could employ is to "block" on the binary categorical variable f1, and then perform your usual outlier detection methods (e.g. using mvoutlier or another suitable multivariate outlier detection algorithm) separately for each level of f1.
A: For mixed data (containing both numerical and categorical features), you could perform discretisation of numerical features into categories (see, for example, this paper). Then all your features will be categorical and you can use one-hot encoding (also called conversion to the vector space, please see https://stats.stackexchange.com/a/52917/67464 for details) , to apply outlier detection methods on these data.
