0
$\begingroup$


I have a dataset where there exists 16 different classes. Each class has about 400 rows of 12 attributes(iowait, read_bytes, write_bytes, etc). Using tsfresh, I have generated about 45 features(iowait_mean, iowait_max, iowait_variance, etc) for each class, so I ended up with 16 rows where each row corresponds to a vector of features where the label belongs to one of the 16 classes.enter image description here

These are the details about the data I am working with.
My question is:
a)My test instance is another 400 data points comprising of 12 features, so I plan to pass this test data to tsfresh to generate a vector. The new vector will be compared with all the 16 unique vectors given in the image and the cosine similarity should give which class the test instance belongs to. When I tried this, the accuracy was poor. How can I improve my chances to classify better?
b)Does a neural network help in solving this problem?
Please let me know if you need additional information. It is assumed that all the records in the test instance, belong to the same class. Thank you

$\endgroup$

1 Answer 1

1
$\begingroup$

Rephrasing the question (see if I understood it correctly):

  • It is a classification problem
  • There are 16 classes, $y_j$ where $j \in \{1,2, 3, ...16\}$
  • Training data has 400 examples, $x_i$, where $i \in \{1,2,3,...400\}$
  • Each training example, $x_i$ has 12 attributes. i.e. $x_i \in R^{12}$

Now, the task is to to classify each $x_i$ into $y_j$.

Your model descibed in (a) of question involves this:

  1. Transform the 12 dimentional features (i.e. $R^{12}$) to 45 dimensional feature space ($R^{45}$)
  2. For each class, assign a the point in $R^{45}$ -- these are the parameters of this model. Let us call this as class centre
  3. Compute Cosine Similarity between your new (or test) data point with the class centre. Which ever the class centre yields lesser similarity will be the label for the data test data point.

Answer for part (a) of the question:

What is the proof that the assumption in step 2 holds? i.e. what is the gaurantee that the test data vectors yields a higher cosine similarity(i.e. minimal angle) with the correct class centre vectors. If this assumption is true, then ensure that:

a. the transformation done by tsfresh is consistent with test and training example.

b. Parameters of the model (or the class centres ) are properly estimated. Sometimes skewed data results in bad estimation so proper normalizations are needed

c. Does magnitude of vector has anything to do? Cosine similarity is a measure on angle of vectors, it doesnt consider vector magnitude


Answer for part (b) of question: Does a neural network help in solving this problem?

It depends! Neural network(NN) is a generic term, so I wont be will be able to precisely tell you an answer to this question. You can have a NN model that is bad in learning, hence it requires large number of examples to learn parameters. IMHO, unless you are an expert, 400 examples is too small to let it learn its parameters. If you build a


Suggestions:

  1. Try simpler models, like multi class logistic regression. It will similar to a simple neural network you want to fit

  2. If you want to do transformation of feature space (like $R^{12} \rightarrow R^{45}$), try SVM with RBF kernel.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.