Adding new tests to increase coverage

Good call!
On Wed, Oct 29, 2014 at 8:14 PM Dan Blanchard <notifications@github.com>
wrote:

> In skll/data/featureset.py:
>
> >          if inverse:
> >              mask = np.logical_not(mask)
> >
> >          # Remove examples not in mask
> >          self.ids = self.ids[mask]
> >          self.classes = self.classes[mask]
> > -        self.features = self.features[mask, :]
> > +
> > +        # filter the features if and only if ids/classes were specified
> > +        if ids is not None or classes is not None:
>
> I don't think this is quite right. With this setup, if someone specifies
> only features to filter, but also sets inverse to True, they'll end up
> with nothing in self.ids and self.classes, but have items left in
> self.features.
>
> The FeatureSet class requires that len(self.ids) == len(self.classes) ==
> len(self.features).
>
> Anyway, what I think we want to do instead is change
>
> if inverse:
>     mask = np.logical_not(mask)
>
> to
>
> if inverse and (classes is not None or ids is not None):
>     mask = np.logical_not(mask)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/EducationalTestingService/skll/pull/191/files#r19581603>
> .
>