Hot answers tagged

1

The idea is correct, even if you have a couple of mistakes in your code (like id is not defined, and inside paste you want to use just n, not df$Name). This is not super compressed code but it does the job: Name = c('Ed','Ed','Bill','Tom','Tom','Tom','Ed','Bill','Bill','Bill') df = data.frame(Name) for (n in unique(df$Name)){ # get indices ...


1

The slot "fp" counts how many false positives there are at each choice of classification cutoff (which can be found in the "cutoff" slot). The cutoff represents at what value you set the threshold to binarize the numerical values into classes. Your output already appears to be binary classes, so the concept of a threshold doesn't really make much sense, but ...


1

My guess is that either your Failure/Normal class is a lot lesser than the other. As such, for a certain (i.e. nth) fold, there only exists instances of one class. You can try doing oversampling the under-represented class to prevent this, or try doing a stratified K-Fold so that each fold will have occurrences of both classes.


1

This is an NER problem. Rather than you splitting your sentence to words and finding the right word from dict, I suggest you use an NER (may be spacy NER mentioned by @jindrich). This NER will point out right block of information from the text your sentences. Once you get an Entity then you can parse its value. If it is quantitative then it is easy to ...


Only top voted, non community-wiki answers of a minimum length are eligible