... human learn: outliers


You can make drawings just like beforehand.

from hulearn.experimental.interactive import InteractiveCharts

charts = InteractiveCharts(df, labels="species")
charts.add_chart(x="bill_length_mm", y="bill_depth_mm")

Instead of turning this into a classifier we can also turn it into a model that detects outliers instead.

from hulearn.outlier import InteractiveOutlierDetector

# Load the model using drawn-data.
model = InteractiveOutlierDetector(json_desc=charts.data())

X, y = df.drop(columns=['species']), df['species']
preds = model.fit(X, y).predict(X)

You can see the drawn shapes reflected in this models output.

plt.scatter(X['bill_length_mm'], X['bill_depth_mm'], c=preds)

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.