Python-sklearn机器学习的第一个样例(4)
来源:互联网 发布:javascript入门经典pdf 编辑:程序博客网 时间:2024/06/01 15:34
In [16]:
assert 1 == 2
In [17]:
# We know that we should only have three classesassert len(iris_data_clean['class'].unique()) == 3
In [18]:
# We know that sepal lengths for 'Iris-versicolor' should never be below 2.5 cmassert iris_data_clean.loc[iris_data_clean['class'] == 'Iris-versicolor', 'sepal_length_cm'].min() >= 2.5
In [19]:
# We know that our data set should have no missing measurementsassert len(iris_data_clean.loc[(iris_data_clean['sepal_length_cm'].isnull()) | (iris_data_clean['sepal_width_cm'].isnull()) | (iris_data_clean['petal_length_cm'].isnull()) | (iris_data_clean['petal_width_cm'].isnull())]) == 0
In [20]:
sb.pairplot(iris_data_clean)
Out[20]:
In [21]:
sb.pairplot(iris_data_clean, hue='class')
Out[21]:
In [23]:
plt.figure(figsize=(10, 10))for column_index, column in enumerate(iris_data_clean.columns): if column == 'class': continue plt.subplot(2, 2, column_index + 1) sb.violinplot(x='class', y=column, data=iris_data_clean)
阅读全文
0 0
- Python-sklearn机器学习的第一个样例(4)
- Python-sklearn 机器学习的第一个样例(1)
- Python-sklearn机器学习的第一个样例(2)
- Python-sklearn机器学习的第一个样例(3)
- Python-sklearn机器学习的第一个样例(5)
- Python-sklearn机器学习的第一个样例(6)
- Python-sklearn 机器学习的第一个样例(7)
- Python机器学习库SKLearn包含的内容(目录)
- python sklearn 机器学习库的安装
- 基于python的机器学习库Sklearn
- [机器学习]基于python的机器学习库Sklearn-01
- python 机器学习-sklearn基本功能
- python机器学习(1)python.sklearn库
- 安装Python的机器学习包Sklearn 出错解决方法
- python中sklearn机器学习实现的博客
- sklearn:Python语言开发的通用机器学习库
- Python机器学习包的sklearn中的Gridsearch简单使用
- Python机器学习库SKLearn的特征选择
- Android Http中的Post请求方法
- ueditor 添加支持文件存储到文件服务器
- MT2503 External Buck问题
- type_traits
- oracle 利用url encode decode转换字符编码
- Python-sklearn机器学习的第一个样例(4)
- Zeppelin 初体验
- springMVC : Ambiguous mapping found
- 【集体智慧编程】第三章、发现群组
- 窗口右小角弹出方式(窗口弹出)
- httpclient4.4 http摘要认证请求
- Java GC笔记
- 如何查看linux是否支持cfg80211
- java中双检锁为什么要加上volatile关键字!