This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from sklearn import preprocessing | |
>>> lb = preprocessing.LabelBinarizer() | |
>>> lb.fit_transform(['cat', 'dog', 'bird', 'cat']) | |
array([[0, 1, 0], | |
[0, 0, 1], | |
[1, 0, 0], | |
[0, 1, 0]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% General document formatting | |
\usepackage[margin=0.7in]{geometry} | |
\usepackage[parfill]{parskip} | |
\usepackage[utf8]{inputenc} | |
% Related to math | |
\usepackage{amsmath,amssymb,amsfonts,amsthm} | |
\begin{document} |