human learn:
outliers
Human-Learn contains scikit-learn compatible tools that should make it easier to construct and benchmark rule based systems that are designed by humans. You can also use it in combination with ML models. In this series of videos we'll demonstrate some of the features.
Notes
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)
plt.xlabel('bill_length_mm')
plt.ylabel('bill_depth_mm')
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.