In [50]:
from IPython.core.display import HTML
import os
def css_styling():
"""Load default custom.css file from ipython profile"""
base = os.getcwd()
styles = "<style>\n%s\n</style>" % (open(os.path.join(base,'files/custom.css'),'r').read())
return HTML(styles)
css_styling()
Out[50]:
In [ ]:
import numpy as np
import sklearn as sk
import matplotlib.pyplot as plt
import sklearn.datasets as datasets
import seaborn as sns
%matplotlib inline
In [ ]:
In [ ]:
from sklearn.tree import DecisionTreeClassifier
In [ ]:
help(clf)
vamos a ajustar nuestro modelo con fit y sacar su puntaje con score
In [ ]:
In [ ]:
from sklearn.cross_validation import train_test_split
cuales son los tamanios de estos nuevos datos?
In [ ]:
In [ ]:
In [ ]:
In [ ]:
from sklearn.cross_validation import cross_val_score
In [ ]:
In [ ]:
In [ ]:
from sklearn.ensemble import RandomForestClassifier
a probarlo!
In [ ]:
mejoro?
In [ ]:
Que tal si probamos con un for loop!? Y checamos el error conforme al numero de arboles?
Hay que :
In [ ]:
In [ ]:
g = sns.PairGrid(iris, hue="species")
g = g.map(plt.scatter)
g = g.add_legend()
In [ ]:
iris = datasets.load_iris()
X = iris.data
Y = iris.target
In [ ]: