I am in the process of splitting a dataset into a train and test dataset. Before I start, this is all relatively new to me. So, from my understanding, a label is the output, and a feature is an input. My model will detect malware, and so my dataset is filled with malware executables and non-malware executables (which I think is known as benign?).

I have started some code that splits the dataset, although I want to clarify the difference between labels and features. So my dataset is pretty large and contains many rows and many columns. I am dropping the 'Malware' column from my dataset. I have done this by using the code below:

y = data.Malware
X = data.drop('Malware', axis=1)

which I believe is the label in my code as that is what I what my model to predict (malware or not malware). My features are all the other columns within the dataset. Would this be correct?

The link to the dataset is below for reference in case anyone needs it to help understand my question: https://1drv.ms/x/s!AqFNg8FC48SSgtZSObDmmGHs3utWog


The features are the input you want to use to make a prediction, the label is the data you want to predict. The Malware column in your dataset seems to be a binary column indicating whether the observation belongs to something that is or isn't Malware, so if this is what you want to predict your approach is correct.

  • $\begingroup$ Okay. Thank you. I thought so but just wanted to double-check. I've managed to split the data and am now going to try and convert them to grayscale images :). $\endgroup$
    – Jack
    Mar 11 at 11:47

Your Answer

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

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