├── DeepLearning.md ├── LICENSE ├── MachineLearningOnSpark.md ├── NLP.md ├── README.md ├── TimeSeriesAnalysis.md ├── algorithm.md ├── awesome.md ├── basic-knowledge.md ├── books.md ├── ctr.md ├── jupyter.md ├── kaggle.md ├── markdown └── 数据预处理.md ├── ml-platform.md ├── pic ├── README.md ├── feature │ └── preprocess │ │ └── README.md └── 数据挖掘.jpg ├── src └── ml │ ├── README.md │ ├── feature_selection.ipynb │ ├── kaggle │ └── titanic │ │ ├── README.md │ │ ├── titanic.ipynb │ │ └── train.csv │ ├── np.py │ ├── pd.py │ ├── plt.py │ ├── preprocess.ipynb │ ├── recommend.py │ ├── sci.py │ ├── sklearn.ipynb │ └── wordcloudtest.py └── tensorflow.md /DeepLearning.md: -------------------------------------------------------------------------------- 1 | ## 教程 2 | [李宏毅 / 一天搞懂深度](https://www.slideshare.net/tw_dsconf/ss-62245351?qid=108adce3-2c3d-4758-a830-95d0a57e46bc&v=&b=&from_search=3) 3 | 4 | [深度学习必备手册(上)](https://yq.aliyun.com/articles/221660?utm_content=m_32699) 5 | 6 | [Deep Learning Book Chinese Translation](https://github.com/exacity/deeplearningbook-chinese) 7 | 8 | [simplified-deeplearning](https://github.com/exacity/simplified-deeplearning)---DeepLearningBook的学习笔记 9 | 10 | [Neural Networks and Deep Learning](http://neuralnetworksanddeeplearning.com/) 11 | 12 | [动手学深度学习](https://zh.gluon.ai//index.html) 13 | 14 | ## 基本概念介绍 15 | 16 | [ReLu(Rectified Linear Units)激活函数](http://www.cnblogs.com/neopenx/p/4453161.html) 17 | 18 | [变分自编码机](http://blog.csdn.net/wemedia/details.html?id=42029) 19 | 20 | [CNN(卷积神经网络)、RNN(循环神经网络)、DNN(深度神经网络)的内部网络结构有什么区别?](https://www.zhihu.com/question/34681168) 21 | 22 | ### CNN 23 | [不懂卷积神经网络?别怕,看完这几张萌图你就明白了](https://zhuanlan.zhihu.com/p/30285790) 24 | 25 | ## github 26 | 27 | [BigDL](https://github.com/intel-analytics/BigDL)---Distributed Deep Learning Library for Apache Spark 28 | 29 | [keras-cn](https://github.com/MoyanZitto/keras-cn)---Chinese keras documents with more examples, explanations and tips. 30 | 31 | [spark-deep-learning](https://github.com/databricks/spark-deep-learning)---Deep Learning Pipelines for Apache Spark 32 | 33 | [fastai](https://github.com/fastai)---The fast.ai deep learning library, lessons, and tutorials 34 | 35 | [Deep-Learning-for-Tracking-and-Detection](https://github.com/abhineet123/Deep-Learning-for-Tracking-and-Detection)---Collection of papers and other resources for object tracking and detection using deep learning 36 | 37 | [mobile-deep-learning](https://github.com/baidu/mobile-deep-learning)---This research aims at simply deploying CNN(Convolutional Neural Network) on mobile devices, with low complexity and high speed. 38 | 39 | [Realtime Multi Person Pose Estimation](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation) 40 | 41 | [deep-visualization-toolbox](https://github.com/yosinski/deep-visualization-toolbox)---DeepVis Toolbox 42 | 43 | [SeetaFace Engine](https://github.com/seetaface/SeetaFaceEngine)---SeetaFace Engine is an open source C++ face recognition engine, which can run on CPU with no third-party dependence. 44 | 45 | [conv_arithmetic](https://github.com/vdumoulin/conv_arithmetic)---A technical report on convolution arithmetic in the context of deep learning 46 | 47 | [OpenFace](https://github.com/TadasBaltrusaitis/OpenFace)---a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation. 48 | 49 | [deep_architecture_genealogy](https://github.com/hunkim/deep_architecture_genealogy)---Deep Learning Architecture Genealogy Project 50 | ## 应用 51 | 52 | [深度学习在情感分析中的应用](http://geek.csdn.net/news/detail/232869) 53 | 54 | [深度学习在股票市场的应用](http://www.jianshu.com/p/f9ca56d6407d) 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015, 2016 Wei Zhong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MachineLearningOnSpark.md: -------------------------------------------------------------------------------- 1 | [mmlspark](https://github.com/Azure/mmlspark)---Microsoft Machine Learning for Apache Spark 2 | 3 | [spark-redis-ml](https://github.com/RedisLabs/spark-redis-ml)---A spark package for loading Spark ML models to Redis-ML 4 | 5 | [incubator-predictionio](https://github.com/apache/incubator-predictionio)---PredictionIO, a machine learning server for developers and ML engineers. Built on Apache Spark, HBase and Spray. 6 | -------------------------------------------------------------------------------- /NLP.md: -------------------------------------------------------------------------------- 1 | 2 | ## 教程 3 | [oxford-cs-deepnlp-2017](https://github.com/oxford-cs-deepnlp-2017) 4 | 5 | ## 资源 6 | [DL4NLP](https://github.com/andrewt3000/DL4NLP)---Deep Learning for NLP resources 7 | 8 | [nlp_tasks](https://github.com/Kyubyong/nlp_tasks)---Natural Language Processing Tasks and References 9 | 10 | [深度学习与自然语言处理实践](https://github.com/wxyyxc1992/DataScience-And-MachineLearning-Handbook-For-Coders/tree/master/DeepLearning-And-NLP-In-Action) 11 | 12 | [opennlp](https://github.com/apache/opennlp)---The Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. 13 | 14 | [NLTK](https://github.com/nltk/nltk)--- the Natural Language Toolkit -- is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. 15 | 16 | ## 实战 17 | 18 | [如何使用Scikit-learn实现用于机器学习的文本数据准备](http://www.infoq.com/cn/articles/prepare-text-data-machine-learning-scikit-learn?utm_source=notification_web&utm_campaign=notifications&utm_medium=link&utm_content=content_in_followed_topic) 19 | 20 | [实战 | 让机器人替你聊天,还不被人看出破绽?来,手把手教你训练一个克隆版的你](http://blog.csdn.net/wemedia/details.html?id=43471) 21 | 22 | ## Java 23 | [ansj_seg](https://github.com/NLPchina/ansj_seg)---ansj分词.ict的真正java实现.分词效果速度都超过开源版的ict. 中文分词,人名识别,词性标注,用户自定义词典 24 | 25 | [中文自然语言处理工具包 Toolkit for Chinese natural language processing](https://github.com/FudanNLP/fnlp) 26 | 27 | > * 信息检索: 文本分类 新闻聚类 28 | > * 中文处理: 中文分词 词性标注 实体名识别 关键词抽取 依存句法分析 时间短语识别 29 | > * 结构化学习: 在线学习 层次分类 聚类 30 | 31 | [**HanLP**](https://github.com/hankcs/HanLP)提供下列功能: 32 | 33 | * 中文分词 34 | > * 最短路分词 35 | > * N-最短路分词 36 | > * CRF分词 37 | > * 索引分词 38 | > * 极速词典分词 39 | > * 用户自定义词典 40 | 41 | * 词性标注 42 | > * 命名实体识别 43 | > * 中国人名识别 44 | > * 音译人名识别 45 | > * 日本人名识别 46 | > * 地名识别 47 | > * 实体机构名识别 48 | 49 | * 关键词提取 50 | > * TextRank关键词提取 51 | 52 | * 自动摘要 53 | > * TextRank自动摘要 54 | 55 | * 短语提取 56 | > * 基于互信息和左右信息熵的短语提取 57 | 58 | * 拼音转换 59 | > * 多音字 60 | > * 声母 61 | > * 韵母 62 | > * 声调 63 | 64 | * 简繁转换 65 | > * 繁体中文分词 66 | > * 简繁分歧词(简体、繁体、臺灣正體、香港繁體) 67 | > * 文本推荐 68 | > * 语义推荐 69 | > * 拼音推荐 70 | > * 字词推荐 71 | 72 | * 依存句法分析 73 | > * 基于神经网络的高性能依存句法分析器 74 | > * MaxEnt依存句法分析 75 | > * CRF依存句法分析 76 | 77 | * 语料库工具 78 | > * 分词语料预处理 79 | > * 词频词性词典制作 80 | > * BiGram统计 81 | > * 词共现统计 82 | > * CoNLL语料预处理 83 | > * CoNLL UA/LA/DA评测工具 84 | ## python 85 | 86 | [jieba中文分词](https://github.com/fxsjy/jieba) 87 | 88 | [SnowNLP](https://github.com/isnowfy/snownlp) 89 | 90 | * 中文分词(Character-Based Generative Model) 91 | * 词性标注(TnT 3-gram 隐马) 92 | * 情感分析(现在训练数据主要是买卖东西时的评价,所以对其他的一些可能效果不是很好,待解决) 93 | * 文本分类(Naive Bayes) 94 | * 转换成拼音(Trie树实现的最大匹配) 95 | * 繁体转简体(Trie树实现的最大匹配) 96 | * 提取文本关键词(TextRank算法) 97 | * 提取文本摘要(TextRank算法) 98 | * tf,idf 99 | * Tokenization(分割成句子) 100 | * 文本相似(BM25) 101 | * 支持python3(感谢erning) 102 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 该工程主要包含机器学习学习过程中收集的相关资料和实践代码。 2 | 3 | 4 | ## 资料主要包括: 5 | 6 | > * [Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)---This glossary defines general machine learning terms as well as terms specific to TensorFlow. 7 | > * [awesome-machine-learning-on-source-code](https://github.com/src-d/awesome-machine-learning-on-source-code)---Interesting links & research papers related to Machine Learning applied to source code 8 | > * [state-of-the-art-result-for-machine-learning-problems](https://github.com/RedditSota/state-of-the-art-result-for-machine-learning-problems)---This repository provides state of the art (SoTA) results for all machine learning problems. 9 | > * [awesome](awesome.md) 10 | > * [时间序列数据分析](TimeSeriesAnalysis.md) 11 | > * [自然语言处理NLP](NLP.md) 12 | > * [基本机器学习算法相关资料](algorithm.md) 13 | > * [深度学习相关资料](DeepLearning.md) 14 | > * [tensorflow相关资料](tensorflow.md) 15 | > * [kaggle相关资料](kaggle.md) 16 | > * [jupyter相关资料](jupyter.md) 17 | > * [MachinLearningOnSpark](MachineLearningOnSpark.md) 18 | > * [实践代码](/src/ml) 19 | 20 | 21 | ## cheat sheet 22 | 23 | ### ML 24 | 25 | [machine learning cheat sheet](https://github.com/kailashahirwar/cheatsheets-ai) 26 | 27 | ### numpy 28 | 29 | [numpy cheat sheet](https://www.dataquest.io/blog/numpy-cheat-sheet/) 30 | 31 | ![numpy](https://github.com/jacksu/cheatsheets-ai/blob/master/Numpy.png) 32 | 33 | ### pandas 34 | 35 | [pandas cheat sheet](https://www.dataquest.io/blog/pandas-cheat-sheet/) 36 | 37 | [实操 | 内存占用减少高达90%,还不用升级硬件?没错,这篇文章教你妙用Pandas轻松处理大规模数据](http://blog.csdn.net/wemedia/details.html?id=43144) 38 | 39 | ## scikit learn 40 | [scikit cheat sheet](http://scikit-learn.org/stable/tutorial/machine_learning_map/) 41 | 42 | ## charts 43 | 44 | [pyecharts](https://github.com/chenjiandongx/pyecharts) 45 | 46 | **代码** 47 | 48 | 实践代码主要基于`python 3.6.1`,依赖的module有: 49 | 50 | > * numpy+mkl(最好使用whl安装) 51 | > * scipy(最好使用whl安装) 52 | > * pandas 53 | > * matplotlib & seaborn 54 | > * ipython 55 | > * jupyter 56 | 57 | **whl url** 58 | 59 | [python module lib whl](http://www.lfd.uci.edu/~gohlke/pythonlibs/) 60 | -------------------------------------------------------------------------------- /TimeSeriesAnalysis.md: -------------------------------------------------------------------------------- 1 | ## Algorithm 2 | [yahoo/egads](https://github.com/yahoo/egads) 3 | 4 | [MicroSoft Time Series Anomaly Detection](https://msdn.microsoft.com/en-us/library/azure/mt789979.aspx) 5 | 6 | [Breakout Detection via Robust E-Statistics](https://github.com/twitter/BreakoutDetection) 7 | 8 | [Anomaly Detection with R](https://github.com/twitter/AnomalyDetection) 9 | 10 | [Forecasting: principles and practice](https://www.otexts.org/fpp/7) 11 | 12 | [Anomalous time series package for R](https://github.com/robjhyndman/anomalous) 13 | 14 | [如何在Python中用LSTM网络进行时间序列预测](http://blog.csdn.net/wemedia/details.html?id=42026) 15 | 16 | [facebook/prophet](https://github.com/facebook/prophet)---Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. 17 | ## DataSet 18 | 19 | [NAB](https://github.com/numenta/NAB)--The Numenta Anomaly Benchmark 20 | 21 | ## practice 22 | [Kaggle网站流量预测任务第一名解决方案:从模型到代码详解时序预测](https://mp.weixin.qq.com/s?__biz=MzA3MzI4MjgzMw==&mid=2650734276&idx=2&sn=5ac3f59ced7f27b442e630c66a30ea8e) 23 | 24 | [kaggle-web-traffic](https://github.com/Arturus/kaggle-web-traffic)---Kaggle Web Traffic Time Series Forecasting 25 | 26 | [APPDynamic智能运维里的时间序列:预测、异常检测和根源分析](http://www.infoq.com/cn/presentations/time-series-in-intelligent-operation-and-maintenanc?utm_source=infoq&utm_medium=videos_homepage&utm_campaign=videos_row1) 27 | -------------------------------------------------------------------------------- /algorithm.md: -------------------------------------------------------------------------------- 1 | 2 | ## 回归 3 | [Python 机器学习实战教程:回归](http://blog.csdn.net/wizardforcel/article/details/73380636) 4 | 5 | [7 Types of Regression Techniques you should know!](https://www.analyticsvidhya.com/blog/2015/08/comprehensive-guide-regression/) 6 | 7 | ## 分类 8 | 9 | **决策树** 10 | 11 | [A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python)](https://www.analyticsvidhya.com/blog/2016/04/complete-tutorial-tree-based-modeling-scratch-in-python/) 12 | 13 | [机器学习算法实践-决策树(Decision Tree)](https://zhuanlan.zhihu.com/p/27905967) 14 | 15 | [机器学习算法之决策树](http://www.jianshu.com/p/6eecdeee5012) 16 | 17 | [treelite](https://github.com/dmlc/treelite)---Treelite is a framework to optimize decision tree ensembles for fast prediction. 18 | 19 | `使用场景:网站付费用户的判断` 20 | 21 | 22 | 23 | **GBDT** 24 | 25 | [GBDT(Gradient Boosting Decision Tree)](http://www.jianshu.com/p/005a4e6ac775) 26 | 27 | **XGBoost** 28 | 29 | [Introduction to Boosted Trees](http://xgboost.readthedocs.io/en/latest/model.html) 30 | 31 | [随机森林-GBDT-XGBOOST](https://www.jianshu.com/p/3f9628fa928b) 32 | 33 | **贝叶斯** 34 | 35 | [机器学习算法实践-朴素贝叶斯(Naive Bayes)](https://zhuanlan.zhihu.com/p/27906640) 36 | 37 | `使用场景:邮箱垃圾邮件过滤,为了应对新单词没有出现在训练集中的情况,使用拉普拉斯光滑(Laplace smoothing)` 38 | 39 | **KNN(K Nearest Neighbor)K近邻** 40 | 41 | [K NEAREST NEIGHBOR 算法](http://coolshell.cn/articles/8052.html) 42 | 43 | [Introduction to k-nearest neighbors : Simplified](https://www.analyticsvidhya.com/blog/2014/10/introduction-k-neighbours-algorithm-clustering/) 44 | 45 | ## SVM 46 | 47 | [Understanding Support Vector Machine algorithm from examples (along with code)](https://www.analyticsvidhya.com/blog/2015/10/understaing-support-vector-machine-example-code/) 48 | 49 | ## 迁移学习 50 | 51 | **GAN(generative aderserial network)生成对抗网络** 52 | 53 | [杨强教授漫谈《西部世界》、生成式对抗网络及迁移学习](http://geek.csdn.net/news/detail/197755) 54 | 55 | [香港科技大学计算机系主任杨强:论深度学习的迁移模型](http://blog.csdn.net/wemedia/details.html?id=40903) 56 | 57 | 58 | ## 强化学习 59 | 60 | [一文了解强化学习](http://geek.csdn.net/news/detail/201928) 61 | 62 | ### Q-learning 63 | 64 | [A Painless Q-learning Tutorial (一个 Q-learning 算法的简明教程)](http://blog.csdn.net/itplus/article/details/9361915) 65 | 66 | [如何用简单例子讲解 Q - learning 的具体过程?](https://www.zhihu.com/question/26408259/answer/123230350) 67 | -------------------------------------------------------------------------------- /awesome.md: -------------------------------------------------------------------------------- 1 | # awesome-machine-learning 2 | 3 | [机器学习、Python和数学学习资料汇总](http://www.infoq.com/cn/news/2017/06/Machine-Python-math-aggregation) 4 | 5 | [Medium上6900个赞的AI学习路线图,让你快速上手机器学习](http://blog.csdn.net/wemedia/details.html?id=43739) 6 | 7 | [100-Days-Of-ML-Code](https://github.com/Avik-Jain/100-Days-Of-ML-Code) 8 | 9 | ## 介绍 10 | 数据挖掘通用场景: 11 | 12 | ![数据挖掘普通流程](pic/数据挖掘.jpg) 13 | 14 | [实例详解机器学习如何解决问题](http://tech.meituan.com/mt-mlinaction-how-to-ml.html) 15 | 16 | [PMML介绍](http://www.ibm.com/developerworks/cn/opensource/ind-PMML1/) 17 | 18 | [Engineering statistics handbook](http://www.itl.nist.gov/div898/handbook/index.htm) 19 | 20 | [python-machine-learning-book-2nd-edition](https://github.com/rasbt/python-machine-learning-book-2nd-edition#whats-new-in-the-second-edition-from-the-first-edition) 21 | ## 商业理解 22 | 遇到了什么问题,需要什么数据来解决这个问题 23 | ## 特征工程 24 | 有这么一句话在业界广泛流传:数据和特征决定了机器学习的上限,而模型和算法只是逼近这个上限而已。包括采样数据、探索数据,了解数据的特征(NA、分布、均值),数据清洗、数据预处理,特征选择,降维等。 25 | 26 | [自动化特征工具featuretools介绍](https://www.jiqizhixin.com/articles/2018-11-02-7)---适合离线批数据预测,比如超市商品的销售额预测。 27 | 28 | ### 数据探索 29 | 30 | [A Comprehensive Guide to Data Exploration](https://www.analyticsvidhya.com/blog/2016/01/guide-data-exploration/) 31 | 32 | ### 特征提取 33 | 特征提取与 特征选择(Feature selection)有很大的不同: 前者意义在于把复杂的数据,如文本和图像,转化为数字特征,从而在机器学习中使用。后者是一个机器学习中应用这些特征的方法 34 | [sklearn feature extraction](http://sklearn.lzjqsdd.com/modules/feature_extraction.html#text-feature-extraction) 35 | ### 数据预处理 36 | 37 | [数据预处理](markdown/数据预处理.md) 38 | 39 | [数据预处理](http://www.zhaokv.com/category/%E6%95%B0%E6%8D%AE%E9%A2%84%E5%A4%84%E7%90%86) 40 | 41 | [利用 Scikit Learn的Python数据预处理实战指南](http://www.36dsj.com/archives/71598) 42 | 43 | 44 | ### 特征选择 45 | 46 | [特征选择](http://www.jianshu.com/p/2624521f87eb) 47 | 48 | [使用sklearn做单机特征工程](https://www.zhihu.com/question/29316149) 49 | 50 | ### [降维](http://www.jianshu.com/p/6a9db201cb13) 51 | 52 | 53 | ## 模型建立 54 | 55 | [各种机器学习算法分类总结](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-cheat-sheet) 56 | 57 | [如何为你的机器学习问题选择合适的算法](https://zhuanlan.zhihu.com/p/25459407) 58 | ## 模型评估 59 | 60 | [ROC和AUC介绍以及如何计算AUC](http://alexkong.net/2013/06/introduction-to-auc-and-roc/) 61 | 62 | [如何评估模型好坏](http://www.jianshu.com/p/41f434818ffc) 63 | 64 | ## 可视化 65 | 66 | [facets](https://github.com/PAIR-code/facets)--Visualizations for machine learning datasets 67 | 68 | ## A/B Test 69 | ## 推荐系统 70 | 71 | [推荐系统中基于深度学习的混合协同过滤模型](http://geek.csdn.net/news/detail/135405) 72 | 73 | [饿了么推荐系统:从0到1](http://geek.csdn.net/news/detail/134876) 74 | 75 | [旅游推荐系统的演进](http://geek.csdn.net/news/detail/194840) 76 | 77 | [深度学习在推荐领域的应用](http://geek.csdn.net/news/detail/200138) 78 | 79 | [Youtube 短视频推荐系统变迁:从机器学习到深度学习](https://juejin.im/post/5969b32cf265da6c415f3fae) 80 | 81 | [从算法到案例:推荐系统必读的10篇精选技术文章](http://www.infoq.com/cn/news/2015/12/Algorithm-case-10) 82 | 83 | [推荐系统中的比较流行的算法](http://www.jianshu.com/p/956213992b5a) 84 | ## 广告引擎 85 | [小米品牌广告引擎与算法实践](http://geek.csdn.net/news/detail/138521) 86 | 87 | [Ad-papers](https://github.com/wzhe06/Ad-papers)---Papers on Computational Advertising 88 | 89 | ## 预测 90 | 91 | [从数理统计到机器学习——滴滴出行大数据预测体系分享与交流](http://www.infoq.com/cn/presentations/travel-data-sharing-system-to-predict-and-share) 92 | 93 | ## 机器学习系统 94 | 95 | [第四范式先知平台的整体架构和实现细节](http://www.infoq.com/cn/articles/the-fourth-paradigm-prophet-platform?from=groupmessage) 96 | 97 | [Weiflow——微博机器学习框架](http://geek.csdn.net/news/detail/211220) 98 | 99 | [深度解密京东登月平台基础架构](http://geek.csdn.net/news/detail/228285) 100 | ## DL实战 101 | [DL好玩的东西](https://zhuanlan.zhihu.com/burness-DL) 102 | 103 | ## AutoML 104 | 105 | ### Algorithm 106 | [Data Robot](https://www.datarobot.com/) 107 | 108 | [Auto-sklearn](https://github.com/automl/auto-sklearn)--auto-sklearn is an automated machine learning toolkit and a drop-in replacement for a scikit-learn estimator. 109 | 110 | [BigML](https://bigml.com/) 111 | 112 | [automaticstatistician](https://www.automaticstatistician.com/examples/) 113 | 114 | ### DataSet 115 | 116 | [OpenML](https://github.com/openml/OpenML)--OpenML aims to create a novel ecosystem for machine learning experimentation. The current generation of machine learning and data mining platforms offers a wide variety of algorithms to process and model all kinds of data. 117 | 118 | chalearn automl challenge 119 | 120 | kaggle 121 | 122 | [python module](http://www.lfd.uci.edu/~gohlke/pythonlibs/) 123 | -------------------------------------------------------------------------------- /basic-knowledge.md: -------------------------------------------------------------------------------- 1 | [One-Hot Encoding](https://www.jianshu.com/p/cb344e1c860a) 2 | -------------------------------------------------------------------------------- /books.md: -------------------------------------------------------------------------------- 1 | [Machine Learning in Action](https://github.com/apachecn/MachineLearning)---机器学习实践(中文) 2 | 3 | [Feature Engineering for Machine Learning](https://github.com/apachecn/feature-engineering-for-ml-zh)---面向机器学习的特征工程(中文) 4 | -------------------------------------------------------------------------------- /ctr.md: -------------------------------------------------------------------------------- 1 | ## FM 2 | 3 | [FM算法解析](https://zhuanlan.zhihu.com/p/37963267) 4 | 5 | [一文读懂FM算法优势,并用python实现!(附代码)](https://cloud.tencent.com/developer/article/1031222) 6 | 7 | [计算广告CTR预估系列(三)--FFM理论与实践](https://mp.weixin.qq.com/s?__biz=MzU0NDgwNzIwMQ==&mid=2247483685&idx=1&sn=36de5b8814c7a1ca5d5a19315b3f1ed1&chksm=fb77c16bcc00487d937ca5c10a0682feecd8a1bcd4bc9ddbb13f21ccd3b353439c8ee724ff14#rd) 8 | 9 | ## 平台 10 | 11 | [LightCTR](https://github.com/cnkuangshi/LightCTR)---Lightweight and Scalable framework that combines mainstream algorithms of Click-Through-Rate prediction Based Machine Learning, Deep Learning and Philosophy of Parameter Server. 12 | -------------------------------------------------------------------------------- /jupyter.md: -------------------------------------------------------------------------------- 1 | [jupyter-themes](https://github.com/dunovank/jupyter-themes) 2 | 3 | [jupyter_contrib_nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions)----A collection of various notebook extensions for Jupyter 4 | 5 | [ipython-notebooks](https://github.com/jdwittenauer/ipython-notebooks)----A collection of IPython notebooks covering various topics. 6 | -------------------------------------------------------------------------------- /kaggle.md: -------------------------------------------------------------------------------- 1 | [How to get into the top 15 of a Kaggle competition using Python](https://www.dataquest.io/blog/kaggle-tutorial/) 2 | 3 | [JData](https://github.com/daoliker/JData)--京东JData算法大赛-高潜用户购买意向预测入门程序(starter code) 4 | 5 | [从0到1走进 Kaggle](http://geek.csdn.net/news/detail/197938) 6 | 7 | [2017-JDD-Global-Data-Explorer-Competition](https://github.com/yaoleiliu/2017-JDD-Global-Data-Explorer-Competition)---2017京东金融全球数据探索者大赛 8 | -------------------------------------------------------------------------------- /markdown/数据预处理.md: -------------------------------------------------------------------------------- 1 | 通过特征提取,我们能得到未经处理的特征,这时的特征可能有以下问题: 2 | * 不属于同一量纲:即特征的规格不一样,不能够放在一起比较。无量纲化可以解决这一问题。 3 | * 信息冗余:对于某些定量特征,其包含的有效信息为区间划分,例如学习成绩,假若只关心“及格”或不“及格”,那么需要将定量的考分,转换成“1”和“0”表示及格和未及格。二值化可以解决这一问题。 4 | * 定性特征不能直接使用:某些机器学习算法和模型只能接受定量特征的输入,那么需要将定性特征转换为定量特征。最简单的方式是为每一种定性值指定一个定量值,但是这种方式过于灵活,增加了调参的工作。[通常使用哑编码的方式将定性特征转换为定量特征**](https://link.zhihu.com/?target=http%3A//www.ats.ucla.edu/stat/mult_pkg/faq/general/dummy.htm):假设有N种定性值,则将这一个特征扩展为N种特征,当原始特征值为第i种定性值时,第i个扩展特征赋值为1,其他扩展特征赋值为0。哑编码的方式相比直接指定的方式,不用增加调参的工作,对于线性模型来说,使用哑编码后的特征可达到非线性的效果。 5 | * 存在缺失值:因为各种各样的原因,真实世界中的许多数据集都包含缺失数据,这类数据经常被编码成空格、NaNs,或其他占位符。 6 | * 信息利用率低:不同的机器学习算法和模型对数据中信息的利用是不同的,之前提到在线性模型中,使用对定性特征哑编码可以达到非线性的效果。类似地,对定量变量多项式化,或者进行其他的转换,都能达到非线性的效果。 7 | 8 | ## 无量纲化 9 | ### 标准化 10 | 数据的标准化是将数据按比例缩放,使之落入一个小的特定区间。在某些比较和评价的指标处理中经常会用到,去除数据的单位限制,将其转化为无量纲的纯数值,便于不同单位或量级的指标能够进行比较和加权。 11 | 公式为:(X-mean)/std 计算时对每个属性/每列分别进行。 12 | 将数据按属性(按列进行)减去其均值,并除以其方差。得到结果是,对于每个属性(每列)来说所有数据都聚集在0附近,方差为1。 13 | ```python 14 | from sklearn.datasets import load_iris 15 | import numpy as np 16 | 17 | X = np.array([[ 1., -1., 2.], 18 | [ 2., 0., 0.], 19 | [ 0., 1., -1.]]) 20 | from sklearn import preprocessing 21 | X_scaled = preprocessing.scale(X) 22 | print(X_scaled) 23 | print(X_scaled.mean(axis=0)) 24 | print(X_scaled.std(axis=0)) 25 | ``` 26 | out 27 | ```python 28 | [[ 0. -1.22474487 1.33630621] 29 | [ 1.22474487 0. -0.26726124] 30 | [-1.22474487 1.22474487 -1.06904497]] 31 | [ 0. 0. 0.] 32 | [ 1. 1. 1.] 33 | ``` 34 | sklearn 还提供了StandardScaler类,使用该类的好处在于可以保存训练集中的参数(均值、方差)直接使用其对象转换测试集数据。 35 | ```python 36 | scaler = preprocessing.StandardScaler().fit(X) 37 | print(scaler) 38 | 39 | print(scaler.mean_) 40 | 41 | print(scaler.scale_) 42 | 43 | print(scaler.transform(X)) 44 | scaler.transform([[-1., 1., 0.]]) 45 | ``` 46 | out 47 | ```python 48 | StandardScaler(copy=True, with_mean=True, with_std=True) 49 | [ 1. 0. 0.33333333] 50 | [ 0.81649658 0.81649658 1.24721913] 51 | [[ 0. -1.22474487 1.33630621] 52 | [ 1.22474487 0. -0.26726124] 53 | [-1.22474487 1.22474487 -1.06904497]] 54 | Out[9]: 55 | array([[-2.44948974, 1.22474487, -0.26726124]]) 56 | ``` 57 | ### 区间缩放 58 | 另一种常用的方法是将属性缩放到一个指定的最大和最小值(通常是1-0)之间,这可以通过preprocessing.MinMaxScaler类实现。 59 | 60 | 使用这种方法的目的包括: 61 | 1、对于方差非常小的属性可以增强其稳定性。 62 | 2、维持稀疏矩阵中为0的条目。 63 | 64 | ![image.png](https://pic2.zhimg.com/0f119a8e8f69509c5b95ef6a8a01a809_b.png) 65 | 66 | ```python 67 | X_train = np.array([[ 1., -1., 2.], 68 | [ 2., 0., 0.], 69 | [ 0., 1., -1.]]) 70 | min_max_scaler = preprocessing.MinMaxScaler() 71 | X_train_minmax = min_max_scaler.fit_transform(X_train) 72 | print(X_train_minmax) 73 | ``` 74 | out 75 | ```python 76 | [[ 0.5 0. 1. ] 77 | [ 1. 0.5 0.33333333] 78 | [ 0. 1. 0. ]] 79 | ``` 80 | ### 归一化 81 | 归一化是依照特征矩阵的行处理数据,其目的在于样本向量在点乘运算或其他核函数计算相似性时,拥有统一的标准,也就是说都转化为“单位向量”。规则为l2的归一化公式如下: 82 | ![image.png](https://pic1.zhimg.com/fbb2fd0a163f2fa211829b735194baac_b.png) 83 | 该方法主要应用于文本分类和聚类中。例如,对于两个TF-IDF向量的l2-norm进行点积,就可以得到这两个向量的余弦相似性。 84 | ```python 85 | X_normalized = preprocessing.normalize(X_train, norm='l2') 86 | print(X_normalized) 87 | normalizer = preprocessing.Normalizer().fit(X_train) 88 | normalizer.transform(X_train) 89 | ``` 90 | out 91 | ``` 92 | [[ 0.40824829 -0.40824829 0.81649658] 93 | [ 1. 0. 0. ] 94 | [ 0. 0.70710678 -0.70710678]] 95 | Out[16]: 96 | array([[ 0.40824829, -0.40824829, 0.81649658], 97 | [ 1. , 0. , 0. ], 98 | [ 0. , 0.70710678, -0.70710678]]) 99 | ``` 100 | 101 | ## 特征二值化 102 | 103 | 对于某些定量特征,其包含的有效信息为区间划分,例如学习成绩,假若只关心“及格”或不“及格”,那么需要将定量的考分,转换成“1”和“0”表示及格和未及格。定量特征二值化的核心在于设定一个阈值,大于阈值的赋值为1,小于等于阈值的赋值为0,公式表达如下: 104 | 105 | ![image.png](https://pic2.zhimg.com/11111244c5b69c1af6c034496a2591ad_b.png) 106 | 107 | 使用preproccessing库的Binarizer类对数据进行二值化的代码如下: 108 | ```python 109 | from sklearn.preprocessing import Binarizer 110 | 111 | X = [[ 1., -1., 2.], 112 | [ 2., 0., 0.], 113 | [ 0., 1., -1.]] 114 | binarizer = Binarizer().fit(X) 115 | print(binarizer.transform(X)) 116 | ``` 117 | output 118 | ```python 119 | [[ 1. 0. 1.] 120 | [ 1. 0. 0.] 121 | [ 0. 1. 0.]] 122 | ``` 123 | ## 分类特征编码 124 | 特征更多的时候是分类特征,而不是连续的数值特征。 比如一个人的特征可以是``[“male”, “female”]``, ``["from Europe", "from US", "from Asia"], ["uses Firefox", "uses Chrome", "uses Safari", "uses Internet Explorer"]``。 这样的特征可以高效的编码成整数,例如 `` ["male", "from US", "uses Internet Explorer"]``可以表示成 ``[0, 1, 3]``,``["female", "from Asia", "uses Chrome"]``就是``[1, 2, 1]``。 125 | 这个的整数特征表示并不能在scikit-learn的估计器中直接使用,因为这样的连续输入,估计器会认为类别之间是有序的,但实际却是无序的。(例如:浏览器的类别数据则是任意排序的)。 126 | 一个将分类特征转换成scikit-learn估计器可用特征的可选方法是使用one-of-K或者one-hot编码,`OneHotEncoder`是该方法的一个实现。该方法将每个类别特征的 `m` 可能值转换成`m`个二进制特征值,当然只有一个是激活值。例如: 127 | ```python 128 | from sklearn.preprocessing import OneHotEncoder 129 | print(OneHotEncoder().fit_transform([[0, 0, 3], [1, 1, 0], [0, 2, 1], [1, 0, 2]]).toarray()) 130 | ``` 131 | output 132 | ```python 133 | [[ 1. 0. 1. 0. 0. 0. 0. 0. 1.] 134 | [ 0. 1. 0. 1. 0. 1. 0. 0. 0.] 135 | [ 1. 0. 0. 0. 1. 0. 1. 0. 0.] 136 | [ 0. 1. 1. 0. 0. 0. 0. 1. 0.]] 137 | ``` 138 | ## 缺失值处理 139 | 因为各种各样的原因,真实世界中的许多数据集都包含缺失数据,这类数据经常被编码成空格、NaNs,或者是其他的占位符。但是这样的数据集并不能`scikit-learn`学习算法兼容,因为大多的学习算法都默认假设数组中的元素都是数值,因而所有的元素都有自己的意义。 使用不完整的数据集的一个基本策略就是舍弃掉整行或整列包含缺失值的数据。但是这样就付出了舍弃可能有价值数据(即使是不完整的 )的代价。 处理缺失数值的一个更好的策略就是从已有的数据推断出缺失的数值。 140 | `Imputer`类提供了缺失数值处理的基本策略,比如使用缺失数值所在行或列的均值、中位数、众数来替代缺失值。该类也兼容不同的缺失值编码。 141 | 接下来是一个如何替换缺失值的简单示例,缺失值被编码为`np.nan`, 使用包含缺失值的列的均值来替换缺失值。 142 | ```python 143 | import numpy as np 144 | from sklearn.preprocessing import Imputer 145 | imp = Imputer(missing_values='NaN', strategy='mean', axis=0) 146 | imp.fit([[1, 2], [np.nan, 3], [7, 6]]) 147 | #Imputer(axis=0, copy=True, missing_values='NaN', strategy='mean', verbose=0) 148 | X = [[np.nan, 2], [6, np.nan], [7, 6]] 149 | print(imp.transform(X)) 150 | ``` 151 | output 152 | ```python 153 | [[ 4. 2. ] 154 | [ 6. 3.66666667] 155 | [ 7. 6. ]] 156 | ``` 157 | ## 数据变换 158 | 很多情况下,考虑输入数据中的非线性特征来增加模型的复杂性是非常有效的。常见的数据变换有基于多项式的、基于指数函数的、基于对数函数的。 159 | 使用`preproccessing`库的`PolynomialFeatures`类对数据进行多项式转换的代码如下: 160 | ```python 161 | import numpy as np 162 | from sklearn.preprocessing import PolynomialFeatures 163 | X = np.arange(6).reshape(3, 2) 164 | PolynomialFeatures(2).fit_transform(X) 165 | ``` 166 | output 167 | ```python 168 | array([[ 1., 0., 1., 0., 0., 1.], 169 | [ 1., 2., 3., 4., 6., 9.], 170 | [ 1., 4., 5., 16., 20., 25.]]) 171 | ``` 172 | 基本的数据预处理就包含以上的方法。 173 | 174 | 文中涉及源码在这里:[源码](https://github.com/jacksu/machine-learning/blob/master/src/ml/preprocess.ipynb) 175 | ## 参考 176 | [sklearn preprocess](http://sklearn.lzjqsdd.com/modules/preprocessing.html) 177 | [特征工程到底是什么?](https://www.zhihu.com/question/29316149) 178 | 179 | [关于使用sklearn进行数据预处理 —— 归一化/标准化/正则化](http://www.cnblogs.com/chaosimple/p/4153167.html) 180 | 181 | [统计数据归一化与标准化](http://blog.csdn.net/mpbchina/article/details/7573519) 182 | 183 | [标准化和归一化什么区别?](https://www.zhihu.com/question/20467170) 184 | 185 | [特征工程到底是什么?](https://www.zhihu.com/question/29316149) 186 | 187 | [sklearn preprocess](http://sklearn.lzjqsdd.com/modules/preprocessing.html) 188 | -------------------------------------------------------------------------------- /ml-platform.md: -------------------------------------------------------------------------------- 1 | # 机器学习平台架构 2 | 3 | ## offline 4 | 5 | ### 开源平台 6 | 7 | [xlearn](https://github.com/aksnzhy/xlearn)---High Performance, Easy-to-use, and Scalable Machine Learning Package 8 | 9 | [**angel**](https://github.com/Tencent/angel)---A Flexible and Powerful Parameter Server for large-scale machine learning 10 | 11 | [EasyML](https://github.com/ICT-BDA/EasyML)---Easy Machine Learning is a general-purpose dataflow-based system for easing the process of applying machine learning algorithms to real world tasks. 12 | 13 | #### 深度学习 14 | 15 | [DeepSpeech](https://github.com/mozilla/DeepSpeech)---A TensorFlow implementation of Baidu's DeepSpeech architecture 16 | 17 | ## online 18 | [predictionio](http://predictionio.apache.org/)---Apache PredictionIO® is an open source Machine Learning Server built on top of a state-of-the-art open source stack for developers and data scientists to create predictive engines for any machine learning task. 19 | 20 | [SeldonIO/seldon-server](https://github.com/SeldonIO/seldon-server)---Seldon Core focuses purely on deploying a wide range of ML models on Kubernetes, allowing complex runtime serving graphs to be managed in production. 21 | 22 | ### 商业平台 23 | 24 | BigML、Seldon、Algorithmia 25 | 26 | # 技术 27 | ## 模型 28 | 29 | [**sklearn2pmml**](https://github.com/jpmml/sklearn2pmml) 30 | 31 | [Java PMML API](https://github.com/jpmml?page=1)---Java libraries for producing and consuming PMML documents 32 | 33 | ## 存储 34 | [Cassandra NoSQL数据模型设计指南](http://blog.csdn.net/dev_csdn/article/details/78594658) 35 | 36 | [kudu VS Hbase](https://bigdata.163.com/product/article/15) 37 | 38 | ## 计算 39 | [apache 流框架Flink、spark streaming和storm对比分析](https://bigdata.163.com/product/article/5) 40 | 41 | ## 容器化 42 | [kubeflow](https://github.com/google/kubeflow)---Machine Learning Toolkit for Kubernetes 43 | 44 | [Docker 核心技术与实现原理](https://draveness.me/docker) 45 | 46 | # 业界实践介绍 47 | 48 | [利用已有的大数据技术,如何构建机器学习平台](http://www.infoq.com/cn/articles/build-machine-learning-platform-bigdata?utm_source=notification_web&utm_campaign=notifications&utm_medium=link&utm_content=content_in_followed_topic)---同程 49 | 50 | [饿了么大数据平台建设](http://blog.csdn.net/dev_csdn/article/details/78625404) 51 | 52 | [Facebook服务于20亿人的应用机器学习平台是如何建成的?](https://mp.weixin.qq.com/s/ScFlSGcx-B3hav15kT4nCQ) 53 | 54 | [Uber的机器学习平台:从打车到外卖,一个平台如何服务数十个团队?](https://mp.weixin.qq.com/s/voDHk42uCbBuYxPBfTZ2Fw) 55 | 56 | [微博深度学习平台架构和实践](https://blog.csdn.net/heyc861221/article/details/80132175) 57 | -------------------------------------------------------------------------------- /pic/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pic/feature/preprocess/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pic/数据挖掘.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacksu/machine-learning/451ca671d757fa35c54d086401821df50069415f/pic/数据挖掘.jpg -------------------------------------------------------------------------------- /src/ml/README.md: -------------------------------------------------------------------------------- 1 | ## python基础 2 | 3 | [numpy](np.py) 4 | 5 | [pandas](pd.py) 6 | 7 | [scipy](sci.py) 8 | 9 | [matplotlib](sci.py) 10 | 11 | [sklearn](sklearn.ipynb) 12 | 13 | ## 机器学习数据预处理 14 | 15 | [预处理](preprocess.ipynb) 16 | 17 | [特征选择](feature_selection.ipynb) 18 | 19 | ## 实战 20 | 21 | [词云](wordcloudtest.py) 22 | 23 | [泰坦尼克之灾](kaggle/titanic/) 24 | -------------------------------------------------------------------------------- /src/ml/feature_selection.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 18, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "[[ 1.4 0.2]\n", 13 | " [ 1.4 0.2]\n", 14 | " [ 1.3 0.2]\n", 15 | " [ 1.5 0.2]\n", 16 | " [ 1.4 0.2]\n", 17 | " [ 1.7 0.4]\n", 18 | " [ 1.4 0.3]\n", 19 | " [ 1.5 0.2]\n", 20 | " [ 1.4 0.2]\n", 21 | " [ 1.5 0.1]\n", 22 | " [ 1.5 0.2]\n", 23 | " [ 1.6 0.2]\n", 24 | " [ 1.4 0.1]\n", 25 | " [ 1.1 0.1]\n", 26 | " [ 1.2 0.2]\n", 27 | " [ 1.5 0.4]\n", 28 | " [ 1.3 0.4]\n", 29 | " [ 1.4 0.3]\n", 30 | " [ 1.7 0.3]\n", 31 | " [ 1.5 0.3]\n", 32 | " [ 1.7 0.2]\n", 33 | " [ 1.5 0.4]\n", 34 | " [ 1. 0.2]\n", 35 | " [ 1.7 0.5]\n", 36 | " [ 1.9 0.2]\n", 37 | " [ 1.6 0.2]\n", 38 | " [ 1.6 0.4]\n", 39 | " [ 1.5 0.2]\n", 40 | " [ 1.4 0.2]\n", 41 | " [ 1.6 0.2]\n", 42 | " [ 1.6 0.2]\n", 43 | " [ 1.5 0.4]\n", 44 | " [ 1.5 0.1]\n", 45 | " [ 1.4 0.2]\n", 46 | " [ 1.5 0.1]\n", 47 | " [ 1.2 0.2]\n", 48 | " [ 1.3 0.2]\n", 49 | " [ 1.5 0.1]\n", 50 | " [ 1.3 0.2]\n", 51 | " [ 1.5 0.2]\n", 52 | " [ 1.3 0.3]\n", 53 | " [ 1.3 0.3]\n", 54 | " [ 1.3 0.2]\n", 55 | " [ 1.6 0.6]\n", 56 | " [ 1.9 0.4]\n", 57 | " [ 1.4 0.3]\n", 58 | " [ 1.6 0.2]\n", 59 | " [ 1.4 0.2]\n", 60 | " [ 1.5 0.2]\n", 61 | " [ 1.4 0.2]\n", 62 | " [ 4.7 1.4]\n", 63 | " [ 4.5 1.5]\n", 64 | " [ 4.9 1.5]\n", 65 | " [ 4. 1.3]\n", 66 | " [ 4.6 1.5]\n", 67 | " [ 4.5 1.3]\n", 68 | " [ 4.7 1.6]\n", 69 | " [ 3.3 1. ]\n", 70 | " [ 4.6 1.3]\n", 71 | " [ 3.9 1.4]\n", 72 | " [ 3.5 1. ]\n", 73 | " [ 4.2 1.5]\n", 74 | " [ 4. 1. ]\n", 75 | " [ 4.7 1.4]\n", 76 | " [ 3.6 1.3]\n", 77 | " [ 4.4 1.4]\n", 78 | " [ 4.5 1.5]\n", 79 | " [ 4.1 1. ]\n", 80 | " [ 4.5 1.5]\n", 81 | " [ 3.9 1.1]\n", 82 | " [ 4.8 1.8]\n", 83 | " [ 4. 1.3]\n", 84 | " [ 4.9 1.5]\n", 85 | " [ 4.7 1.2]\n", 86 | " [ 4.3 1.3]\n", 87 | " [ 4.4 1.4]\n", 88 | " [ 4.8 1.4]\n", 89 | " [ 5. 1.7]\n", 90 | " [ 4.5 1.5]\n", 91 | " [ 3.5 1. ]\n", 92 | " [ 3.8 1.1]\n", 93 | " [ 3.7 1. ]\n", 94 | " [ 3.9 1.2]\n", 95 | " [ 5.1 1.6]\n", 96 | " [ 4.5 1.5]\n", 97 | " [ 4.5 1.6]\n", 98 | " [ 4.7 1.5]\n", 99 | " [ 4.4 1.3]\n", 100 | " [ 4.1 1.3]\n", 101 | " [ 4. 1.3]\n", 102 | " [ 4.4 1.2]\n", 103 | " [ 4.6 1.4]\n", 104 | " [ 4. 1.2]\n", 105 | " [ 3.3 1. ]\n", 106 | " [ 4.2 1.3]\n", 107 | " [ 4.2 1.2]\n", 108 | " [ 4.2 1.3]\n", 109 | " [ 4.3 1.3]\n", 110 | " [ 3. 1.1]\n", 111 | " [ 4.1 1.3]\n", 112 | " [ 6. 2.5]\n", 113 | " [ 5.1 1.9]\n", 114 | " [ 5.9 2.1]\n", 115 | " [ 5.6 1.8]\n", 116 | " [ 5.8 2.2]\n", 117 | " [ 6.6 2.1]\n", 118 | " [ 4.5 1.7]\n", 119 | " [ 6.3 1.8]\n", 120 | " [ 5.8 1.8]\n", 121 | " [ 6.1 2.5]\n", 122 | " [ 5.1 2. ]\n", 123 | " [ 5.3 1.9]\n", 124 | " [ 5.5 2.1]\n", 125 | " [ 5. 2. ]\n", 126 | " [ 5.1 2.4]\n", 127 | " [ 5.3 2.3]\n", 128 | " [ 5.5 1.8]\n", 129 | " [ 6.7 2.2]\n", 130 | " [ 6.9 2.3]\n", 131 | " [ 5. 1.5]\n", 132 | " [ 5.7 2.3]\n", 133 | " [ 4.9 2. ]\n", 134 | " [ 6.7 2. ]\n", 135 | " [ 4.9 1.8]\n", 136 | " [ 5.7 2.1]\n", 137 | " [ 6. 1.8]\n", 138 | " [ 4.8 1.8]\n", 139 | " [ 4.9 1.8]\n", 140 | " [ 5.6 2.1]\n", 141 | " [ 5.8 1.6]\n", 142 | " [ 6.1 1.9]\n", 143 | " [ 6.4 2. ]\n", 144 | " [ 5.6 2.2]\n", 145 | " [ 5.1 1.5]\n", 146 | " [ 5.6 1.4]\n", 147 | " [ 6.1 2.3]\n", 148 | " [ 5.6 2.4]\n", 149 | " [ 5.5 1.8]\n", 150 | " [ 4.8 1.8]\n", 151 | " [ 5.4 2.1]\n", 152 | " [ 5.6 2.4]\n", 153 | " [ 5.1 2.3]\n", 154 | " [ 5.1 1.9]\n", 155 | " [ 5.9 2.3]\n", 156 | " [ 5.7 2.5]\n", 157 | " [ 5.2 2.3]\n", 158 | " [ 5. 1.9]\n", 159 | " [ 5.2 2. ]\n", 160 | " [ 5.4 2.3]\n", 161 | " [ 5.1 1.8]]\n" 162 | ] 163 | } 164 | ], 165 | "source": [ 166 | "from sklearn.feature_selection import SelectKBest\n", 167 | "from scipy.stats import pearsonr\n", 168 | "from sklearn.datasets import load_iris\n", 169 | "\n", 170 | "iris=load_iris()\n", 171 | "#选择K个最好的特征,返回选择特征后的数据\n", 172 | "\n", 173 | "#第一个参数为计算评估特征是否好的函数,该函数输入特征矩阵和目标向量,输出二元组(评分,P值)的数组,数组第i项为第i个特征的评分和P值。在此定义为计算相关系数\n", 174 | "#参数k为选择的特征个数\n", 175 | "# 定义函数\n", 176 | "def multivariate_pearsonr(X, y):\n", 177 | " scores, pvalues = [], []\n", 178 | " for ret in map(lambda x:pearsonr(x, y), X.T):\n", 179 | " scores.append(abs(ret[0]))\n", 180 | " pvalues.append(ret[1])\n", 181 | " return (np.array(scores), np.array(pvalues))\n", 182 | "\n", 183 | "transformer = SelectKBest(score_func=multivariate_pearsonr, k=2)\n", 184 | "Xt_pearson = transformer.fit_transform(iris.data, iris.target)\n", 185 | "print(Xt_pearson)\n" 186 | ] 187 | }, 188 | { 189 | "cell_type": "code", 190 | "execution_count": 19, 191 | "metadata": {}, 192 | "outputs": [ 193 | { 194 | "data": { 195 | "text/plain": [ 196 | "array([[ 1.4, 0.2],\n", 197 | " [ 1.4, 0.2],\n", 198 | " [ 1.3, 0.2],\n", 199 | " [ 1.5, 0.2],\n", 200 | " [ 1.4, 0.2],\n", 201 | " [ 1.7, 0.4],\n", 202 | " [ 1.4, 0.3],\n", 203 | " [ 1.5, 0.2],\n", 204 | " [ 1.4, 0.2],\n", 205 | " [ 1.5, 0.1],\n", 206 | " [ 1.5, 0.2],\n", 207 | " [ 1.6, 0.2],\n", 208 | " [ 1.4, 0.1],\n", 209 | " [ 1.1, 0.1],\n", 210 | " [ 1.2, 0.2],\n", 211 | " [ 1.5, 0.4],\n", 212 | " [ 1.3, 0.4],\n", 213 | " [ 1.4, 0.3],\n", 214 | " [ 1.7, 0.3],\n", 215 | " [ 1.5, 0.3],\n", 216 | " [ 1.7, 0.2],\n", 217 | " [ 1.5, 0.4],\n", 218 | " [ 1. , 0.2],\n", 219 | " [ 1.7, 0.5],\n", 220 | " [ 1.9, 0.2],\n", 221 | " [ 1.6, 0.2],\n", 222 | " [ 1.6, 0.4],\n", 223 | " [ 1.5, 0.2],\n", 224 | " [ 1.4, 0.2],\n", 225 | " [ 1.6, 0.2],\n", 226 | " [ 1.6, 0.2],\n", 227 | " [ 1.5, 0.4],\n", 228 | " [ 1.5, 0.1],\n", 229 | " [ 1.4, 0.2],\n", 230 | " [ 1.5, 0.1],\n", 231 | " [ 1.2, 0.2],\n", 232 | " [ 1.3, 0.2],\n", 233 | " [ 1.5, 0.1],\n", 234 | " [ 1.3, 0.2],\n", 235 | " [ 1.5, 0.2],\n", 236 | " [ 1.3, 0.3],\n", 237 | " [ 1.3, 0.3],\n", 238 | " [ 1.3, 0.2],\n", 239 | " [ 1.6, 0.6],\n", 240 | " [ 1.9, 0.4],\n", 241 | " [ 1.4, 0.3],\n", 242 | " [ 1.6, 0.2],\n", 243 | " [ 1.4, 0.2],\n", 244 | " [ 1.5, 0.2],\n", 245 | " [ 1.4, 0.2],\n", 246 | " [ 4.7, 1.4],\n", 247 | " [ 4.5, 1.5],\n", 248 | " [ 4.9, 1.5],\n", 249 | " [ 4. , 1.3],\n", 250 | " [ 4.6, 1.5],\n", 251 | " [ 4.5, 1.3],\n", 252 | " [ 4.7, 1.6],\n", 253 | " [ 3.3, 1. ],\n", 254 | " [ 4.6, 1.3],\n", 255 | " [ 3.9, 1.4],\n", 256 | " [ 3.5, 1. ],\n", 257 | " [ 4.2, 1.5],\n", 258 | " [ 4. , 1. ],\n", 259 | " [ 4.7, 1.4],\n", 260 | " [ 3.6, 1.3],\n", 261 | " [ 4.4, 1.4],\n", 262 | " [ 4.5, 1.5],\n", 263 | " [ 4.1, 1. ],\n", 264 | " [ 4.5, 1.5],\n", 265 | " [ 3.9, 1.1],\n", 266 | " [ 4.8, 1.8],\n", 267 | " [ 4. , 1.3],\n", 268 | " [ 4.9, 1.5],\n", 269 | " [ 4.7, 1.2],\n", 270 | " [ 4.3, 1.3],\n", 271 | " [ 4.4, 1.4],\n", 272 | " [ 4.8, 1.4],\n", 273 | " [ 5. , 1.7],\n", 274 | " [ 4.5, 1.5],\n", 275 | " [ 3.5, 1. ],\n", 276 | " [ 3.8, 1.1],\n", 277 | " [ 3.7, 1. ],\n", 278 | " [ 3.9, 1.2],\n", 279 | " [ 5.1, 1.6],\n", 280 | " [ 4.5, 1.5],\n", 281 | " [ 4.5, 1.6],\n", 282 | " [ 4.7, 1.5],\n", 283 | " [ 4.4, 1.3],\n", 284 | " [ 4.1, 1.3],\n", 285 | " [ 4. , 1.3],\n", 286 | " [ 4.4, 1.2],\n", 287 | " [ 4.6, 1.4],\n", 288 | " [ 4. , 1.2],\n", 289 | " [ 3.3, 1. ],\n", 290 | " [ 4.2, 1.3],\n", 291 | " [ 4.2, 1.2],\n", 292 | " [ 4.2, 1.3],\n", 293 | " [ 4.3, 1.3],\n", 294 | " [ 3. , 1.1],\n", 295 | " [ 4.1, 1.3],\n", 296 | " [ 6. , 2.5],\n", 297 | " [ 5.1, 1.9],\n", 298 | " [ 5.9, 2.1],\n", 299 | " [ 5.6, 1.8],\n", 300 | " [ 5.8, 2.2],\n", 301 | " [ 6.6, 2.1],\n", 302 | " [ 4.5, 1.7],\n", 303 | " [ 6.3, 1.8],\n", 304 | " [ 5.8, 1.8],\n", 305 | " [ 6.1, 2.5],\n", 306 | " [ 5.1, 2. ],\n", 307 | " [ 5.3, 1.9],\n", 308 | " [ 5.5, 2.1],\n", 309 | " [ 5. , 2. ],\n", 310 | " [ 5.1, 2.4],\n", 311 | " [ 5.3, 2.3],\n", 312 | " [ 5.5, 1.8],\n", 313 | " [ 6.7, 2.2],\n", 314 | " [ 6.9, 2.3],\n", 315 | " [ 5. , 1.5],\n", 316 | " [ 5.7, 2.3],\n", 317 | " [ 4.9, 2. ],\n", 318 | " [ 6.7, 2. ],\n", 319 | " [ 4.9, 1.8],\n", 320 | " [ 5.7, 2.1],\n", 321 | " [ 6. , 1.8],\n", 322 | " [ 4.8, 1.8],\n", 323 | " [ 4.9, 1.8],\n", 324 | " [ 5.6, 2.1],\n", 325 | " [ 5.8, 1.6],\n", 326 | " [ 6.1, 1.9],\n", 327 | " [ 6.4, 2. ],\n", 328 | " [ 5.6, 2.2],\n", 329 | " [ 5.1, 1.5],\n", 330 | " [ 5.6, 1.4],\n", 331 | " [ 6.1, 2.3],\n", 332 | " [ 5.6, 2.4],\n", 333 | " [ 5.5, 1.8],\n", 334 | " [ 4.8, 1.8],\n", 335 | " [ 5.4, 2.1],\n", 336 | " [ 5.6, 2.4],\n", 337 | " [ 5.1, 2.3],\n", 338 | " [ 5.1, 1.9],\n", 339 | " [ 5.9, 2.3],\n", 340 | " [ 5.7, 2.5],\n", 341 | " [ 5.2, 2.3],\n", 342 | " [ 5. , 1.9],\n", 343 | " [ 5.2, 2. ],\n", 344 | " [ 5.4, 2.3],\n", 345 | " [ 5.1, 1.8]])" 346 | ] 347 | }, 348 | "execution_count": 19, 349 | "metadata": {}, 350 | "output_type": "execute_result" 351 | } 352 | ], 353 | "source": [ 354 | "from sklearn.feature_selection import SelectKBest\n", 355 | "from sklearn.feature_selection import mutual_info_classif\n", 356 | "\n", 357 | "#选择K个最好的特征,返回选择特征后的数据\n", 358 | "SelectKBest(mutual_info_classif, k=2).fit_transform(iris.data, iris.target)" 359 | ] 360 | }, 361 | { 362 | "cell_type": "code", 363 | "execution_count": 20, 364 | "metadata": {}, 365 | "outputs": [ 366 | { 367 | "data": { 368 | "text/plain": [ 369 | "array([[ 3.5, 0.2],\n", 370 | " [ 3. , 0.2],\n", 371 | " [ 3.2, 0.2],\n", 372 | " [ 3.1, 0.2],\n", 373 | " [ 3.6, 0.2],\n", 374 | " [ 3.9, 0.4],\n", 375 | " [ 3.4, 0.3],\n", 376 | " [ 3.4, 0.2],\n", 377 | " [ 2.9, 0.2],\n", 378 | " [ 3.1, 0.1],\n", 379 | " [ 3.7, 0.2],\n", 380 | " [ 3.4, 0.2],\n", 381 | " [ 3. , 0.1],\n", 382 | " [ 3. , 0.1],\n", 383 | " [ 4. , 0.2],\n", 384 | " [ 4.4, 0.4],\n", 385 | " [ 3.9, 0.4],\n", 386 | " [ 3.5, 0.3],\n", 387 | " [ 3.8, 0.3],\n", 388 | " [ 3.8, 0.3],\n", 389 | " [ 3.4, 0.2],\n", 390 | " [ 3.7, 0.4],\n", 391 | " [ 3.6, 0.2],\n", 392 | " [ 3.3, 0.5],\n", 393 | " [ 3.4, 0.2],\n", 394 | " [ 3. , 0.2],\n", 395 | " [ 3.4, 0.4],\n", 396 | " [ 3.5, 0.2],\n", 397 | " [ 3.4, 0.2],\n", 398 | " [ 3.2, 0.2],\n", 399 | " [ 3.1, 0.2],\n", 400 | " [ 3.4, 0.4],\n", 401 | " [ 4.1, 0.1],\n", 402 | " [ 4.2, 0.2],\n", 403 | " [ 3.1, 0.1],\n", 404 | " [ 3.2, 0.2],\n", 405 | " [ 3.5, 0.2],\n", 406 | " [ 3.1, 0.1],\n", 407 | " [ 3. , 0.2],\n", 408 | " [ 3.4, 0.2],\n", 409 | " [ 3.5, 0.3],\n", 410 | " [ 2.3, 0.3],\n", 411 | " [ 3.2, 0.2],\n", 412 | " [ 3.5, 0.6],\n", 413 | " [ 3.8, 0.4],\n", 414 | " [ 3. , 0.3],\n", 415 | " [ 3.8, 0.2],\n", 416 | " [ 3.2, 0.2],\n", 417 | " [ 3.7, 0.2],\n", 418 | " [ 3.3, 0.2],\n", 419 | " [ 3.2, 1.4],\n", 420 | " [ 3.2, 1.5],\n", 421 | " [ 3.1, 1.5],\n", 422 | " [ 2.3, 1.3],\n", 423 | " [ 2.8, 1.5],\n", 424 | " [ 2.8, 1.3],\n", 425 | " [ 3.3, 1.6],\n", 426 | " [ 2.4, 1. ],\n", 427 | " [ 2.9, 1.3],\n", 428 | " [ 2.7, 1.4],\n", 429 | " [ 2. , 1. ],\n", 430 | " [ 3. , 1.5],\n", 431 | " [ 2.2, 1. ],\n", 432 | " [ 2.9, 1.4],\n", 433 | " [ 2.9, 1.3],\n", 434 | " [ 3.1, 1.4],\n", 435 | " [ 3. , 1.5],\n", 436 | " [ 2.7, 1. ],\n", 437 | " [ 2.2, 1.5],\n", 438 | " [ 2.5, 1.1],\n", 439 | " [ 3.2, 1.8],\n", 440 | " [ 2.8, 1.3],\n", 441 | " [ 2.5, 1.5],\n", 442 | " [ 2.8, 1.2],\n", 443 | " [ 2.9, 1.3],\n", 444 | " [ 3. , 1.4],\n", 445 | " [ 2.8, 1.4],\n", 446 | " [ 3. , 1.7],\n", 447 | " [ 2.9, 1.5],\n", 448 | " [ 2.6, 1. ],\n", 449 | " [ 2.4, 1.1],\n", 450 | " [ 2.4, 1. ],\n", 451 | " [ 2.7, 1.2],\n", 452 | " [ 2.7, 1.6],\n", 453 | " [ 3. , 1.5],\n", 454 | " [ 3.4, 1.6],\n", 455 | " [ 3.1, 1.5],\n", 456 | " [ 2.3, 1.3],\n", 457 | " [ 3. , 1.3],\n", 458 | " [ 2.5, 1.3],\n", 459 | " [ 2.6, 1.2],\n", 460 | " [ 3. , 1.4],\n", 461 | " [ 2.6, 1.2],\n", 462 | " [ 2.3, 1. ],\n", 463 | " [ 2.7, 1.3],\n", 464 | " [ 3. , 1.2],\n", 465 | " [ 2.9, 1.3],\n", 466 | " [ 2.9, 1.3],\n", 467 | " [ 2.5, 1.1],\n", 468 | " [ 2.8, 1.3],\n", 469 | " [ 3.3, 2.5],\n", 470 | " [ 2.7, 1.9],\n", 471 | " [ 3. , 2.1],\n", 472 | " [ 2.9, 1.8],\n", 473 | " [ 3. , 2.2],\n", 474 | " [ 3. , 2.1],\n", 475 | " [ 2.5, 1.7],\n", 476 | " [ 2.9, 1.8],\n", 477 | " [ 2.5, 1.8],\n", 478 | " [ 3.6, 2.5],\n", 479 | " [ 3.2, 2. ],\n", 480 | " [ 2.7, 1.9],\n", 481 | " [ 3. , 2.1],\n", 482 | " [ 2.5, 2. ],\n", 483 | " [ 2.8, 2.4],\n", 484 | " [ 3.2, 2.3],\n", 485 | " [ 3. , 1.8],\n", 486 | " [ 3.8, 2.2],\n", 487 | " [ 2.6, 2.3],\n", 488 | " [ 2.2, 1.5],\n", 489 | " [ 3.2, 2.3],\n", 490 | " [ 2.8, 2. ],\n", 491 | " [ 2.8, 2. ],\n", 492 | " [ 2.7, 1.8],\n", 493 | " [ 3.3, 2.1],\n", 494 | " [ 3.2, 1.8],\n", 495 | " [ 2.8, 1.8],\n", 496 | " [ 3. , 1.8],\n", 497 | " [ 2.8, 2.1],\n", 498 | " [ 3. , 1.6],\n", 499 | " [ 2.8, 1.9],\n", 500 | " [ 3.8, 2. ],\n", 501 | " [ 2.8, 2.2],\n", 502 | " [ 2.8, 1.5],\n", 503 | " [ 2.6, 1.4],\n", 504 | " [ 3. , 2.3],\n", 505 | " [ 3.4, 2.4],\n", 506 | " [ 3.1, 1.8],\n", 507 | " [ 3. , 1.8],\n", 508 | " [ 3.1, 2.1],\n", 509 | " [ 3.1, 2.4],\n", 510 | " [ 3.1, 2.3],\n", 511 | " [ 2.7, 1.9],\n", 512 | " [ 3.2, 2.3],\n", 513 | " [ 3.3, 2.5],\n", 514 | " [ 3. , 2.3],\n", 515 | " [ 2.5, 1.9],\n", 516 | " [ 3. , 2. ],\n", 517 | " [ 3.4, 2.3],\n", 518 | " [ 3. , 1.8]])" 519 | ] 520 | }, 521 | "execution_count": 20, 522 | "metadata": {}, 523 | "output_type": "execute_result" 524 | } 525 | ], 526 | "source": [ 527 | "from sklearn.feature_selection import RFE\n", 528 | "from sklearn.linear_model import LogisticRegression\n", 529 | "\n", 530 | "#递归特征消除法,返回特征选择后的数据\n", 531 | "#参数estimator为基模型\n", 532 | "#参数n_features_to_select为选择的特征个数\n", 533 | "RFE(estimator=LogisticRegression(), n_features_to_select=2).fit_transform(iris.data,iris.target)" 534 | ] 535 | }, 536 | { 537 | "cell_type": "code", 538 | "execution_count": 21, 539 | "metadata": {}, 540 | "outputs": [ 541 | { 542 | "data": { 543 | "text/plain": [ 544 | "array([[ 1.4, 0.2],\n", 545 | " [ 1.4, 0.2],\n", 546 | " [ 1.3, 0.2],\n", 547 | " [ 1.5, 0.2],\n", 548 | " [ 1.4, 0.2],\n", 549 | " [ 1.7, 0.4],\n", 550 | " [ 1.4, 0.3],\n", 551 | " [ 1.5, 0.2],\n", 552 | " [ 1.4, 0.2],\n", 553 | " [ 1.5, 0.1],\n", 554 | " [ 1.5, 0.2],\n", 555 | " [ 1.6, 0.2],\n", 556 | " [ 1.4, 0.1],\n", 557 | " [ 1.1, 0.1],\n", 558 | " [ 1.2, 0.2],\n", 559 | " [ 1.5, 0.4],\n", 560 | " [ 1.3, 0.4],\n", 561 | " [ 1.4, 0.3],\n", 562 | " [ 1.7, 0.3],\n", 563 | " [ 1.5, 0.3],\n", 564 | " [ 1.7, 0.2],\n", 565 | " [ 1.5, 0.4],\n", 566 | " [ 1. , 0.2],\n", 567 | " [ 1.7, 0.5],\n", 568 | " [ 1.9, 0.2],\n", 569 | " [ 1.6, 0.2],\n", 570 | " [ 1.6, 0.4],\n", 571 | " [ 1.5, 0.2],\n", 572 | " [ 1.4, 0.2],\n", 573 | " [ 1.6, 0.2],\n", 574 | " [ 1.6, 0.2],\n", 575 | " [ 1.5, 0.4],\n", 576 | " [ 1.5, 0.1],\n", 577 | " [ 1.4, 0.2],\n", 578 | " [ 1.5, 0.1],\n", 579 | " [ 1.2, 0.2],\n", 580 | " [ 1.3, 0.2],\n", 581 | " [ 1.5, 0.1],\n", 582 | " [ 1.3, 0.2],\n", 583 | " [ 1.5, 0.2],\n", 584 | " [ 1.3, 0.3],\n", 585 | " [ 1.3, 0.3],\n", 586 | " [ 1.3, 0.2],\n", 587 | " [ 1.6, 0.6],\n", 588 | " [ 1.9, 0.4],\n", 589 | " [ 1.4, 0.3],\n", 590 | " [ 1.6, 0.2],\n", 591 | " [ 1.4, 0.2],\n", 592 | " [ 1.5, 0.2],\n", 593 | " [ 1.4, 0.2],\n", 594 | " [ 4.7, 1.4],\n", 595 | " [ 4.5, 1.5],\n", 596 | " [ 4.9, 1.5],\n", 597 | " [ 4. , 1.3],\n", 598 | " [ 4.6, 1.5],\n", 599 | " [ 4.5, 1.3],\n", 600 | " [ 4.7, 1.6],\n", 601 | " [ 3.3, 1. ],\n", 602 | " [ 4.6, 1.3],\n", 603 | " [ 3.9, 1.4],\n", 604 | " [ 3.5, 1. ],\n", 605 | " [ 4.2, 1.5],\n", 606 | " [ 4. , 1. ],\n", 607 | " [ 4.7, 1.4],\n", 608 | " [ 3.6, 1.3],\n", 609 | " [ 4.4, 1.4],\n", 610 | " [ 4.5, 1.5],\n", 611 | " [ 4.1, 1. ],\n", 612 | " [ 4.5, 1.5],\n", 613 | " [ 3.9, 1.1],\n", 614 | " [ 4.8, 1.8],\n", 615 | " [ 4. , 1.3],\n", 616 | " [ 4.9, 1.5],\n", 617 | " [ 4.7, 1.2],\n", 618 | " [ 4.3, 1.3],\n", 619 | " [ 4.4, 1.4],\n", 620 | " [ 4.8, 1.4],\n", 621 | " [ 5. , 1.7],\n", 622 | " [ 4.5, 1.5],\n", 623 | " [ 3.5, 1. ],\n", 624 | " [ 3.8, 1.1],\n", 625 | " [ 3.7, 1. ],\n", 626 | " [ 3.9, 1.2],\n", 627 | " [ 5.1, 1.6],\n", 628 | " [ 4.5, 1.5],\n", 629 | " [ 4.5, 1.6],\n", 630 | " [ 4.7, 1.5],\n", 631 | " [ 4.4, 1.3],\n", 632 | " [ 4.1, 1.3],\n", 633 | " [ 4. , 1.3],\n", 634 | " [ 4.4, 1.2],\n", 635 | " [ 4.6, 1.4],\n", 636 | " [ 4. , 1.2],\n", 637 | " [ 3.3, 1. ],\n", 638 | " [ 4.2, 1.3],\n", 639 | " [ 4.2, 1.2],\n", 640 | " [ 4.2, 1.3],\n", 641 | " [ 4.3, 1.3],\n", 642 | " [ 3. , 1.1],\n", 643 | " [ 4.1, 1.3],\n", 644 | " [ 6. , 2.5],\n", 645 | " [ 5.1, 1.9],\n", 646 | " [ 5.9, 2.1],\n", 647 | " [ 5.6, 1.8],\n", 648 | " [ 5.8, 2.2],\n", 649 | " [ 6.6, 2.1],\n", 650 | " [ 4.5, 1.7],\n", 651 | " [ 6.3, 1.8],\n", 652 | " [ 5.8, 1.8],\n", 653 | " [ 6.1, 2.5],\n", 654 | " [ 5.1, 2. ],\n", 655 | " [ 5.3, 1.9],\n", 656 | " [ 5.5, 2.1],\n", 657 | " [ 5. , 2. ],\n", 658 | " [ 5.1, 2.4],\n", 659 | " [ 5.3, 2.3],\n", 660 | " [ 5.5, 1.8],\n", 661 | " [ 6.7, 2.2],\n", 662 | " [ 6.9, 2.3],\n", 663 | " [ 5. , 1.5],\n", 664 | " [ 5.7, 2.3],\n", 665 | " [ 4.9, 2. ],\n", 666 | " [ 6.7, 2. ],\n", 667 | " [ 4.9, 1.8],\n", 668 | " [ 5.7, 2.1],\n", 669 | " [ 6. , 1.8],\n", 670 | " [ 4.8, 1.8],\n", 671 | " [ 4.9, 1.8],\n", 672 | " [ 5.6, 2.1],\n", 673 | " [ 5.8, 1.6],\n", 674 | " [ 6.1, 1.9],\n", 675 | " [ 6.4, 2. ],\n", 676 | " [ 5.6, 2.2],\n", 677 | " [ 5.1, 1.5],\n", 678 | " [ 5.6, 1.4],\n", 679 | " [ 6.1, 2.3],\n", 680 | " [ 5.6, 2.4],\n", 681 | " [ 5.5, 1.8],\n", 682 | " [ 4.8, 1.8],\n", 683 | " [ 5.4, 2.1],\n", 684 | " [ 5.6, 2.4],\n", 685 | " [ 5.1, 2.3],\n", 686 | " [ 5.1, 1.9],\n", 687 | " [ 5.9, 2.3],\n", 688 | " [ 5.7, 2.5],\n", 689 | " [ 5.2, 2.3],\n", 690 | " [ 5. , 1.9],\n", 691 | " [ 5.2, 2. ],\n", 692 | " [ 5.4, 2.3],\n", 693 | " [ 5.1, 1.8]])" 694 | ] 695 | }, 696 | "execution_count": 21, 697 | "metadata": {}, 698 | "output_type": "execute_result" 699 | } 700 | ], 701 | "source": [ 702 | "from sklearn.feature_selection import SelectFromModel\n", 703 | "from sklearn.ensemble import GradientBoostingClassifier\n", 704 | "\n", 705 | "#GBDT作为基模型的特征选择\n", 706 | "SelectFromModel(GradientBoostingClassifier()).fit_transform(iris.data, iris.target)" 707 | ] 708 | }, 709 | { 710 | "cell_type": "code", 711 | "execution_count": null, 712 | "metadata": { 713 | "collapsed": true 714 | }, 715 | "outputs": [], 716 | "source": [] 717 | } 718 | ], 719 | "metadata": { 720 | "kernelspec": { 721 | "display_name": "Python 3", 722 | "language": "python", 723 | "name": "python3" 724 | }, 725 | "language_info": { 726 | "codemirror_mode": { 727 | "name": "ipython", 728 | "version": 3 729 | }, 730 | "file_extension": ".py", 731 | "mimetype": "text/x-python", 732 | "name": "python", 733 | "nbconvert_exporter": "python", 734 | "pygments_lexer": "ipython3", 735 | "version": "3.6.1" 736 | } 737 | }, 738 | "nbformat": 4, 739 | "nbformat_minor": 2 740 | } 741 | -------------------------------------------------------------------------------- /src/ml/kaggle/titanic/README.md: -------------------------------------------------------------------------------- 1 | 2 | [titanic 问题描述](https://www.kaggle.com/c/titanic) 3 | 4 | [ 机器学习系列(3)_逻辑回归应用之Kaggle泰坦尼克之灾](http://blog.csdn.net/han_xiaoyang/article/details/49797143) 5 | 6 | [TiTanic github](https://github.com/HanXiaoyang/Kaggle_Titanic) 7 | 8 | [分分钟,杀入Kaggle TOP 5% 系列](https://zhuanlan.zhihu.com/p/28795160) 9 | -------------------------------------------------------------------------------- /src/ml/kaggle/titanic/train.csv: -------------------------------------------------------------------------------- 1 | PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked 2 | 1,0,3,"Braund, Mr. Owen Harris",male,22,1,0,A/5 21171,7.25,,S 3 | 2,1,1,"Cumings, Mrs. John Bradley (Florence Briggs Thayer)",female,38,1,0,PC 17599,71.2833,C85,C 4 | 3,1,3,"Heikkinen, Miss. Laina",female,26,0,0,STON/O2. 3101282,7.925,,S 5 | 4,1,1,"Futrelle, Mrs. Jacques Heath (Lily May Peel)",female,35,1,0,113803,53.1,C123,S 6 | 5,0,3,"Allen, Mr. William Henry",male,35,0,0,373450,8.05,,S 7 | 6,0,3,"Moran, Mr. James",male,,0,0,330877,8.4583,,Q 8 | 7,0,1,"McCarthy, Mr. Timothy J",male,54,0,0,17463,51.8625,E46,S 9 | 8,0,3,"Palsson, Master. Gosta Leonard",male,2,3,1,349909,21.075,,S 10 | 9,1,3,"Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)",female,27,0,2,347742,11.1333,,S 11 | 10,1,2,"Nasser, Mrs. Nicholas (Adele Achem)",female,14,1,0,237736,30.0708,,C 12 | 11,1,3,"Sandstrom, Miss. Marguerite Rut",female,4,1,1,PP 9549,16.7,G6,S 13 | 12,1,1,"Bonnell, Miss. Elizabeth",female,58,0,0,113783,26.55,C103,S 14 | 13,0,3,"Saundercock, Mr. William Henry",male,20,0,0,A/5. 2151,8.05,,S 15 | 14,0,3,"Andersson, Mr. Anders Johan",male,39,1,5,347082,31.275,,S 16 | 15,0,3,"Vestrom, Miss. Hulda Amanda Adolfina",female,14,0,0,350406,7.8542,,S 17 | 16,1,2,"Hewlett, Mrs. (Mary D Kingcome) ",female,55,0,0,248706,16,,S 18 | 17,0,3,"Rice, Master. Eugene",male,2,4,1,382652,29.125,,Q 19 | 18,1,2,"Williams, Mr. Charles Eugene",male,,0,0,244373,13,,S 20 | 19,0,3,"Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele)",female,31,1,0,345763,18,,S 21 | 20,1,3,"Masselmani, Mrs. Fatima",female,,0,0,2649,7.225,,C 22 | 21,0,2,"Fynney, Mr. Joseph J",male,35,0,0,239865,26,,S 23 | 22,1,2,"Beesley, Mr. Lawrence",male,34,0,0,248698,13,D56,S 24 | 23,1,3,"McGowan, Miss. Anna ""Annie""",female,15,0,0,330923,8.0292,,Q 25 | 24,1,1,"Sloper, Mr. William Thompson",male,28,0,0,113788,35.5,A6,S 26 | 25,0,3,"Palsson, Miss. Torborg Danira",female,8,3,1,349909,21.075,,S 27 | 26,1,3,"Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson)",female,38,1,5,347077,31.3875,,S 28 | 27,0,3,"Emir, Mr. Farred Chehab",male,,0,0,2631,7.225,,C 29 | 28,0,1,"Fortune, Mr. Charles Alexander",male,19,3,2,19950,263,C23 C25 C27,S 30 | 29,1,3,"O'Dwyer, Miss. Ellen ""Nellie""",female,,0,0,330959,7.8792,,Q 31 | 30,0,3,"Todoroff, Mr. Lalio",male,,0,0,349216,7.8958,,S 32 | 31,0,1,"Uruchurtu, Don. Manuel E",male,40,0,0,PC 17601,27.7208,,C 33 | 32,1,1,"Spencer, Mrs. William Augustus (Marie Eugenie)",female,,1,0,PC 17569,146.5208,B78,C 34 | 33,1,3,"Glynn, Miss. Mary Agatha",female,,0,0,335677,7.75,,Q 35 | 34,0,2,"Wheadon, Mr. Edward H",male,66,0,0,C.A. 24579,10.5,,S 36 | 35,0,1,"Meyer, Mr. Edgar Joseph",male,28,1,0,PC 17604,82.1708,,C 37 | 36,0,1,"Holverson, Mr. Alexander Oskar",male,42,1,0,113789,52,,S 38 | 37,1,3,"Mamee, Mr. Hanna",male,,0,0,2677,7.2292,,C 39 | 38,0,3,"Cann, Mr. Ernest Charles",male,21,0,0,A./5. 2152,8.05,,S 40 | 39,0,3,"Vander Planke, Miss. Augusta Maria",female,18,2,0,345764,18,,S 41 | 40,1,3,"Nicola-Yarred, Miss. Jamila",female,14,1,0,2651,11.2417,,C 42 | 41,0,3,"Ahlin, Mrs. Johan (Johanna Persdotter Larsson)",female,40,1,0,7546,9.475,,S 43 | 42,0,2,"Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott)",female,27,1,0,11668,21,,S 44 | 43,0,3,"Kraeff, Mr. Theodor",male,,0,0,349253,7.8958,,C 45 | 44,1,2,"Laroche, Miss. Simonne Marie Anne Andree",female,3,1,2,SC/Paris 2123,41.5792,,C 46 | 45,1,3,"Devaney, Miss. Margaret Delia",female,19,0,0,330958,7.8792,,Q 47 | 46,0,3,"Rogers, Mr. William John",male,,0,0,S.C./A.4. 23567,8.05,,S 48 | 47,0,3,"Lennon, Mr. Denis",male,,1,0,370371,15.5,,Q 49 | 48,1,3,"O'Driscoll, Miss. Bridget",female,,0,0,14311,7.75,,Q 50 | 49,0,3,"Samaan, Mr. Youssef",male,,2,0,2662,21.6792,,C 51 | 50,0,3,"Arnold-Franchi, Mrs. Josef (Josefine Franchi)",female,18,1,0,349237,17.8,,S 52 | 51,0,3,"Panula, Master. Juha Niilo",male,7,4,1,3101295,39.6875,,S 53 | 52,0,3,"Nosworthy, Mr. Richard Cater",male,21,0,0,A/4. 39886,7.8,,S 54 | 53,1,1,"Harper, Mrs. Henry Sleeper (Myna Haxtun)",female,49,1,0,PC 17572,76.7292,D33,C 55 | 54,1,2,"Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson)",female,29,1,0,2926,26,,S 56 | 55,0,1,"Ostby, Mr. Engelhart Cornelius",male,65,0,1,113509,61.9792,B30,C 57 | 56,1,1,"Woolner, Mr. Hugh",male,,0,0,19947,35.5,C52,S 58 | 57,1,2,"Rugg, Miss. Emily",female,21,0,0,C.A. 31026,10.5,,S 59 | 58,0,3,"Novel, Mr. Mansouer",male,28.5,0,0,2697,7.2292,,C 60 | 59,1,2,"West, Miss. Constance Mirium",female,5,1,2,C.A. 34651,27.75,,S 61 | 60,0,3,"Goodwin, Master. William Frederick",male,11,5,2,CA 2144,46.9,,S 62 | 61,0,3,"Sirayanian, Mr. Orsen",male,22,0,0,2669,7.2292,,C 63 | 62,1,1,"Icard, Miss. Amelie",female,38,0,0,113572,80,B28, 64 | 63,0,1,"Harris, Mr. Henry Birkhardt",male,45,1,0,36973,83.475,C83,S 65 | 64,0,3,"Skoog, Master. Harald",male,4,3,2,347088,27.9,,S 66 | 65,0,1,"Stewart, Mr. Albert A",male,,0,0,PC 17605,27.7208,,C 67 | 66,1,3,"Moubarek, Master. Gerios",male,,1,1,2661,15.2458,,C 68 | 67,1,2,"Nye, Mrs. (Elizabeth Ramell)",female,29,0,0,C.A. 29395,10.5,F33,S 69 | 68,0,3,"Crease, Mr. Ernest James",male,19,0,0,S.P. 3464,8.1583,,S 70 | 69,1,3,"Andersson, Miss. Erna Alexandra",female,17,4,2,3101281,7.925,,S 71 | 70,0,3,"Kink, Mr. Vincenz",male,26,2,0,315151,8.6625,,S 72 | 71,0,2,"Jenkin, Mr. Stephen Curnow",male,32,0,0,C.A. 33111,10.5,,S 73 | 72,0,3,"Goodwin, Miss. Lillian Amy",female,16,5,2,CA 2144,46.9,,S 74 | 73,0,2,"Hood, Mr. Ambrose Jr",male,21,0,0,S.O.C. 14879,73.5,,S 75 | 74,0,3,"Chronopoulos, Mr. Apostolos",male,26,1,0,2680,14.4542,,C 76 | 75,1,3,"Bing, Mr. Lee",male,32,0,0,1601,56.4958,,S 77 | 76,0,3,"Moen, Mr. Sigurd Hansen",male,25,0,0,348123,7.65,F G73,S 78 | 77,0,3,"Staneff, Mr. Ivan",male,,0,0,349208,7.8958,,S 79 | 78,0,3,"Moutal, Mr. Rahamin Haim",male,,0,0,374746,8.05,,S 80 | 79,1,2,"Caldwell, Master. Alden Gates",male,0.83,0,2,248738,29,,S 81 | 80,1,3,"Dowdell, Miss. Elizabeth",female,30,0,0,364516,12.475,,S 82 | 81,0,3,"Waelens, Mr. Achille",male,22,0,0,345767,9,,S 83 | 82,1,3,"Sheerlinck, Mr. Jan Baptist",male,29,0,0,345779,9.5,,S 84 | 83,1,3,"McDermott, Miss. Brigdet Delia",female,,0,0,330932,7.7875,,Q 85 | 84,0,1,"Carrau, Mr. Francisco M",male,28,0,0,113059,47.1,,S 86 | 85,1,2,"Ilett, Miss. Bertha",female,17,0,0,SO/C 14885,10.5,,S 87 | 86,1,3,"Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson)",female,33,3,0,3101278,15.85,,S 88 | 87,0,3,"Ford, Mr. William Neal",male,16,1,3,W./C. 6608,34.375,,S 89 | 88,0,3,"Slocovski, Mr. Selman Francis",male,,0,0,SOTON/OQ 392086,8.05,,S 90 | 89,1,1,"Fortune, Miss. Mabel Helen",female,23,3,2,19950,263,C23 C25 C27,S 91 | 90,0,3,"Celotti, Mr. Francesco",male,24,0,0,343275,8.05,,S 92 | 91,0,3,"Christmann, Mr. Emil",male,29,0,0,343276,8.05,,S 93 | 92,0,3,"Andreasson, Mr. Paul Edvin",male,20,0,0,347466,7.8542,,S 94 | 93,0,1,"Chaffee, Mr. Herbert Fuller",male,46,1,0,W.E.P. 5734,61.175,E31,S 95 | 94,0,3,"Dean, Mr. Bertram Frank",male,26,1,2,C.A. 2315,20.575,,S 96 | 95,0,3,"Coxon, Mr. Daniel",male,59,0,0,364500,7.25,,S 97 | 96,0,3,"Shorney, Mr. Charles Joseph",male,,0,0,374910,8.05,,S 98 | 97,0,1,"Goldschmidt, Mr. George B",male,71,0,0,PC 17754,34.6542,A5,C 99 | 98,1,1,"Greenfield, Mr. William Bertram",male,23,0,1,PC 17759,63.3583,D10 D12,C 100 | 99,1,2,"Doling, Mrs. John T (Ada Julia Bone)",female,34,0,1,231919,23,,S 101 | 100,0,2,"Kantor, Mr. Sinai",male,34,1,0,244367,26,,S 102 | 101,0,3,"Petranec, Miss. Matilda",female,28,0,0,349245,7.8958,,S 103 | 102,0,3,"Petroff, Mr. Pastcho (""Pentcho"")",male,,0,0,349215,7.8958,,S 104 | 103,0,1,"White, Mr. Richard Frasar",male,21,0,1,35281,77.2875,D26,S 105 | 104,0,3,"Johansson, Mr. Gustaf Joel",male,33,0,0,7540,8.6542,,S 106 | 105,0,3,"Gustafsson, Mr. Anders Vilhelm",male,37,2,0,3101276,7.925,,S 107 | 106,0,3,"Mionoff, Mr. Stoytcho",male,28,0,0,349207,7.8958,,S 108 | 107,1,3,"Salkjelsvik, Miss. Anna Kristine",female,21,0,0,343120,7.65,,S 109 | 108,1,3,"Moss, Mr. Albert Johan",male,,0,0,312991,7.775,,S 110 | 109,0,3,"Rekic, Mr. Tido",male,38,0,0,349249,7.8958,,S 111 | 110,1,3,"Moran, Miss. Bertha",female,,1,0,371110,24.15,,Q 112 | 111,0,1,"Porter, Mr. Walter Chamberlain",male,47,0,0,110465,52,C110,S 113 | 112,0,3,"Zabour, Miss. Hileni",female,14.5,1,0,2665,14.4542,,C 114 | 113,0,3,"Barton, Mr. David John",male,22,0,0,324669,8.05,,S 115 | 114,0,3,"Jussila, Miss. Katriina",female,20,1,0,4136,9.825,,S 116 | 115,0,3,"Attalah, Miss. Malake",female,17,0,0,2627,14.4583,,C 117 | 116,0,3,"Pekoniemi, Mr. Edvard",male,21,0,0,STON/O 2. 3101294,7.925,,S 118 | 117,0,3,"Connors, Mr. Patrick",male,70.5,0,0,370369,7.75,,Q 119 | 118,0,2,"Turpin, Mr. William John Robert",male,29,1,0,11668,21,,S 120 | 119,0,1,"Baxter, Mr. Quigg Edmond",male,24,0,1,PC 17558,247.5208,B58 B60,C 121 | 120,0,3,"Andersson, Miss. Ellis Anna Maria",female,2,4,2,347082,31.275,,S 122 | 121,0,2,"Hickman, Mr. Stanley George",male,21,2,0,S.O.C. 14879,73.5,,S 123 | 122,0,3,"Moore, Mr. Leonard Charles",male,,0,0,A4. 54510,8.05,,S 124 | 123,0,2,"Nasser, Mr. Nicholas",male,32.5,1,0,237736,30.0708,,C 125 | 124,1,2,"Webber, Miss. Susan",female,32.5,0,0,27267,13,E101,S 126 | 125,0,1,"White, Mr. Percival Wayland",male,54,0,1,35281,77.2875,D26,S 127 | 126,1,3,"Nicola-Yarred, Master. Elias",male,12,1,0,2651,11.2417,,C 128 | 127,0,3,"McMahon, Mr. Martin",male,,0,0,370372,7.75,,Q 129 | 128,1,3,"Madsen, Mr. Fridtjof Arne",male,24,0,0,C 17369,7.1417,,S 130 | 129,1,3,"Peter, Miss. Anna",female,,1,1,2668,22.3583,F E69,C 131 | 130,0,3,"Ekstrom, Mr. Johan",male,45,0,0,347061,6.975,,S 132 | 131,0,3,"Drazenoic, Mr. Jozef",male,33,0,0,349241,7.8958,,C 133 | 132,0,3,"Coelho, Mr. Domingos Fernandeo",male,20,0,0,SOTON/O.Q. 3101307,7.05,,S 134 | 133,0,3,"Robins, Mrs. Alexander A (Grace Charity Laury)",female,47,1,0,A/5. 3337,14.5,,S 135 | 134,1,2,"Weisz, Mrs. Leopold (Mathilde Francoise Pede)",female,29,1,0,228414,26,,S 136 | 135,0,2,"Sobey, Mr. Samuel James Hayden",male,25,0,0,C.A. 29178,13,,S 137 | 136,0,2,"Richard, Mr. Emile",male,23,0,0,SC/PARIS 2133,15.0458,,C 138 | 137,1,1,"Newsom, Miss. Helen Monypeny",female,19,0,2,11752,26.2833,D47,S 139 | 138,0,1,"Futrelle, Mr. Jacques Heath",male,37,1,0,113803,53.1,C123,S 140 | 139,0,3,"Osen, Mr. Olaf Elon",male,16,0,0,7534,9.2167,,S 141 | 140,0,1,"Giglio, Mr. Victor",male,24,0,0,PC 17593,79.2,B86,C 142 | 141,0,3,"Boulos, Mrs. Joseph (Sultana)",female,,0,2,2678,15.2458,,C 143 | 142,1,3,"Nysten, Miss. Anna Sofia",female,22,0,0,347081,7.75,,S 144 | 143,1,3,"Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck)",female,24,1,0,STON/O2. 3101279,15.85,,S 145 | 144,0,3,"Burke, Mr. Jeremiah",male,19,0,0,365222,6.75,,Q 146 | 145,0,2,"Andrew, Mr. Edgardo Samuel",male,18,0,0,231945,11.5,,S 147 | 146,0,2,"Nicholls, Mr. Joseph Charles",male,19,1,1,C.A. 33112,36.75,,S 148 | 147,1,3,"Andersson, Mr. August Edvard (""Wennerstrom"")",male,27,0,0,350043,7.7958,,S 149 | 148,0,3,"Ford, Miss. Robina Maggie ""Ruby""",female,9,2,2,W./C. 6608,34.375,,S 150 | 149,0,2,"Navratil, Mr. Michel (""Louis M Hoffman"")",male,36.5,0,2,230080,26,F2,S 151 | 150,0,2,"Byles, Rev. Thomas Roussel Davids",male,42,0,0,244310,13,,S 152 | 151,0,2,"Bateman, Rev. Robert James",male,51,0,0,S.O.P. 1166,12.525,,S 153 | 152,1,1,"Pears, Mrs. Thomas (Edith Wearne)",female,22,1,0,113776,66.6,C2,S 154 | 153,0,3,"Meo, Mr. Alfonzo",male,55.5,0,0,A.5. 11206,8.05,,S 155 | 154,0,3,"van Billiard, Mr. Austin Blyler",male,40.5,0,2,A/5. 851,14.5,,S 156 | 155,0,3,"Olsen, Mr. Ole Martin",male,,0,0,Fa 265302,7.3125,,S 157 | 156,0,1,"Williams, Mr. Charles Duane",male,51,0,1,PC 17597,61.3792,,C 158 | 157,1,3,"Gilnagh, Miss. Katherine ""Katie""",female,16,0,0,35851,7.7333,,Q 159 | 158,0,3,"Corn, Mr. Harry",male,30,0,0,SOTON/OQ 392090,8.05,,S 160 | 159,0,3,"Smiljanic, Mr. Mile",male,,0,0,315037,8.6625,,S 161 | 160,0,3,"Sage, Master. Thomas Henry",male,,8,2,CA. 2343,69.55,,S 162 | 161,0,3,"Cribb, Mr. John Hatfield",male,44,0,1,371362,16.1,,S 163 | 162,1,2,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)",female,40,0,0,C.A. 33595,15.75,,S 164 | 163,0,3,"Bengtsson, Mr. John Viktor",male,26,0,0,347068,7.775,,S 165 | 164,0,3,"Calic, Mr. Jovo",male,17,0,0,315093,8.6625,,S 166 | 165,0,3,"Panula, Master. Eino Viljami",male,1,4,1,3101295,39.6875,,S 167 | 166,1,3,"Goldsmith, Master. Frank John William ""Frankie""",male,9,0,2,363291,20.525,,S 168 | 167,1,1,"Chibnall, Mrs. (Edith Martha Bowerman)",female,,0,1,113505,55,E33,S 169 | 168,0,3,"Skoog, Mrs. William (Anna Bernhardina Karlsson)",female,45,1,4,347088,27.9,,S 170 | 169,0,1,"Baumann, Mr. John D",male,,0,0,PC 17318,25.925,,S 171 | 170,0,3,"Ling, Mr. Lee",male,28,0,0,1601,56.4958,,S 172 | 171,0,1,"Van der hoef, Mr. Wyckoff",male,61,0,0,111240,33.5,B19,S 173 | 172,0,3,"Rice, Master. Arthur",male,4,4,1,382652,29.125,,Q 174 | 173,1,3,"Johnson, Miss. Eleanor Ileen",female,1,1,1,347742,11.1333,,S 175 | 174,0,3,"Sivola, Mr. Antti Wilhelm",male,21,0,0,STON/O 2. 3101280,7.925,,S 176 | 175,0,1,"Smith, Mr. James Clinch",male,56,0,0,17764,30.6958,A7,C 177 | 176,0,3,"Klasen, Mr. Klas Albin",male,18,1,1,350404,7.8542,,S 178 | 177,0,3,"Lefebre, Master. Henry Forbes",male,,3,1,4133,25.4667,,S 179 | 178,0,1,"Isham, Miss. Ann Elizabeth",female,50,0,0,PC 17595,28.7125,C49,C 180 | 179,0,2,"Hale, Mr. Reginald",male,30,0,0,250653,13,,S 181 | 180,0,3,"Leonard, Mr. Lionel",male,36,0,0,LINE,0,,S 182 | 181,0,3,"Sage, Miss. Constance Gladys",female,,8,2,CA. 2343,69.55,,S 183 | 182,0,2,"Pernot, Mr. Rene",male,,0,0,SC/PARIS 2131,15.05,,C 184 | 183,0,3,"Asplund, Master. Clarence Gustaf Hugo",male,9,4,2,347077,31.3875,,S 185 | 184,1,2,"Becker, Master. Richard F",male,1,2,1,230136,39,F4,S 186 | 185,1,3,"Kink-Heilmann, Miss. Luise Gretchen",female,4,0,2,315153,22.025,,S 187 | 186,0,1,"Rood, Mr. Hugh Roscoe",male,,0,0,113767,50,A32,S 188 | 187,1,3,"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)",female,,1,0,370365,15.5,,Q 189 | 188,1,1,"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")",male,45,0,0,111428,26.55,,S 190 | 189,0,3,"Bourke, Mr. John",male,40,1,1,364849,15.5,,Q 191 | 190,0,3,"Turcin, Mr. Stjepan",male,36,0,0,349247,7.8958,,S 192 | 191,1,2,"Pinsky, Mrs. (Rosa)",female,32,0,0,234604,13,,S 193 | 192,0,2,"Carbines, Mr. William",male,19,0,0,28424,13,,S 194 | 193,1,3,"Andersen-Jensen, Miss. Carla Christine Nielsine",female,19,1,0,350046,7.8542,,S 195 | 194,1,2,"Navratil, Master. Michel M",male,3,1,1,230080,26,F2,S 196 | 195,1,1,"Brown, Mrs. James Joseph (Margaret Tobin)",female,44,0,0,PC 17610,27.7208,B4,C 197 | 196,1,1,"Lurette, Miss. Elise",female,58,0,0,PC 17569,146.5208,B80,C 198 | 197,0,3,"Mernagh, Mr. Robert",male,,0,0,368703,7.75,,Q 199 | 198,0,3,"Olsen, Mr. Karl Siegwart Andreas",male,42,0,1,4579,8.4042,,S 200 | 199,1,3,"Madigan, Miss. Margaret ""Maggie""",female,,0,0,370370,7.75,,Q 201 | 200,0,2,"Yrois, Miss. Henriette (""Mrs Harbeck"")",female,24,0,0,248747,13,,S 202 | 201,0,3,"Vande Walle, Mr. Nestor Cyriel",male,28,0,0,345770,9.5,,S 203 | 202,0,3,"Sage, Mr. Frederick",male,,8,2,CA. 2343,69.55,,S 204 | 203,0,3,"Johanson, Mr. Jakob Alfred",male,34,0,0,3101264,6.4958,,S 205 | 204,0,3,"Youseff, Mr. Gerious",male,45.5,0,0,2628,7.225,,C 206 | 205,1,3,"Cohen, Mr. Gurshon ""Gus""",male,18,0,0,A/5 3540,8.05,,S 207 | 206,0,3,"Strom, Miss. Telma Matilda",female,2,0,1,347054,10.4625,G6,S 208 | 207,0,3,"Backstrom, Mr. Karl Alfred",male,32,1,0,3101278,15.85,,S 209 | 208,1,3,"Albimona, Mr. Nassef Cassem",male,26,0,0,2699,18.7875,,C 210 | 209,1,3,"Carr, Miss. Helen ""Ellen""",female,16,0,0,367231,7.75,,Q 211 | 210,1,1,"Blank, Mr. Henry",male,40,0,0,112277,31,A31,C 212 | 211,0,3,"Ali, Mr. Ahmed",male,24,0,0,SOTON/O.Q. 3101311,7.05,,S 213 | 212,1,2,"Cameron, Miss. Clear Annie",female,35,0,0,F.C.C. 13528,21,,S 214 | 213,0,3,"Perkin, Mr. John Henry",male,22,0,0,A/5 21174,7.25,,S 215 | 214,0,2,"Givard, Mr. Hans Kristensen",male,30,0,0,250646,13,,S 216 | 215,0,3,"Kiernan, Mr. Philip",male,,1,0,367229,7.75,,Q 217 | 216,1,1,"Newell, Miss. Madeleine",female,31,1,0,35273,113.275,D36,C 218 | 217,1,3,"Honkanen, Miss. Eliina",female,27,0,0,STON/O2. 3101283,7.925,,S 219 | 218,0,2,"Jacobsohn, Mr. Sidney Samuel",male,42,1,0,243847,27,,S 220 | 219,1,1,"Bazzani, Miss. Albina",female,32,0,0,11813,76.2917,D15,C 221 | 220,0,2,"Harris, Mr. Walter",male,30,0,0,W/C 14208,10.5,,S 222 | 221,1,3,"Sunderland, Mr. Victor Francis",male,16,0,0,SOTON/OQ 392089,8.05,,S 223 | 222,0,2,"Bracken, Mr. James H",male,27,0,0,220367,13,,S 224 | 223,0,3,"Green, Mr. George Henry",male,51,0,0,21440,8.05,,S 225 | 224,0,3,"Nenkoff, Mr. Christo",male,,0,0,349234,7.8958,,S 226 | 225,1,1,"Hoyt, Mr. Frederick Maxfield",male,38,1,0,19943,90,C93,S 227 | 226,0,3,"Berglund, Mr. Karl Ivar Sven",male,22,0,0,PP 4348,9.35,,S 228 | 227,1,2,"Mellors, Mr. William John",male,19,0,0,SW/PP 751,10.5,,S 229 | 228,0,3,"Lovell, Mr. John Hall (""Henry"")",male,20.5,0,0,A/5 21173,7.25,,S 230 | 229,0,2,"Fahlstrom, Mr. Arne Jonas",male,18,0,0,236171,13,,S 231 | 230,0,3,"Lefebre, Miss. Mathilde",female,,3,1,4133,25.4667,,S 232 | 231,1,1,"Harris, Mrs. Henry Birkhardt (Irene Wallach)",female,35,1,0,36973,83.475,C83,S 233 | 232,0,3,"Larsson, Mr. Bengt Edvin",male,29,0,0,347067,7.775,,S 234 | 233,0,2,"Sjostedt, Mr. Ernst Adolf",male,59,0,0,237442,13.5,,S 235 | 234,1,3,"Asplund, Miss. Lillian Gertrud",female,5,4,2,347077,31.3875,,S 236 | 235,0,2,"Leyson, Mr. Robert William Norman",male,24,0,0,C.A. 29566,10.5,,S 237 | 236,0,3,"Harknett, Miss. Alice Phoebe",female,,0,0,W./C. 6609,7.55,,S 238 | 237,0,2,"Hold, Mr. Stephen",male,44,1,0,26707,26,,S 239 | 238,1,2,"Collyer, Miss. Marjorie ""Lottie""",female,8,0,2,C.A. 31921,26.25,,S 240 | 239,0,2,"Pengelly, Mr. Frederick William",male,19,0,0,28665,10.5,,S 241 | 240,0,2,"Hunt, Mr. George Henry",male,33,0,0,SCO/W 1585,12.275,,S 242 | 241,0,3,"Zabour, Miss. Thamine",female,,1,0,2665,14.4542,,C 243 | 242,1,3,"Murphy, Miss. Katherine ""Kate""",female,,1,0,367230,15.5,,Q 244 | 243,0,2,"Coleridge, Mr. Reginald Charles",male,29,0,0,W./C. 14263,10.5,,S 245 | 244,0,3,"Maenpaa, Mr. Matti Alexanteri",male,22,0,0,STON/O 2. 3101275,7.125,,S 246 | 245,0,3,"Attalah, Mr. Sleiman",male,30,0,0,2694,7.225,,C 247 | 246,0,1,"Minahan, Dr. William Edward",male,44,2,0,19928,90,C78,Q 248 | 247,0,3,"Lindahl, Miss. Agda Thorilda Viktoria",female,25,0,0,347071,7.775,,S 249 | 248,1,2,"Hamalainen, Mrs. William (Anna)",female,24,0,2,250649,14.5,,S 250 | 249,1,1,"Beckwith, Mr. Richard Leonard",male,37,1,1,11751,52.5542,D35,S 251 | 250,0,2,"Carter, Rev. Ernest Courtenay",male,54,1,0,244252,26,,S 252 | 251,0,3,"Reed, Mr. James George",male,,0,0,362316,7.25,,S 253 | 252,0,3,"Strom, Mrs. Wilhelm (Elna Matilda Persson)",female,29,1,1,347054,10.4625,G6,S 254 | 253,0,1,"Stead, Mr. William Thomas",male,62,0,0,113514,26.55,C87,S 255 | 254,0,3,"Lobb, Mr. William Arthur",male,30,1,0,A/5. 3336,16.1,,S 256 | 255,0,3,"Rosblom, Mrs. Viktor (Helena Wilhelmina)",female,41,0,2,370129,20.2125,,S 257 | 256,1,3,"Touma, Mrs. Darwis (Hanne Youssef Razi)",female,29,0,2,2650,15.2458,,C 258 | 257,1,1,"Thorne, Mrs. Gertrude Maybelle",female,,0,0,PC 17585,79.2,,C 259 | 258,1,1,"Cherry, Miss. Gladys",female,30,0,0,110152,86.5,B77,S 260 | 259,1,1,"Ward, Miss. Anna",female,35,0,0,PC 17755,512.3292,,C 261 | 260,1,2,"Parrish, Mrs. (Lutie Davis)",female,50,0,1,230433,26,,S 262 | 261,0,3,"Smith, Mr. Thomas",male,,0,0,384461,7.75,,Q 263 | 262,1,3,"Asplund, Master. Edvin Rojj Felix",male,3,4,2,347077,31.3875,,S 264 | 263,0,1,"Taussig, Mr. Emil",male,52,1,1,110413,79.65,E67,S 265 | 264,0,1,"Harrison, Mr. William",male,40,0,0,112059,0,B94,S 266 | 265,0,3,"Henry, Miss. Delia",female,,0,0,382649,7.75,,Q 267 | 266,0,2,"Reeves, Mr. David",male,36,0,0,C.A. 17248,10.5,,S 268 | 267,0,3,"Panula, Mr. Ernesti Arvid",male,16,4,1,3101295,39.6875,,S 269 | 268,1,3,"Persson, Mr. Ernst Ulrik",male,25,1,0,347083,7.775,,S 270 | 269,1,1,"Graham, Mrs. William Thompson (Edith Junkins)",female,58,0,1,PC 17582,153.4625,C125,S 271 | 270,1,1,"Bissette, Miss. Amelia",female,35,0,0,PC 17760,135.6333,C99,S 272 | 271,0,1,"Cairns, Mr. Alexander",male,,0,0,113798,31,,S 273 | 272,1,3,"Tornquist, Mr. William Henry",male,25,0,0,LINE,0,,S 274 | 273,1,2,"Mellinger, Mrs. (Elizabeth Anne Maidment)",female,41,0,1,250644,19.5,,S 275 | 274,0,1,"Natsch, Mr. Charles H",male,37,0,1,PC 17596,29.7,C118,C 276 | 275,1,3,"Healy, Miss. Hanora ""Nora""",female,,0,0,370375,7.75,,Q 277 | 276,1,1,"Andrews, Miss. Kornelia Theodosia",female,63,1,0,13502,77.9583,D7,S 278 | 277,0,3,"Lindblom, Miss. Augusta Charlotta",female,45,0,0,347073,7.75,,S 279 | 278,0,2,"Parkes, Mr. Francis ""Frank""",male,,0,0,239853,0,,S 280 | 279,0,3,"Rice, Master. Eric",male,7,4,1,382652,29.125,,Q 281 | 280,1,3,"Abbott, Mrs. Stanton (Rosa Hunt)",female,35,1,1,C.A. 2673,20.25,,S 282 | 281,0,3,"Duane, Mr. Frank",male,65,0,0,336439,7.75,,Q 283 | 282,0,3,"Olsson, Mr. Nils Johan Goransson",male,28,0,0,347464,7.8542,,S 284 | 283,0,3,"de Pelsmaeker, Mr. Alfons",male,16,0,0,345778,9.5,,S 285 | 284,1,3,"Dorking, Mr. Edward Arthur",male,19,0,0,A/5. 10482,8.05,,S 286 | 285,0,1,"Smith, Mr. Richard William",male,,0,0,113056,26,A19,S 287 | 286,0,3,"Stankovic, Mr. Ivan",male,33,0,0,349239,8.6625,,C 288 | 287,1,3,"de Mulder, Mr. Theodore",male,30,0,0,345774,9.5,,S 289 | 288,0,3,"Naidenoff, Mr. Penko",male,22,0,0,349206,7.8958,,S 290 | 289,1,2,"Hosono, Mr. Masabumi",male,42,0,0,237798,13,,S 291 | 290,1,3,"Connolly, Miss. Kate",female,22,0,0,370373,7.75,,Q 292 | 291,1,1,"Barber, Miss. Ellen ""Nellie""",female,26,0,0,19877,78.85,,S 293 | 292,1,1,"Bishop, Mrs. Dickinson H (Helen Walton)",female,19,1,0,11967,91.0792,B49,C 294 | 293,0,2,"Levy, Mr. Rene Jacques",male,36,0,0,SC/Paris 2163,12.875,D,C 295 | 294,0,3,"Haas, Miss. Aloisia",female,24,0,0,349236,8.85,,S 296 | 295,0,3,"Mineff, Mr. Ivan",male,24,0,0,349233,7.8958,,S 297 | 296,0,1,"Lewy, Mr. Ervin G",male,,0,0,PC 17612,27.7208,,C 298 | 297,0,3,"Hanna, Mr. Mansour",male,23.5,0,0,2693,7.2292,,C 299 | 298,0,1,"Allison, Miss. Helen Loraine",female,2,1,2,113781,151.55,C22 C26,S 300 | 299,1,1,"Saalfeld, Mr. Adolphe",male,,0,0,19988,30.5,C106,S 301 | 300,1,1,"Baxter, Mrs. James (Helene DeLaudeniere Chaput)",female,50,0,1,PC 17558,247.5208,B58 B60,C 302 | 301,1,3,"Kelly, Miss. Anna Katherine ""Annie Kate""",female,,0,0,9234,7.75,,Q 303 | 302,1,3,"McCoy, Mr. Bernard",male,,2,0,367226,23.25,,Q 304 | 303,0,3,"Johnson, Mr. William Cahoone Jr",male,19,0,0,LINE,0,,S 305 | 304,1,2,"Keane, Miss. Nora A",female,,0,0,226593,12.35,E101,Q 306 | 305,0,3,"Williams, Mr. Howard Hugh ""Harry""",male,,0,0,A/5 2466,8.05,,S 307 | 306,1,1,"Allison, Master. Hudson Trevor",male,0.92,1,2,113781,151.55,C22 C26,S 308 | 307,1,1,"Fleming, Miss. Margaret",female,,0,0,17421,110.8833,,C 309 | 308,1,1,"Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo)",female,17,1,0,PC 17758,108.9,C65,C 310 | 309,0,2,"Abelson, Mr. Samuel",male,30,1,0,P/PP 3381,24,,C 311 | 310,1,1,"Francatelli, Miss. Laura Mabel",female,30,0,0,PC 17485,56.9292,E36,C 312 | 311,1,1,"Hays, Miss. Margaret Bechstein",female,24,0,0,11767,83.1583,C54,C 313 | 312,1,1,"Ryerson, Miss. Emily Borie",female,18,2,2,PC 17608,262.375,B57 B59 B63 B66,C 314 | 313,0,2,"Lahtinen, Mrs. William (Anna Sylfven)",female,26,1,1,250651,26,,S 315 | 314,0,3,"Hendekovic, Mr. Ignjac",male,28,0,0,349243,7.8958,,S 316 | 315,0,2,"Hart, Mr. Benjamin",male,43,1,1,F.C.C. 13529,26.25,,S 317 | 316,1,3,"Nilsson, Miss. Helmina Josefina",female,26,0,0,347470,7.8542,,S 318 | 317,1,2,"Kantor, Mrs. Sinai (Miriam Sternin)",female,24,1,0,244367,26,,S 319 | 318,0,2,"Moraweck, Dr. Ernest",male,54,0,0,29011,14,,S 320 | 319,1,1,"Wick, Miss. Mary Natalie",female,31,0,2,36928,164.8667,C7,S 321 | 320,1,1,"Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone)",female,40,1,1,16966,134.5,E34,C 322 | 321,0,3,"Dennis, Mr. Samuel",male,22,0,0,A/5 21172,7.25,,S 323 | 322,0,3,"Danoff, Mr. Yoto",male,27,0,0,349219,7.8958,,S 324 | 323,1,2,"Slayter, Miss. Hilda Mary",female,30,0,0,234818,12.35,,Q 325 | 324,1,2,"Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh)",female,22,1,1,248738,29,,S 326 | 325,0,3,"Sage, Mr. George John Jr",male,,8,2,CA. 2343,69.55,,S 327 | 326,1,1,"Young, Miss. Marie Grice",female,36,0,0,PC 17760,135.6333,C32,C 328 | 327,0,3,"Nysveen, Mr. Johan Hansen",male,61,0,0,345364,6.2375,,S 329 | 328,1,2,"Ball, Mrs. (Ada E Hall)",female,36,0,0,28551,13,D,S 330 | 329,1,3,"Goldsmith, Mrs. Frank John (Emily Alice Brown)",female,31,1,1,363291,20.525,,S 331 | 330,1,1,"Hippach, Miss. Jean Gertrude",female,16,0,1,111361,57.9792,B18,C 332 | 331,1,3,"McCoy, Miss. Agnes",female,,2,0,367226,23.25,,Q 333 | 332,0,1,"Partner, Mr. Austen",male,45.5,0,0,113043,28.5,C124,S 334 | 333,0,1,"Graham, Mr. George Edward",male,38,0,1,PC 17582,153.4625,C91,S 335 | 334,0,3,"Vander Planke, Mr. Leo Edmondus",male,16,2,0,345764,18,,S 336 | 335,1,1,"Frauenthal, Mrs. Henry William (Clara Heinsheimer)",female,,1,0,PC 17611,133.65,,S 337 | 336,0,3,"Denkoff, Mr. Mitto",male,,0,0,349225,7.8958,,S 338 | 337,0,1,"Pears, Mr. Thomas Clinton",male,29,1,0,113776,66.6,C2,S 339 | 338,1,1,"Burns, Miss. Elizabeth Margaret",female,41,0,0,16966,134.5,E40,C 340 | 339,1,3,"Dahl, Mr. Karl Edwart",male,45,0,0,7598,8.05,,S 341 | 340,0,1,"Blackwell, Mr. Stephen Weart",male,45,0,0,113784,35.5,T,S 342 | 341,1,2,"Navratil, Master. Edmond Roger",male,2,1,1,230080,26,F2,S 343 | 342,1,1,"Fortune, Miss. Alice Elizabeth",female,24,3,2,19950,263,C23 C25 C27,S 344 | 343,0,2,"Collander, Mr. Erik Gustaf",male,28,0,0,248740,13,,S 345 | 344,0,2,"Sedgwick, Mr. Charles Frederick Waddington",male,25,0,0,244361,13,,S 346 | 345,0,2,"Fox, Mr. Stanley Hubert",male,36,0,0,229236,13,,S 347 | 346,1,2,"Brown, Miss. Amelia ""Mildred""",female,24,0,0,248733,13,F33,S 348 | 347,1,2,"Smith, Miss. Marion Elsie",female,40,0,0,31418,13,,S 349 | 348,1,3,"Davison, Mrs. Thomas Henry (Mary E Finck)",female,,1,0,386525,16.1,,S 350 | 349,1,3,"Coutts, Master. William Loch ""William""",male,3,1,1,C.A. 37671,15.9,,S 351 | 350,0,3,"Dimic, Mr. Jovan",male,42,0,0,315088,8.6625,,S 352 | 351,0,3,"Odahl, Mr. Nils Martin",male,23,0,0,7267,9.225,,S 353 | 352,0,1,"Williams-Lambert, Mr. Fletcher Fellows",male,,0,0,113510,35,C128,S 354 | 353,0,3,"Elias, Mr. Tannous",male,15,1,1,2695,7.2292,,C 355 | 354,0,3,"Arnold-Franchi, Mr. Josef",male,25,1,0,349237,17.8,,S 356 | 355,0,3,"Yousif, Mr. Wazli",male,,0,0,2647,7.225,,C 357 | 356,0,3,"Vanden Steen, Mr. Leo Peter",male,28,0,0,345783,9.5,,S 358 | 357,1,1,"Bowerman, Miss. Elsie Edith",female,22,0,1,113505,55,E33,S 359 | 358,0,2,"Funk, Miss. Annie Clemmer",female,38,0,0,237671,13,,S 360 | 359,1,3,"McGovern, Miss. Mary",female,,0,0,330931,7.8792,,Q 361 | 360,1,3,"Mockler, Miss. Helen Mary ""Ellie""",female,,0,0,330980,7.8792,,Q 362 | 361,0,3,"Skoog, Mr. Wilhelm",male,40,1,4,347088,27.9,,S 363 | 362,0,2,"del Carlo, Mr. Sebastiano",male,29,1,0,SC/PARIS 2167,27.7208,,C 364 | 363,0,3,"Barbara, Mrs. (Catherine David)",female,45,0,1,2691,14.4542,,C 365 | 364,0,3,"Asim, Mr. Adola",male,35,0,0,SOTON/O.Q. 3101310,7.05,,S 366 | 365,0,3,"O'Brien, Mr. Thomas",male,,1,0,370365,15.5,,Q 367 | 366,0,3,"Adahl, Mr. Mauritz Nils Martin",male,30,0,0,C 7076,7.25,,S 368 | 367,1,1,"Warren, Mrs. Frank Manley (Anna Sophia Atkinson)",female,60,1,0,110813,75.25,D37,C 369 | 368,1,3,"Moussa, Mrs. (Mantoura Boulos)",female,,0,0,2626,7.2292,,C 370 | 369,1,3,"Jermyn, Miss. Annie",female,,0,0,14313,7.75,,Q 371 | 370,1,1,"Aubart, Mme. Leontine Pauline",female,24,0,0,PC 17477,69.3,B35,C 372 | 371,1,1,"Harder, Mr. George Achilles",male,25,1,0,11765,55.4417,E50,C 373 | 372,0,3,"Wiklund, Mr. Jakob Alfred",male,18,1,0,3101267,6.4958,,S 374 | 373,0,3,"Beavan, Mr. William Thomas",male,19,0,0,323951,8.05,,S 375 | 374,0,1,"Ringhini, Mr. Sante",male,22,0,0,PC 17760,135.6333,,C 376 | 375,0,3,"Palsson, Miss. Stina Viola",female,3,3,1,349909,21.075,,S 377 | 376,1,1,"Meyer, Mrs. Edgar Joseph (Leila Saks)",female,,1,0,PC 17604,82.1708,,C 378 | 377,1,3,"Landergren, Miss. Aurora Adelia",female,22,0,0,C 7077,7.25,,S 379 | 378,0,1,"Widener, Mr. Harry Elkins",male,27,0,2,113503,211.5,C82,C 380 | 379,0,3,"Betros, Mr. Tannous",male,20,0,0,2648,4.0125,,C 381 | 380,0,3,"Gustafsson, Mr. Karl Gideon",male,19,0,0,347069,7.775,,S 382 | 381,1,1,"Bidois, Miss. Rosalie",female,42,0,0,PC 17757,227.525,,C 383 | 382,1,3,"Nakid, Miss. Maria (""Mary"")",female,1,0,2,2653,15.7417,,C 384 | 383,0,3,"Tikkanen, Mr. Juho",male,32,0,0,STON/O 2. 3101293,7.925,,S 385 | 384,1,1,"Holverson, Mrs. Alexander Oskar (Mary Aline Towner)",female,35,1,0,113789,52,,S 386 | 385,0,3,"Plotcharsky, Mr. Vasil",male,,0,0,349227,7.8958,,S 387 | 386,0,2,"Davies, Mr. Charles Henry",male,18,0,0,S.O.C. 14879,73.5,,S 388 | 387,0,3,"Goodwin, Master. Sidney Leonard",male,1,5,2,CA 2144,46.9,,S 389 | 388,1,2,"Buss, Miss. Kate",female,36,0,0,27849,13,,S 390 | 389,0,3,"Sadlier, Mr. Matthew",male,,0,0,367655,7.7292,,Q 391 | 390,1,2,"Lehmann, Miss. Bertha",female,17,0,0,SC 1748,12,,C 392 | 391,1,1,"Carter, Mr. William Ernest",male,36,1,2,113760,120,B96 B98,S 393 | 392,1,3,"Jansson, Mr. Carl Olof",male,21,0,0,350034,7.7958,,S 394 | 393,0,3,"Gustafsson, Mr. Johan Birger",male,28,2,0,3101277,7.925,,S 395 | 394,1,1,"Newell, Miss. Marjorie",female,23,1,0,35273,113.275,D36,C 396 | 395,1,3,"Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson)",female,24,0,2,PP 9549,16.7,G6,S 397 | 396,0,3,"Johansson, Mr. Erik",male,22,0,0,350052,7.7958,,S 398 | 397,0,3,"Olsson, Miss. Elina",female,31,0,0,350407,7.8542,,S 399 | 398,0,2,"McKane, Mr. Peter David",male,46,0,0,28403,26,,S 400 | 399,0,2,"Pain, Dr. Alfred",male,23,0,0,244278,10.5,,S 401 | 400,1,2,"Trout, Mrs. William H (Jessie L)",female,28,0,0,240929,12.65,,S 402 | 401,1,3,"Niskanen, Mr. Juha",male,39,0,0,STON/O 2. 3101289,7.925,,S 403 | 402,0,3,"Adams, Mr. John",male,26,0,0,341826,8.05,,S 404 | 403,0,3,"Jussila, Miss. Mari Aina",female,21,1,0,4137,9.825,,S 405 | 404,0,3,"Hakkarainen, Mr. Pekka Pietari",male,28,1,0,STON/O2. 3101279,15.85,,S 406 | 405,0,3,"Oreskovic, Miss. Marija",female,20,0,0,315096,8.6625,,S 407 | 406,0,2,"Gale, Mr. Shadrach",male,34,1,0,28664,21,,S 408 | 407,0,3,"Widegren, Mr. Carl/Charles Peter",male,51,0,0,347064,7.75,,S 409 | 408,1,2,"Richards, Master. William Rowe",male,3,1,1,29106,18.75,,S 410 | 409,0,3,"Birkeland, Mr. Hans Martin Monsen",male,21,0,0,312992,7.775,,S 411 | 410,0,3,"Lefebre, Miss. Ida",female,,3,1,4133,25.4667,,S 412 | 411,0,3,"Sdycoff, Mr. Todor",male,,0,0,349222,7.8958,,S 413 | 412,0,3,"Hart, Mr. Henry",male,,0,0,394140,6.8583,,Q 414 | 413,1,1,"Minahan, Miss. Daisy E",female,33,1,0,19928,90,C78,Q 415 | 414,0,2,"Cunningham, Mr. Alfred Fleming",male,,0,0,239853,0,,S 416 | 415,1,3,"Sundman, Mr. Johan Julian",male,44,0,0,STON/O 2. 3101269,7.925,,S 417 | 416,0,3,"Meek, Mrs. Thomas (Annie Louise Rowley)",female,,0,0,343095,8.05,,S 418 | 417,1,2,"Drew, Mrs. James Vivian (Lulu Thorne Christian)",female,34,1,1,28220,32.5,,S 419 | 418,1,2,"Silven, Miss. Lyyli Karoliina",female,18,0,2,250652,13,,S 420 | 419,0,2,"Matthews, Mr. William John",male,30,0,0,28228,13,,S 421 | 420,0,3,"Van Impe, Miss. Catharina",female,10,0,2,345773,24.15,,S 422 | 421,0,3,"Gheorgheff, Mr. Stanio",male,,0,0,349254,7.8958,,C 423 | 422,0,3,"Charters, Mr. David",male,21,0,0,A/5. 13032,7.7333,,Q 424 | 423,0,3,"Zimmerman, Mr. Leo",male,29,0,0,315082,7.875,,S 425 | 424,0,3,"Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren)",female,28,1,1,347080,14.4,,S 426 | 425,0,3,"Rosblom, Mr. Viktor Richard",male,18,1,1,370129,20.2125,,S 427 | 426,0,3,"Wiseman, Mr. Phillippe",male,,0,0,A/4. 34244,7.25,,S 428 | 427,1,2,"Clarke, Mrs. Charles V (Ada Maria Winfield)",female,28,1,0,2003,26,,S 429 | 428,1,2,"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")",female,19,0,0,250655,26,,S 430 | 429,0,3,"Flynn, Mr. James",male,,0,0,364851,7.75,,Q 431 | 430,1,3,"Pickard, Mr. Berk (Berk Trembisky)",male,32,0,0,SOTON/O.Q. 392078,8.05,E10,S 432 | 431,1,1,"Bjornstrom-Steffansson, Mr. Mauritz Hakan",male,28,0,0,110564,26.55,C52,S 433 | 432,1,3,"Thorneycroft, Mrs. Percival (Florence Kate White)",female,,1,0,376564,16.1,,S 434 | 433,1,2,"Louch, Mrs. Charles Alexander (Alice Adelaide Slow)",female,42,1,0,SC/AH 3085,26,,S 435 | 434,0,3,"Kallio, Mr. Nikolai Erland",male,17,0,0,STON/O 2. 3101274,7.125,,S 436 | 435,0,1,"Silvey, Mr. William Baird",male,50,1,0,13507,55.9,E44,S 437 | 436,1,1,"Carter, Miss. Lucile Polk",female,14,1,2,113760,120,B96 B98,S 438 | 437,0,3,"Ford, Miss. Doolina Margaret ""Daisy""",female,21,2,2,W./C. 6608,34.375,,S 439 | 438,1,2,"Richards, Mrs. Sidney (Emily Hocking)",female,24,2,3,29106,18.75,,S 440 | 439,0,1,"Fortune, Mr. Mark",male,64,1,4,19950,263,C23 C25 C27,S 441 | 440,0,2,"Kvillner, Mr. Johan Henrik Johannesson",male,31,0,0,C.A. 18723,10.5,,S 442 | 441,1,2,"Hart, Mrs. Benjamin (Esther Ada Bloomfield)",female,45,1,1,F.C.C. 13529,26.25,,S 443 | 442,0,3,"Hampe, Mr. Leon",male,20,0,0,345769,9.5,,S 444 | 443,0,3,"Petterson, Mr. Johan Emil",male,25,1,0,347076,7.775,,S 445 | 444,1,2,"Reynaldo, Ms. Encarnacion",female,28,0,0,230434,13,,S 446 | 445,1,3,"Johannesen-Bratthammer, Mr. Bernt",male,,0,0,65306,8.1125,,S 447 | 446,1,1,"Dodge, Master. Washington",male,4,0,2,33638,81.8583,A34,S 448 | 447,1,2,"Mellinger, Miss. Madeleine Violet",female,13,0,1,250644,19.5,,S 449 | 448,1,1,"Seward, Mr. Frederic Kimber",male,34,0,0,113794,26.55,,S 450 | 449,1,3,"Baclini, Miss. Marie Catherine",female,5,2,1,2666,19.2583,,C 451 | 450,1,1,"Peuchen, Major. Arthur Godfrey",male,52,0,0,113786,30.5,C104,S 452 | 451,0,2,"West, Mr. Edwy Arthur",male,36,1,2,C.A. 34651,27.75,,S 453 | 452,0,3,"Hagland, Mr. Ingvald Olai Olsen",male,,1,0,65303,19.9667,,S 454 | 453,0,1,"Foreman, Mr. Benjamin Laventall",male,30,0,0,113051,27.75,C111,C 455 | 454,1,1,"Goldenberg, Mr. Samuel L",male,49,1,0,17453,89.1042,C92,C 456 | 455,0,3,"Peduzzi, Mr. Joseph",male,,0,0,A/5 2817,8.05,,S 457 | 456,1,3,"Jalsevac, Mr. Ivan",male,29,0,0,349240,7.8958,,C 458 | 457,0,1,"Millet, Mr. Francis Davis",male,65,0,0,13509,26.55,E38,S 459 | 458,1,1,"Kenyon, Mrs. Frederick R (Marion)",female,,1,0,17464,51.8625,D21,S 460 | 459,1,2,"Toomey, Miss. Ellen",female,50,0,0,F.C.C. 13531,10.5,,S 461 | 460,0,3,"O'Connor, Mr. Maurice",male,,0,0,371060,7.75,,Q 462 | 461,1,1,"Anderson, Mr. Harry",male,48,0,0,19952,26.55,E12,S 463 | 462,0,3,"Morley, Mr. William",male,34,0,0,364506,8.05,,S 464 | 463,0,1,"Gee, Mr. Arthur H",male,47,0,0,111320,38.5,E63,S 465 | 464,0,2,"Milling, Mr. Jacob Christian",male,48,0,0,234360,13,,S 466 | 465,0,3,"Maisner, Mr. Simon",male,,0,0,A/S 2816,8.05,,S 467 | 466,0,3,"Goncalves, Mr. Manuel Estanslas",male,38,0,0,SOTON/O.Q. 3101306,7.05,,S 468 | 467,0,2,"Campbell, Mr. William",male,,0,0,239853,0,,S 469 | 468,0,1,"Smart, Mr. John Montgomery",male,56,0,0,113792,26.55,,S 470 | 469,0,3,"Scanlan, Mr. James",male,,0,0,36209,7.725,,Q 471 | 470,1,3,"Baclini, Miss. Helene Barbara",female,0.75,2,1,2666,19.2583,,C 472 | 471,0,3,"Keefe, Mr. Arthur",male,,0,0,323592,7.25,,S 473 | 472,0,3,"Cacic, Mr. Luka",male,38,0,0,315089,8.6625,,S 474 | 473,1,2,"West, Mrs. Edwy Arthur (Ada Mary Worth)",female,33,1,2,C.A. 34651,27.75,,S 475 | 474,1,2,"Jerwan, Mrs. Amin S (Marie Marthe Thuillard)",female,23,0,0,SC/AH Basle 541,13.7917,D,C 476 | 475,0,3,"Strandberg, Miss. Ida Sofia",female,22,0,0,7553,9.8375,,S 477 | 476,0,1,"Clifford, Mr. George Quincy",male,,0,0,110465,52,A14,S 478 | 477,0,2,"Renouf, Mr. Peter Henry",male,34,1,0,31027,21,,S 479 | 478,0,3,"Braund, Mr. Lewis Richard",male,29,1,0,3460,7.0458,,S 480 | 479,0,3,"Karlsson, Mr. Nils August",male,22,0,0,350060,7.5208,,S 481 | 480,1,3,"Hirvonen, Miss. Hildur E",female,2,0,1,3101298,12.2875,,S 482 | 481,0,3,"Goodwin, Master. Harold Victor",male,9,5,2,CA 2144,46.9,,S 483 | 482,0,2,"Frost, Mr. Anthony Wood ""Archie""",male,,0,0,239854,0,,S 484 | 483,0,3,"Rouse, Mr. Richard Henry",male,50,0,0,A/5 3594,8.05,,S 485 | 484,1,3,"Turkula, Mrs. (Hedwig)",female,63,0,0,4134,9.5875,,S 486 | 485,1,1,"Bishop, Mr. Dickinson H",male,25,1,0,11967,91.0792,B49,C 487 | 486,0,3,"Lefebre, Miss. Jeannie",female,,3,1,4133,25.4667,,S 488 | 487,1,1,"Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby)",female,35,1,0,19943,90,C93,S 489 | 488,0,1,"Kent, Mr. Edward Austin",male,58,0,0,11771,29.7,B37,C 490 | 489,0,3,"Somerton, Mr. Francis William",male,30,0,0,A.5. 18509,8.05,,S 491 | 490,1,3,"Coutts, Master. Eden Leslie ""Neville""",male,9,1,1,C.A. 37671,15.9,,S 492 | 491,0,3,"Hagland, Mr. Konrad Mathias Reiersen",male,,1,0,65304,19.9667,,S 493 | 492,0,3,"Windelov, Mr. Einar",male,21,0,0,SOTON/OQ 3101317,7.25,,S 494 | 493,0,1,"Molson, Mr. Harry Markland",male,55,0,0,113787,30.5,C30,S 495 | 494,0,1,"Artagaveytia, Mr. Ramon",male,71,0,0,PC 17609,49.5042,,C 496 | 495,0,3,"Stanley, Mr. Edward Roland",male,21,0,0,A/4 45380,8.05,,S 497 | 496,0,3,"Yousseff, Mr. Gerious",male,,0,0,2627,14.4583,,C 498 | 497,1,1,"Eustis, Miss. Elizabeth Mussey",female,54,1,0,36947,78.2667,D20,C 499 | 498,0,3,"Shellard, Mr. Frederick William",male,,0,0,C.A. 6212,15.1,,S 500 | 499,0,1,"Allison, Mrs. Hudson J C (Bessie Waldo Daniels)",female,25,1,2,113781,151.55,C22 C26,S 501 | 500,0,3,"Svensson, Mr. Olof",male,24,0,0,350035,7.7958,,S 502 | 501,0,3,"Calic, Mr. Petar",male,17,0,0,315086,8.6625,,S 503 | 502,0,3,"Canavan, Miss. Mary",female,21,0,0,364846,7.75,,Q 504 | 503,0,3,"O'Sullivan, Miss. Bridget Mary",female,,0,0,330909,7.6292,,Q 505 | 504,0,3,"Laitinen, Miss. Kristina Sofia",female,37,0,0,4135,9.5875,,S 506 | 505,1,1,"Maioni, Miss. Roberta",female,16,0,0,110152,86.5,B79,S 507 | 506,0,1,"Penasco y Castellana, Mr. Victor de Satode",male,18,1,0,PC 17758,108.9,C65,C 508 | 507,1,2,"Quick, Mrs. Frederick Charles (Jane Richards)",female,33,0,2,26360,26,,S 509 | 508,1,1,"Bradley, Mr. George (""George Arthur Brayton"")",male,,0,0,111427,26.55,,S 510 | 509,0,3,"Olsen, Mr. Henry Margido",male,28,0,0,C 4001,22.525,,S 511 | 510,1,3,"Lang, Mr. Fang",male,26,0,0,1601,56.4958,,S 512 | 511,1,3,"Daly, Mr. Eugene Patrick",male,29,0,0,382651,7.75,,Q 513 | 512,0,3,"Webber, Mr. James",male,,0,0,SOTON/OQ 3101316,8.05,,S 514 | 513,1,1,"McGough, Mr. James Robert",male,36,0,0,PC 17473,26.2875,E25,S 515 | 514,1,1,"Rothschild, Mrs. Martin (Elizabeth L. Barrett)",female,54,1,0,PC 17603,59.4,,C 516 | 515,0,3,"Coleff, Mr. Satio",male,24,0,0,349209,7.4958,,S 517 | 516,0,1,"Walker, Mr. William Anderson",male,47,0,0,36967,34.0208,D46,S 518 | 517,1,2,"Lemore, Mrs. (Amelia Milley)",female,34,0,0,C.A. 34260,10.5,F33,S 519 | 518,0,3,"Ryan, Mr. Patrick",male,,0,0,371110,24.15,,Q 520 | 519,1,2,"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)",female,36,1,0,226875,26,,S 521 | 520,0,3,"Pavlovic, Mr. Stefo",male,32,0,0,349242,7.8958,,S 522 | 521,1,1,"Perreault, Miss. Anne",female,30,0,0,12749,93.5,B73,S 523 | 522,0,3,"Vovk, Mr. Janko",male,22,0,0,349252,7.8958,,S 524 | 523,0,3,"Lahoud, Mr. Sarkis",male,,0,0,2624,7.225,,C 525 | 524,1,1,"Hippach, Mrs. Louis Albert (Ida Sophia Fischer)",female,44,0,1,111361,57.9792,B18,C 526 | 525,0,3,"Kassem, Mr. Fared",male,,0,0,2700,7.2292,,C 527 | 526,0,3,"Farrell, Mr. James",male,40.5,0,0,367232,7.75,,Q 528 | 527,1,2,"Ridsdale, Miss. Lucy",female,50,0,0,W./C. 14258,10.5,,S 529 | 528,0,1,"Farthing, Mr. John",male,,0,0,PC 17483,221.7792,C95,S 530 | 529,0,3,"Salonen, Mr. Johan Werner",male,39,0,0,3101296,7.925,,S 531 | 530,0,2,"Hocking, Mr. Richard George",male,23,2,1,29104,11.5,,S 532 | 531,1,2,"Quick, Miss. Phyllis May",female,2,1,1,26360,26,,S 533 | 532,0,3,"Toufik, Mr. Nakli",male,,0,0,2641,7.2292,,C 534 | 533,0,3,"Elias, Mr. Joseph Jr",male,17,1,1,2690,7.2292,,C 535 | 534,1,3,"Peter, Mrs. Catherine (Catherine Rizk)",female,,0,2,2668,22.3583,,C 536 | 535,0,3,"Cacic, Miss. Marija",female,30,0,0,315084,8.6625,,S 537 | 536,1,2,"Hart, Miss. Eva Miriam",female,7,0,2,F.C.C. 13529,26.25,,S 538 | 537,0,1,"Butt, Major. Archibald Willingham",male,45,0,0,113050,26.55,B38,S 539 | 538,1,1,"LeRoy, Miss. Bertha",female,30,0,0,PC 17761,106.425,,C 540 | 539,0,3,"Risien, Mr. Samuel Beard",male,,0,0,364498,14.5,,S 541 | 540,1,1,"Frolicher, Miss. Hedwig Margaritha",female,22,0,2,13568,49.5,B39,C 542 | 541,1,1,"Crosby, Miss. Harriet R",female,36,0,2,WE/P 5735,71,B22,S 543 | 542,0,3,"Andersson, Miss. Ingeborg Constanzia",female,9,4,2,347082,31.275,,S 544 | 543,0,3,"Andersson, Miss. Sigrid Elisabeth",female,11,4,2,347082,31.275,,S 545 | 544,1,2,"Beane, Mr. Edward",male,32,1,0,2908,26,,S 546 | 545,0,1,"Douglas, Mr. Walter Donald",male,50,1,0,PC 17761,106.425,C86,C 547 | 546,0,1,"Nicholson, Mr. Arthur Ernest",male,64,0,0,693,26,,S 548 | 547,1,2,"Beane, Mrs. Edward (Ethel Clarke)",female,19,1,0,2908,26,,S 549 | 548,1,2,"Padro y Manent, Mr. Julian",male,,0,0,SC/PARIS 2146,13.8625,,C 550 | 549,0,3,"Goldsmith, Mr. Frank John",male,33,1,1,363291,20.525,,S 551 | 550,1,2,"Davies, Master. John Morgan Jr",male,8,1,1,C.A. 33112,36.75,,S 552 | 551,1,1,"Thayer, Mr. John Borland Jr",male,17,0,2,17421,110.8833,C70,C 553 | 552,0,2,"Sharp, Mr. Percival James R",male,27,0,0,244358,26,,S 554 | 553,0,3,"O'Brien, Mr. Timothy",male,,0,0,330979,7.8292,,Q 555 | 554,1,3,"Leeni, Mr. Fahim (""Philip Zenni"")",male,22,0,0,2620,7.225,,C 556 | 555,1,3,"Ohman, Miss. Velin",female,22,0,0,347085,7.775,,S 557 | 556,0,1,"Wright, Mr. George",male,62,0,0,113807,26.55,,S 558 | 557,1,1,"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")",female,48,1,0,11755,39.6,A16,C 559 | 558,0,1,"Robbins, Mr. Victor",male,,0,0,PC 17757,227.525,,C 560 | 559,1,1,"Taussig, Mrs. Emil (Tillie Mandelbaum)",female,39,1,1,110413,79.65,E67,S 561 | 560,1,3,"de Messemaeker, Mrs. Guillaume Joseph (Emma)",female,36,1,0,345572,17.4,,S 562 | 561,0,3,"Morrow, Mr. Thomas Rowan",male,,0,0,372622,7.75,,Q 563 | 562,0,3,"Sivic, Mr. Husein",male,40,0,0,349251,7.8958,,S 564 | 563,0,2,"Norman, Mr. Robert Douglas",male,28,0,0,218629,13.5,,S 565 | 564,0,3,"Simmons, Mr. John",male,,0,0,SOTON/OQ 392082,8.05,,S 566 | 565,0,3,"Meanwell, Miss. (Marion Ogden)",female,,0,0,SOTON/O.Q. 392087,8.05,,S 567 | 566,0,3,"Davies, Mr. Alfred J",male,24,2,0,A/4 48871,24.15,,S 568 | 567,0,3,"Stoytcheff, Mr. Ilia",male,19,0,0,349205,7.8958,,S 569 | 568,0,3,"Palsson, Mrs. Nils (Alma Cornelia Berglund)",female,29,0,4,349909,21.075,,S 570 | 569,0,3,"Doharr, Mr. Tannous",male,,0,0,2686,7.2292,,C 571 | 570,1,3,"Jonsson, Mr. Carl",male,32,0,0,350417,7.8542,,S 572 | 571,1,2,"Harris, Mr. George",male,62,0,0,S.W./PP 752,10.5,,S 573 | 572,1,1,"Appleton, Mrs. Edward Dale (Charlotte Lamson)",female,53,2,0,11769,51.4792,C101,S 574 | 573,1,1,"Flynn, Mr. John Irwin (""Irving"")",male,36,0,0,PC 17474,26.3875,E25,S 575 | 574,1,3,"Kelly, Miss. Mary",female,,0,0,14312,7.75,,Q 576 | 575,0,3,"Rush, Mr. Alfred George John",male,16,0,0,A/4. 20589,8.05,,S 577 | 576,0,3,"Patchett, Mr. George",male,19,0,0,358585,14.5,,S 578 | 577,1,2,"Garside, Miss. Ethel",female,34,0,0,243880,13,,S 579 | 578,1,1,"Silvey, Mrs. William Baird (Alice Munger)",female,39,1,0,13507,55.9,E44,S 580 | 579,0,3,"Caram, Mrs. Joseph (Maria Elias)",female,,1,0,2689,14.4583,,C 581 | 580,1,3,"Jussila, Mr. Eiriik",male,32,0,0,STON/O 2. 3101286,7.925,,S 582 | 581,1,2,"Christy, Miss. Julie Rachel",female,25,1,1,237789,30,,S 583 | 582,1,1,"Thayer, Mrs. John Borland (Marian Longstreth Morris)",female,39,1,1,17421,110.8833,C68,C 584 | 583,0,2,"Downton, Mr. William James",male,54,0,0,28403,26,,S 585 | 584,0,1,"Ross, Mr. John Hugo",male,36,0,0,13049,40.125,A10,C 586 | 585,0,3,"Paulner, Mr. Uscher",male,,0,0,3411,8.7125,,C 587 | 586,1,1,"Taussig, Miss. Ruth",female,18,0,2,110413,79.65,E68,S 588 | 587,0,2,"Jarvis, Mr. John Denzil",male,47,0,0,237565,15,,S 589 | 588,1,1,"Frolicher-Stehli, Mr. Maxmillian",male,60,1,1,13567,79.2,B41,C 590 | 589,0,3,"Gilinski, Mr. Eliezer",male,22,0,0,14973,8.05,,S 591 | 590,0,3,"Murdlin, Mr. Joseph",male,,0,0,A./5. 3235,8.05,,S 592 | 591,0,3,"Rintamaki, Mr. Matti",male,35,0,0,STON/O 2. 3101273,7.125,,S 593 | 592,1,1,"Stephenson, Mrs. Walter Bertram (Martha Eustis)",female,52,1,0,36947,78.2667,D20,C 594 | 593,0,3,"Elsbury, Mr. William James",male,47,0,0,A/5 3902,7.25,,S 595 | 594,0,3,"Bourke, Miss. Mary",female,,0,2,364848,7.75,,Q 596 | 595,0,2,"Chapman, Mr. John Henry",male,37,1,0,SC/AH 29037,26,,S 597 | 596,0,3,"Van Impe, Mr. Jean Baptiste",male,36,1,1,345773,24.15,,S 598 | 597,1,2,"Leitch, Miss. Jessie Wills",female,,0,0,248727,33,,S 599 | 598,0,3,"Johnson, Mr. Alfred",male,49,0,0,LINE,0,,S 600 | 599,0,3,"Boulos, Mr. Hanna",male,,0,0,2664,7.225,,C 601 | 600,1,1,"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")",male,49,1,0,PC 17485,56.9292,A20,C 602 | 601,1,2,"Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy)",female,24,2,1,243847,27,,S 603 | 602,0,3,"Slabenoff, Mr. Petco",male,,0,0,349214,7.8958,,S 604 | 603,0,1,"Harrington, Mr. Charles H",male,,0,0,113796,42.4,,S 605 | 604,0,3,"Torber, Mr. Ernst William",male,44,0,0,364511,8.05,,S 606 | 605,1,1,"Homer, Mr. Harry (""Mr E Haven"")",male,35,0,0,111426,26.55,,C 607 | 606,0,3,"Lindell, Mr. Edvard Bengtsson",male,36,1,0,349910,15.55,,S 608 | 607,0,3,"Karaic, Mr. Milan",male,30,0,0,349246,7.8958,,S 609 | 608,1,1,"Daniel, Mr. Robert Williams",male,27,0,0,113804,30.5,,S 610 | 609,1,2,"Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue)",female,22,1,2,SC/Paris 2123,41.5792,,C 611 | 610,1,1,"Shutes, Miss. Elizabeth W",female,40,0,0,PC 17582,153.4625,C125,S 612 | 611,0,3,"Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren)",female,39,1,5,347082,31.275,,S 613 | 612,0,3,"Jardin, Mr. Jose Neto",male,,0,0,SOTON/O.Q. 3101305,7.05,,S 614 | 613,1,3,"Murphy, Miss. Margaret Jane",female,,1,0,367230,15.5,,Q 615 | 614,0,3,"Horgan, Mr. John",male,,0,0,370377,7.75,,Q 616 | 615,0,3,"Brocklebank, Mr. William Alfred",male,35,0,0,364512,8.05,,S 617 | 616,1,2,"Herman, Miss. Alice",female,24,1,2,220845,65,,S 618 | 617,0,3,"Danbom, Mr. Ernst Gilbert",male,34,1,1,347080,14.4,,S 619 | 618,0,3,"Lobb, Mrs. William Arthur (Cordelia K Stanlick)",female,26,1,0,A/5. 3336,16.1,,S 620 | 619,1,2,"Becker, Miss. Marion Louise",female,4,2,1,230136,39,F4,S 621 | 620,0,2,"Gavey, Mr. Lawrence",male,26,0,0,31028,10.5,,S 622 | 621,0,3,"Yasbeck, Mr. Antoni",male,27,1,0,2659,14.4542,,C 623 | 622,1,1,"Kimball, Mr. Edwin Nelson Jr",male,42,1,0,11753,52.5542,D19,S 624 | 623,1,3,"Nakid, Mr. Sahid",male,20,1,1,2653,15.7417,,C 625 | 624,0,3,"Hansen, Mr. Henry Damsgaard",male,21,0,0,350029,7.8542,,S 626 | 625,0,3,"Bowen, Mr. David John ""Dai""",male,21,0,0,54636,16.1,,S 627 | 626,0,1,"Sutton, Mr. Frederick",male,61,0,0,36963,32.3208,D50,S 628 | 627,0,2,"Kirkland, Rev. Charles Leonard",male,57,0,0,219533,12.35,,Q 629 | 628,1,1,"Longley, Miss. Gretchen Fiske",female,21,0,0,13502,77.9583,D9,S 630 | 629,0,3,"Bostandyeff, Mr. Guentcho",male,26,0,0,349224,7.8958,,S 631 | 630,0,3,"O'Connell, Mr. Patrick D",male,,0,0,334912,7.7333,,Q 632 | 631,1,1,"Barkworth, Mr. Algernon Henry Wilson",male,80,0,0,27042,30,A23,S 633 | 632,0,3,"Lundahl, Mr. Johan Svensson",male,51,0,0,347743,7.0542,,S 634 | 633,1,1,"Stahelin-Maeglin, Dr. Max",male,32,0,0,13214,30.5,B50,C 635 | 634,0,1,"Parr, Mr. William Henry Marsh",male,,0,0,112052,0,,S 636 | 635,0,3,"Skoog, Miss. Mabel",female,9,3,2,347088,27.9,,S 637 | 636,1,2,"Davis, Miss. Mary",female,28,0,0,237668,13,,S 638 | 637,0,3,"Leinonen, Mr. Antti Gustaf",male,32,0,0,STON/O 2. 3101292,7.925,,S 639 | 638,0,2,"Collyer, Mr. Harvey",male,31,1,1,C.A. 31921,26.25,,S 640 | 639,0,3,"Panula, Mrs. Juha (Maria Emilia Ojala)",female,41,0,5,3101295,39.6875,,S 641 | 640,0,3,"Thorneycroft, Mr. Percival",male,,1,0,376564,16.1,,S 642 | 641,0,3,"Jensen, Mr. Hans Peder",male,20,0,0,350050,7.8542,,S 643 | 642,1,1,"Sagesser, Mlle. Emma",female,24,0,0,PC 17477,69.3,B35,C 644 | 643,0,3,"Skoog, Miss. Margit Elizabeth",female,2,3,2,347088,27.9,,S 645 | 644,1,3,"Foo, Mr. Choong",male,,0,0,1601,56.4958,,S 646 | 645,1,3,"Baclini, Miss. Eugenie",female,0.75,2,1,2666,19.2583,,C 647 | 646,1,1,"Harper, Mr. Henry Sleeper",male,48,1,0,PC 17572,76.7292,D33,C 648 | 647,0,3,"Cor, Mr. Liudevit",male,19,0,0,349231,7.8958,,S 649 | 648,1,1,"Simonius-Blumer, Col. Oberst Alfons",male,56,0,0,13213,35.5,A26,C 650 | 649,0,3,"Willey, Mr. Edward",male,,0,0,S.O./P.P. 751,7.55,,S 651 | 650,1,3,"Stanley, Miss. Amy Zillah Elsie",female,23,0,0,CA. 2314,7.55,,S 652 | 651,0,3,"Mitkoff, Mr. Mito",male,,0,0,349221,7.8958,,S 653 | 652,1,2,"Doling, Miss. Elsie",female,18,0,1,231919,23,,S 654 | 653,0,3,"Kalvik, Mr. Johannes Halvorsen",male,21,0,0,8475,8.4333,,S 655 | 654,1,3,"O'Leary, Miss. Hanora ""Norah""",female,,0,0,330919,7.8292,,Q 656 | 655,0,3,"Hegarty, Miss. Hanora ""Nora""",female,18,0,0,365226,6.75,,Q 657 | 656,0,2,"Hickman, Mr. Leonard Mark",male,24,2,0,S.O.C. 14879,73.5,,S 658 | 657,0,3,"Radeff, Mr. Alexander",male,,0,0,349223,7.8958,,S 659 | 658,0,3,"Bourke, Mrs. John (Catherine)",female,32,1,1,364849,15.5,,Q 660 | 659,0,2,"Eitemiller, Mr. George Floyd",male,23,0,0,29751,13,,S 661 | 660,0,1,"Newell, Mr. Arthur Webster",male,58,0,2,35273,113.275,D48,C 662 | 661,1,1,"Frauenthal, Dr. Henry William",male,50,2,0,PC 17611,133.65,,S 663 | 662,0,3,"Badt, Mr. Mohamed",male,40,0,0,2623,7.225,,C 664 | 663,0,1,"Colley, Mr. Edward Pomeroy",male,47,0,0,5727,25.5875,E58,S 665 | 664,0,3,"Coleff, Mr. Peju",male,36,0,0,349210,7.4958,,S 666 | 665,1,3,"Lindqvist, Mr. Eino William",male,20,1,0,STON/O 2. 3101285,7.925,,S 667 | 666,0,2,"Hickman, Mr. Lewis",male,32,2,0,S.O.C. 14879,73.5,,S 668 | 667,0,2,"Butler, Mr. Reginald Fenton",male,25,0,0,234686,13,,S 669 | 668,0,3,"Rommetvedt, Mr. Knud Paust",male,,0,0,312993,7.775,,S 670 | 669,0,3,"Cook, Mr. Jacob",male,43,0,0,A/5 3536,8.05,,S 671 | 670,1,1,"Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright)",female,,1,0,19996,52,C126,S 672 | 671,1,2,"Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford)",female,40,1,1,29750,39,,S 673 | 672,0,1,"Davidson, Mr. Thornton",male,31,1,0,F.C. 12750,52,B71,S 674 | 673,0,2,"Mitchell, Mr. Henry Michael",male,70,0,0,C.A. 24580,10.5,,S 675 | 674,1,2,"Wilhelms, Mr. Charles",male,31,0,0,244270,13,,S 676 | 675,0,2,"Watson, Mr. Ennis Hastings",male,,0,0,239856,0,,S 677 | 676,0,3,"Edvardsson, Mr. Gustaf Hjalmar",male,18,0,0,349912,7.775,,S 678 | 677,0,3,"Sawyer, Mr. Frederick Charles",male,24.5,0,0,342826,8.05,,S 679 | 678,1,3,"Turja, Miss. Anna Sofia",female,18,0,0,4138,9.8417,,S 680 | 679,0,3,"Goodwin, Mrs. Frederick (Augusta Tyler)",female,43,1,6,CA 2144,46.9,,S 681 | 680,1,1,"Cardeza, Mr. Thomas Drake Martinez",male,36,0,1,PC 17755,512.3292,B51 B53 B55,C 682 | 681,0,3,"Peters, Miss. Katie",female,,0,0,330935,8.1375,,Q 683 | 682,1,1,"Hassab, Mr. Hammad",male,27,0,0,PC 17572,76.7292,D49,C 684 | 683,0,3,"Olsvigen, Mr. Thor Anderson",male,20,0,0,6563,9.225,,S 685 | 684,0,3,"Goodwin, Mr. Charles Edward",male,14,5,2,CA 2144,46.9,,S 686 | 685,0,2,"Brown, Mr. Thomas William Solomon",male,60,1,1,29750,39,,S 687 | 686,0,2,"Laroche, Mr. Joseph Philippe Lemercier",male,25,1,2,SC/Paris 2123,41.5792,,C 688 | 687,0,3,"Panula, Mr. Jaako Arnold",male,14,4,1,3101295,39.6875,,S 689 | 688,0,3,"Dakic, Mr. Branko",male,19,0,0,349228,10.1708,,S 690 | 689,0,3,"Fischer, Mr. Eberhard Thelander",male,18,0,0,350036,7.7958,,S 691 | 690,1,1,"Madill, Miss. Georgette Alexandra",female,15,0,1,24160,211.3375,B5,S 692 | 691,1,1,"Dick, Mr. Albert Adrian",male,31,1,0,17474,57,B20,S 693 | 692,1,3,"Karun, Miss. Manca",female,4,0,1,349256,13.4167,,C 694 | 693,1,3,"Lam, Mr. Ali",male,,0,0,1601,56.4958,,S 695 | 694,0,3,"Saad, Mr. Khalil",male,25,0,0,2672,7.225,,C 696 | 695,0,1,"Weir, Col. John",male,60,0,0,113800,26.55,,S 697 | 696,0,2,"Chapman, Mr. Charles Henry",male,52,0,0,248731,13.5,,S 698 | 697,0,3,"Kelly, Mr. James",male,44,0,0,363592,8.05,,S 699 | 698,1,3,"Mullens, Miss. Katherine ""Katie""",female,,0,0,35852,7.7333,,Q 700 | 699,0,1,"Thayer, Mr. John Borland",male,49,1,1,17421,110.8833,C68,C 701 | 700,0,3,"Humblen, Mr. Adolf Mathias Nicolai Olsen",male,42,0,0,348121,7.65,F G63,S 702 | 701,1,1,"Astor, Mrs. John Jacob (Madeleine Talmadge Force)",female,18,1,0,PC 17757,227.525,C62 C64,C 703 | 702,1,1,"Silverthorne, Mr. Spencer Victor",male,35,0,0,PC 17475,26.2875,E24,S 704 | 703,0,3,"Barbara, Miss. Saiide",female,18,0,1,2691,14.4542,,C 705 | 704,0,3,"Gallagher, Mr. Martin",male,25,0,0,36864,7.7417,,Q 706 | 705,0,3,"Hansen, Mr. Henrik Juul",male,26,1,0,350025,7.8542,,S 707 | 706,0,2,"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")",male,39,0,0,250655,26,,S 708 | 707,1,2,"Kelly, Mrs. Florence ""Fannie""",female,45,0,0,223596,13.5,,S 709 | 708,1,1,"Calderhead, Mr. Edward Pennington",male,42,0,0,PC 17476,26.2875,E24,S 710 | 709,1,1,"Cleaver, Miss. Alice",female,22,0,0,113781,151.55,,S 711 | 710,1,3,"Moubarek, Master. Halim Gonios (""William George"")",male,,1,1,2661,15.2458,,C 712 | 711,1,1,"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")",female,24,0,0,PC 17482,49.5042,C90,C 713 | 712,0,1,"Klaber, Mr. Herman",male,,0,0,113028,26.55,C124,S 714 | 713,1,1,"Taylor, Mr. Elmer Zebley",male,48,1,0,19996,52,C126,S 715 | 714,0,3,"Larsson, Mr. August Viktor",male,29,0,0,7545,9.4833,,S 716 | 715,0,2,"Greenberg, Mr. Samuel",male,52,0,0,250647,13,,S 717 | 716,0,3,"Soholt, Mr. Peter Andreas Lauritz Andersen",male,19,0,0,348124,7.65,F G73,S 718 | 717,1,1,"Endres, Miss. Caroline Louise",female,38,0,0,PC 17757,227.525,C45,C 719 | 718,1,2,"Troutt, Miss. Edwina Celia ""Winnie""",female,27,0,0,34218,10.5,E101,S 720 | 719,0,3,"McEvoy, Mr. Michael",male,,0,0,36568,15.5,,Q 721 | 720,0,3,"Johnson, Mr. Malkolm Joackim",male,33,0,0,347062,7.775,,S 722 | 721,1,2,"Harper, Miss. Annie Jessie ""Nina""",female,6,0,1,248727,33,,S 723 | 722,0,3,"Jensen, Mr. Svend Lauritz",male,17,1,0,350048,7.0542,,S 724 | 723,0,2,"Gillespie, Mr. William Henry",male,34,0,0,12233,13,,S 725 | 724,0,2,"Hodges, Mr. Henry Price",male,50,0,0,250643,13,,S 726 | 725,1,1,"Chambers, Mr. Norman Campbell",male,27,1,0,113806,53.1,E8,S 727 | 726,0,3,"Oreskovic, Mr. Luka",male,20,0,0,315094,8.6625,,S 728 | 727,1,2,"Renouf, Mrs. Peter Henry (Lillian Jefferys)",female,30,3,0,31027,21,,S 729 | 728,1,3,"Mannion, Miss. Margareth",female,,0,0,36866,7.7375,,Q 730 | 729,0,2,"Bryhl, Mr. Kurt Arnold Gottfrid",male,25,1,0,236853,26,,S 731 | 730,0,3,"Ilmakangas, Miss. Pieta Sofia",female,25,1,0,STON/O2. 3101271,7.925,,S 732 | 731,1,1,"Allen, Miss. Elisabeth Walton",female,29,0,0,24160,211.3375,B5,S 733 | 732,0,3,"Hassan, Mr. Houssein G N",male,11,0,0,2699,18.7875,,C 734 | 733,0,2,"Knight, Mr. Robert J",male,,0,0,239855,0,,S 735 | 734,0,2,"Berriman, Mr. William John",male,23,0,0,28425,13,,S 736 | 735,0,2,"Troupiansky, Mr. Moses Aaron",male,23,0,0,233639,13,,S 737 | 736,0,3,"Williams, Mr. Leslie",male,28.5,0,0,54636,16.1,,S 738 | 737,0,3,"Ford, Mrs. Edward (Margaret Ann Watson)",female,48,1,3,W./C. 6608,34.375,,S 739 | 738,1,1,"Lesurer, Mr. Gustave J",male,35,0,0,PC 17755,512.3292,B101,C 740 | 739,0,3,"Ivanoff, Mr. Kanio",male,,0,0,349201,7.8958,,S 741 | 740,0,3,"Nankoff, Mr. Minko",male,,0,0,349218,7.8958,,S 742 | 741,1,1,"Hawksford, Mr. Walter James",male,,0,0,16988,30,D45,S 743 | 742,0,1,"Cavendish, Mr. Tyrell William",male,36,1,0,19877,78.85,C46,S 744 | 743,1,1,"Ryerson, Miss. Susan Parker ""Suzette""",female,21,2,2,PC 17608,262.375,B57 B59 B63 B66,C 745 | 744,0,3,"McNamee, Mr. Neal",male,24,1,0,376566,16.1,,S 746 | 745,1,3,"Stranden, Mr. Juho",male,31,0,0,STON/O 2. 3101288,7.925,,S 747 | 746,0,1,"Crosby, Capt. Edward Gifford",male,70,1,1,WE/P 5735,71,B22,S 748 | 747,0,3,"Abbott, Mr. Rossmore Edward",male,16,1,1,C.A. 2673,20.25,,S 749 | 748,1,2,"Sinkkonen, Miss. Anna",female,30,0,0,250648,13,,S 750 | 749,0,1,"Marvin, Mr. Daniel Warner",male,19,1,0,113773,53.1,D30,S 751 | 750,0,3,"Connaghton, Mr. Michael",male,31,0,0,335097,7.75,,Q 752 | 751,1,2,"Wells, Miss. Joan",female,4,1,1,29103,23,,S 753 | 752,1,3,"Moor, Master. Meier",male,6,0,1,392096,12.475,E121,S 754 | 753,0,3,"Vande Velde, Mr. Johannes Joseph",male,33,0,0,345780,9.5,,S 755 | 754,0,3,"Jonkoff, Mr. Lalio",male,23,0,0,349204,7.8958,,S 756 | 755,1,2,"Herman, Mrs. Samuel (Jane Laver)",female,48,1,2,220845,65,,S 757 | 756,1,2,"Hamalainen, Master. Viljo",male,0.67,1,1,250649,14.5,,S 758 | 757,0,3,"Carlsson, Mr. August Sigfrid",male,28,0,0,350042,7.7958,,S 759 | 758,0,2,"Bailey, Mr. Percy Andrew",male,18,0,0,29108,11.5,,S 760 | 759,0,3,"Theobald, Mr. Thomas Leonard",male,34,0,0,363294,8.05,,S 761 | 760,1,1,"Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards)",female,33,0,0,110152,86.5,B77,S 762 | 761,0,3,"Garfirth, Mr. John",male,,0,0,358585,14.5,,S 763 | 762,0,3,"Nirva, Mr. Iisakki Antino Aijo",male,41,0,0,SOTON/O2 3101272,7.125,,S 764 | 763,1,3,"Barah, Mr. Hanna Assi",male,20,0,0,2663,7.2292,,C 765 | 764,1,1,"Carter, Mrs. William Ernest (Lucile Polk)",female,36,1,2,113760,120,B96 B98,S 766 | 765,0,3,"Eklund, Mr. Hans Linus",male,16,0,0,347074,7.775,,S 767 | 766,1,1,"Hogeboom, Mrs. John C (Anna Andrews)",female,51,1,0,13502,77.9583,D11,S 768 | 767,0,1,"Brewe, Dr. Arthur Jackson",male,,0,0,112379,39.6,,C 769 | 768,0,3,"Mangan, Miss. Mary",female,30.5,0,0,364850,7.75,,Q 770 | 769,0,3,"Moran, Mr. Daniel J",male,,1,0,371110,24.15,,Q 771 | 770,0,3,"Gronnestad, Mr. Daniel Danielsen",male,32,0,0,8471,8.3625,,S 772 | 771,0,3,"Lievens, Mr. Rene Aime",male,24,0,0,345781,9.5,,S 773 | 772,0,3,"Jensen, Mr. Niels Peder",male,48,0,0,350047,7.8542,,S 774 | 773,0,2,"Mack, Mrs. (Mary)",female,57,0,0,S.O./P.P. 3,10.5,E77,S 775 | 774,0,3,"Elias, Mr. Dibo",male,,0,0,2674,7.225,,C 776 | 775,1,2,"Hocking, Mrs. Elizabeth (Eliza Needs)",female,54,1,3,29105,23,,S 777 | 776,0,3,"Myhrman, Mr. Pehr Fabian Oliver Malkolm",male,18,0,0,347078,7.75,,S 778 | 777,0,3,"Tobin, Mr. Roger",male,,0,0,383121,7.75,F38,Q 779 | 778,1,3,"Emanuel, Miss. Virginia Ethel",female,5,0,0,364516,12.475,,S 780 | 779,0,3,"Kilgannon, Mr. Thomas J",male,,0,0,36865,7.7375,,Q 781 | 780,1,1,"Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)",female,43,0,1,24160,211.3375,B3,S 782 | 781,1,3,"Ayoub, Miss. Banoura",female,13,0,0,2687,7.2292,,C 783 | 782,1,1,"Dick, Mrs. Albert Adrian (Vera Gillespie)",female,17,1,0,17474,57,B20,S 784 | 783,0,1,"Long, Mr. Milton Clyde",male,29,0,0,113501,30,D6,S 785 | 784,0,3,"Johnston, Mr. Andrew G",male,,1,2,W./C. 6607,23.45,,S 786 | 785,0,3,"Ali, Mr. William",male,25,0,0,SOTON/O.Q. 3101312,7.05,,S 787 | 786,0,3,"Harmer, Mr. Abraham (David Lishin)",male,25,0,0,374887,7.25,,S 788 | 787,1,3,"Sjoblom, Miss. Anna Sofia",female,18,0,0,3101265,7.4958,,S 789 | 788,0,3,"Rice, Master. George Hugh",male,8,4,1,382652,29.125,,Q 790 | 789,1,3,"Dean, Master. Bertram Vere",male,1,1,2,C.A. 2315,20.575,,S 791 | 790,0,1,"Guggenheim, Mr. Benjamin",male,46,0,0,PC 17593,79.2,B82 B84,C 792 | 791,0,3,"Keane, Mr. Andrew ""Andy""",male,,0,0,12460,7.75,,Q 793 | 792,0,2,"Gaskell, Mr. Alfred",male,16,0,0,239865,26,,S 794 | 793,0,3,"Sage, Miss. Stella Anna",female,,8,2,CA. 2343,69.55,,S 795 | 794,0,1,"Hoyt, Mr. William Fisher",male,,0,0,PC 17600,30.6958,,C 796 | 795,0,3,"Dantcheff, Mr. Ristiu",male,25,0,0,349203,7.8958,,S 797 | 796,0,2,"Otter, Mr. Richard",male,39,0,0,28213,13,,S 798 | 797,1,1,"Leader, Dr. Alice (Farnham)",female,49,0,0,17465,25.9292,D17,S 799 | 798,1,3,"Osman, Mrs. Mara",female,31,0,0,349244,8.6833,,S 800 | 799,0,3,"Ibrahim Shawah, Mr. Yousseff",male,30,0,0,2685,7.2292,,C 801 | 800,0,3,"Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert)",female,30,1,1,345773,24.15,,S 802 | 801,0,2,"Ponesell, Mr. Martin",male,34,0,0,250647,13,,S 803 | 802,1,2,"Collyer, Mrs. Harvey (Charlotte Annie Tate)",female,31,1,1,C.A. 31921,26.25,,S 804 | 803,1,1,"Carter, Master. William Thornton II",male,11,1,2,113760,120,B96 B98,S 805 | 804,1,3,"Thomas, Master. Assad Alexander",male,0.42,0,1,2625,8.5167,,C 806 | 805,1,3,"Hedman, Mr. Oskar Arvid",male,27,0,0,347089,6.975,,S 807 | 806,0,3,"Johansson, Mr. Karl Johan",male,31,0,0,347063,7.775,,S 808 | 807,0,1,"Andrews, Mr. Thomas Jr",male,39,0,0,112050,0,A36,S 809 | 808,0,3,"Pettersson, Miss. Ellen Natalia",female,18,0,0,347087,7.775,,S 810 | 809,0,2,"Meyer, Mr. August",male,39,0,0,248723,13,,S 811 | 810,1,1,"Chambers, Mrs. Norman Campbell (Bertha Griggs)",female,33,1,0,113806,53.1,E8,S 812 | 811,0,3,"Alexander, Mr. William",male,26,0,0,3474,7.8875,,S 813 | 812,0,3,"Lester, Mr. James",male,39,0,0,A/4 48871,24.15,,S 814 | 813,0,2,"Slemen, Mr. Richard James",male,35,0,0,28206,10.5,,S 815 | 814,0,3,"Andersson, Miss. Ebba Iris Alfrida",female,6,4,2,347082,31.275,,S 816 | 815,0,3,"Tomlin, Mr. Ernest Portage",male,30.5,0,0,364499,8.05,,S 817 | 816,0,1,"Fry, Mr. Richard",male,,0,0,112058,0,B102,S 818 | 817,0,3,"Heininen, Miss. Wendla Maria",female,23,0,0,STON/O2. 3101290,7.925,,S 819 | 818,0,2,"Mallet, Mr. Albert",male,31,1,1,S.C./PARIS 2079,37.0042,,C 820 | 819,0,3,"Holm, Mr. John Fredrik Alexander",male,43,0,0,C 7075,6.45,,S 821 | 820,0,3,"Skoog, Master. Karl Thorsten",male,10,3,2,347088,27.9,,S 822 | 821,1,1,"Hays, Mrs. Charles Melville (Clara Jennings Gregg)",female,52,1,1,12749,93.5,B69,S 823 | 822,1,3,"Lulic, Mr. Nikola",male,27,0,0,315098,8.6625,,S 824 | 823,0,1,"Reuchlin, Jonkheer. John George",male,38,0,0,19972,0,,S 825 | 824,1,3,"Moor, Mrs. (Beila)",female,27,0,1,392096,12.475,E121,S 826 | 825,0,3,"Panula, Master. Urho Abraham",male,2,4,1,3101295,39.6875,,S 827 | 826,0,3,"Flynn, Mr. John",male,,0,0,368323,6.95,,Q 828 | 827,0,3,"Lam, Mr. Len",male,,0,0,1601,56.4958,,S 829 | 828,1,2,"Mallet, Master. Andre",male,1,0,2,S.C./PARIS 2079,37.0042,,C 830 | 829,1,3,"McCormack, Mr. Thomas Joseph",male,,0,0,367228,7.75,,Q 831 | 830,1,1,"Stone, Mrs. George Nelson (Martha Evelyn)",female,62,0,0,113572,80,B28, 832 | 831,1,3,"Yasbeck, Mrs. Antoni (Selini Alexander)",female,15,1,0,2659,14.4542,,C 833 | 832,1,2,"Richards, Master. George Sibley",male,0.83,1,1,29106,18.75,,S 834 | 833,0,3,"Saad, Mr. Amin",male,,0,0,2671,7.2292,,C 835 | 834,0,3,"Augustsson, Mr. Albert",male,23,0,0,347468,7.8542,,S 836 | 835,0,3,"Allum, Mr. Owen George",male,18,0,0,2223,8.3,,S 837 | 836,1,1,"Compton, Miss. Sara Rebecca",female,39,1,1,PC 17756,83.1583,E49,C 838 | 837,0,3,"Pasic, Mr. Jakob",male,21,0,0,315097,8.6625,,S 839 | 838,0,3,"Sirota, Mr. Maurice",male,,0,0,392092,8.05,,S 840 | 839,1,3,"Chip, Mr. Chang",male,32,0,0,1601,56.4958,,S 841 | 840,1,1,"Marechal, Mr. Pierre",male,,0,0,11774,29.7,C47,C 842 | 841,0,3,"Alhomaki, Mr. Ilmari Rudolf",male,20,0,0,SOTON/O2 3101287,7.925,,S 843 | 842,0,2,"Mudd, Mr. Thomas Charles",male,16,0,0,S.O./P.P. 3,10.5,,S 844 | 843,1,1,"Serepeca, Miss. Augusta",female,30,0,0,113798,31,,C 845 | 844,0,3,"Lemberopolous, Mr. Peter L",male,34.5,0,0,2683,6.4375,,C 846 | 845,0,3,"Culumovic, Mr. Jeso",male,17,0,0,315090,8.6625,,S 847 | 846,0,3,"Abbing, Mr. Anthony",male,42,0,0,C.A. 5547,7.55,,S 848 | 847,0,3,"Sage, Mr. Douglas Bullen",male,,8,2,CA. 2343,69.55,,S 849 | 848,0,3,"Markoff, Mr. Marin",male,35,0,0,349213,7.8958,,C 850 | 849,0,2,"Harper, Rev. John",male,28,0,1,248727,33,,S 851 | 850,1,1,"Goldenberg, Mrs. Samuel L (Edwiga Grabowska)",female,,1,0,17453,89.1042,C92,C 852 | 851,0,3,"Andersson, Master. Sigvard Harald Elias",male,4,4,2,347082,31.275,,S 853 | 852,0,3,"Svensson, Mr. Johan",male,74,0,0,347060,7.775,,S 854 | 853,0,3,"Boulos, Miss. Nourelain",female,9,1,1,2678,15.2458,,C 855 | 854,1,1,"Lines, Miss. Mary Conover",female,16,0,1,PC 17592,39.4,D28,S 856 | 855,0,2,"Carter, Mrs. Ernest Courtenay (Lilian Hughes)",female,44,1,0,244252,26,,S 857 | 856,1,3,"Aks, Mrs. Sam (Leah Rosen)",female,18,0,1,392091,9.35,,S 858 | 857,1,1,"Wick, Mrs. George Dennick (Mary Hitchcock)",female,45,1,1,36928,164.8667,,S 859 | 858,1,1,"Daly, Mr. Peter Denis ",male,51,0,0,113055,26.55,E17,S 860 | 859,1,3,"Baclini, Mrs. Solomon (Latifa Qurban)",female,24,0,3,2666,19.2583,,C 861 | 860,0,3,"Razi, Mr. Raihed",male,,0,0,2629,7.2292,,C 862 | 861,0,3,"Hansen, Mr. Claus Peter",male,41,2,0,350026,14.1083,,S 863 | 862,0,2,"Giles, Mr. Frederick Edward",male,21,1,0,28134,11.5,,S 864 | 863,1,1,"Swift, Mrs. Frederick Joel (Margaret Welles Barron)",female,48,0,0,17466,25.9292,D17,S 865 | 864,0,3,"Sage, Miss. Dorothy Edith ""Dolly""",female,,8,2,CA. 2343,69.55,,S 866 | 865,0,2,"Gill, Mr. John William",male,24,0,0,233866,13,,S 867 | 866,1,2,"Bystrom, Mrs. (Karolina)",female,42,0,0,236852,13,,S 868 | 867,1,2,"Duran y More, Miss. Asuncion",female,27,1,0,SC/PARIS 2149,13.8583,,C 869 | 868,0,1,"Roebling, Mr. Washington Augustus II",male,31,0,0,PC 17590,50.4958,A24,S 870 | 869,0,3,"van Melkebeke, Mr. Philemon",male,,0,0,345777,9.5,,S 871 | 870,1,3,"Johnson, Master. Harold Theodor",male,4,1,1,347742,11.1333,,S 872 | 871,0,3,"Balkic, Mr. Cerin",male,26,0,0,349248,7.8958,,S 873 | 872,1,1,"Beckwith, Mrs. Richard Leonard (Sallie Monypeny)",female,47,1,1,11751,52.5542,D35,S 874 | 873,0,1,"Carlsson, Mr. Frans Olof",male,33,0,0,695,5,B51 B53 B55,S 875 | 874,0,3,"Vander Cruyssen, Mr. Victor",male,47,0,0,345765,9,,S 876 | 875,1,2,"Abelson, Mrs. Samuel (Hannah Wizosky)",female,28,1,0,P/PP 3381,24,,C 877 | 876,1,3,"Najib, Miss. Adele Kiamie ""Jane""",female,15,0,0,2667,7.225,,C 878 | 877,0,3,"Gustafsson, Mr. Alfred Ossian",male,20,0,0,7534,9.8458,,S 879 | 878,0,3,"Petroff, Mr. Nedelio",male,19,0,0,349212,7.8958,,S 880 | 879,0,3,"Laleff, Mr. Kristo",male,,0,0,349217,7.8958,,S 881 | 880,1,1,"Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)",female,56,0,1,11767,83.1583,C50,C 882 | 881,1,2,"Shelley, Mrs. William (Imanita Parrish Hall)",female,25,0,1,230433,26,,S 883 | 882,0,3,"Markun, Mr. Johann",male,33,0,0,349257,7.8958,,S 884 | 883,0,3,"Dahlberg, Miss. Gerda Ulrika",female,22,0,0,7552,10.5167,,S 885 | 884,0,2,"Banfield, Mr. Frederick James",male,28,0,0,C.A./SOTON 34068,10.5,,S 886 | 885,0,3,"Sutehall, Mr. Henry Jr",male,25,0,0,SOTON/OQ 392076,7.05,,S 887 | 886,0,3,"Rice, Mrs. William (Margaret Norton)",female,39,0,5,382652,29.125,,Q 888 | 887,0,2,"Montvila, Rev. Juozas",male,27,0,0,211536,13,,S 889 | 888,1,1,"Graham, Miss. Margaret Edith",female,19,0,0,112053,30,B42,S 890 | 889,0,3,"Johnston, Miss. Catherine Helen ""Carrie""",female,,1,2,W./C. 6607,23.45,,S 891 | 890,1,1,"Behr, Mr. Karl Howell",male,26,0,0,111369,30,C148,C 892 | 891,0,3,"Dooley, Mr. Patrick",male,32,0,0,370376,7.75,,Q 893 | -------------------------------------------------------------------------------- /src/ml/np.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | import numpy as np 3 | 4 | # 定义一维数组 5 | a = np.array([2, 0, 1, 5, 8, 3]) 6 | print(u'原始数据:', a) 7 | 8 | #输出最大、最小值及形状 9 | print(u'最小值:', a.min()) 10 | print(u'最大值:', a.max()) 11 | print(u'形状', a.shape) 12 | 13 | # 数据切片 14 | print(u'切片操作:') 15 | # [:-2]后面两个两个值不取 16 | print(a[:-2]) 17 | #[-2:]表示后往前数两个数字,获取数字至结尾 18 | print(a[-2:]) 19 | #[:1]表示从头开始获取,获取1个数字 20 | print(a[:1]) 21 | print(np.sum(a)) 22 | 23 | # 排序 24 | print(type(a)) 25 | print(a.dtype) 26 | a.sort() 27 | print(u'排序后:', a) 28 | 29 | 30 | #二维数组操作 31 | 32 | 33 | c = np.array([[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10]]) 34 | 35 | # 获取值 36 | print(u'形状:', c.shape) 37 | print(u'获取值:', c[1][0]) 38 | print(u'获取某行:') 39 | print(c[1][:]) 40 | print(u'获取某行并切片:') 41 | print(c[0][:-1]) 42 | print(c[0][-1:]) 43 | 44 | #获取具体某列值 45 | print(u'获取第3列:') 46 | #np.newaxis增加一个新维度 47 | print(c[:,np.newaxis, 2]) 48 | 49 | 50 | #函数 51 | #sin 52 | print(np.sin(np.pi/6)) 53 | print(np.sin(np.pi/2)) 54 | print(np.tan(np.pi/2)) 55 | 56 | print(np.arange(0,4)) 57 | 58 | print(np.random.random_integers(0,5,6)) 59 | -------------------------------------------------------------------------------- /src/ml/pd.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | import pandas as pd 3 | import numpy as np 4 | import matplotlib.pyplot as plt 5 | 6 | s = pd.Series([1,3,5,np.nan,6,8]) 7 | print(s) 8 | dates = pd.date_range('20130101', periods=6) 9 | print(dates) 10 | #创建DataFrame 11 | df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD')) 12 | print(df) 13 | #通过字典创建DataFrame 14 | f2 = pd.DataFrame({ 'A' : 1., 15 | 'B' : pd.Timestamp('20130102'), 16 | 'C' : pd.Series(1,index=list(range(4)),dtype='float32'), 17 | 'D' : np.array([3] * 4,dtype='int32'), 18 | 'E' : pd.Categorical(["test","train","test","train"]), 19 | 'F' : 'foo' }) 20 | print(f2) 21 | 22 | #探索数据 23 | 24 | print("前五行:",df.head()) 25 | print("后三行:",df.tail(3)) 26 | print("index: ",df.index) 27 | print("columns: ",df.columns) 28 | print("values: ",df.values) 29 | print("describe: ",df.describe()) 30 | print("转置:",df.T) 31 | print("按照axis排列:",df.sort_index(axis=0, ascending=False)) 32 | print("按照某列排序:",df.sort_values(by='B')) 33 | print("删除nan:",s.dropna(how='any')) 34 | print("填充nan值:",s.fillna(0)) 35 | -------------------------------------------------------------------------------- /src/ml/plt.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | import pandas as pd 8 | tweets = pd.read_csv("tweets.csv") 9 | tweets.head() 10 | 11 | 12 | # In[3]: 13 | 14 | 15 | def get_candidate(row): 16 | candidates = [] 17 | text = row["text"].lower() 18 | if "clinton" in text or "hillary" in text: 19 | candidates.append("clinton") 20 | if "trump" in text or "donald" in text: 21 | candidates.append("trump") 22 | if "sanders" in text or "bernie" in text: 23 | candidates.append("sanders") 24 | return ",".join(candidates) 25 | 26 | tweets["candidate"] = tweets.apply(get_candidate,axis=1) 27 | tweets.head() 28 | 29 | 30 | # In[14]: 31 | 32 | 33 | import matplotlib.pyplot as plt 34 | import numpy as np 35 | counts = tweets["candidate"].value_counts() 36 | plt.bar(range(len(counts)), counts) 37 | plt.show() 38 | 39 | 40 | # In[16]: 41 | 42 | 43 | #用户年龄统计 44 | from datetime import datetime 45 | 46 | tweets["created"] = pd.to_datetime(tweets["created"]) 47 | tweets["user_created"] = pd.to_datetime(tweets["user_created"]) 48 | 49 | tweets["user_age"] = tweets["user_created"].apply(lambda x: (datetime.now() - x).total_seconds() / 3600 / 24 / 365) 50 | plt.hist(tweets["user_age"]) 51 | plt.title("Tweets mentioning candidates") 52 | plt.xlabel("Twitter account age in years") 53 | plt.ylabel("# of tweets") 54 | plt.show() 55 | 56 | 57 | # In[23]: 58 | 59 | 60 | cl_tweets = tweets["user_age"][tweets["candidate"] == "clinton"] 61 | sa_tweets = tweets["user_age"][tweets["candidate"] == "sanders"] 62 | tr_tweets = tweets["user_age"][tweets["candidate"] == "trump"] 63 | plt.hist([ 64 | cl_tweets, 65 | sa_tweets, 66 | tr_tweets 67 | ], 68 | stacked=True, 69 | label=["clinton", "sanders", "trump"] 70 | ) 71 | plt.legend() 72 | plt.title("Tweets mentioning each candidate") 73 | plt.xlabel("Twitter account age in years") 74 | plt.ylabel("# of tweets") 75 | plt.annotate('More Trump tweets', xy=(2, 35000), xytext=(3, 35000), 76 | arrowprops=dict(facecolor='black')) 77 | plt.show() 78 | 79 | 80 | # In[24]: 81 | 82 | 83 | import matplotlib.colors as colors 84 | 85 | tweets["red"] = tweets["user_bg_color"].apply(lambda x: colors.hex2color('#{0}'.format(x))[0]) 86 | tweets["blue"] = tweets["user_bg_color"].apply(lambda x: colors.hex2color('#{0}'.format(x))[2]) 87 | fig, axes = plt.subplots(nrows=2, ncols=2) 88 | ax0, ax1, ax2, ax3 = axes.flat 89 | 90 | ax0.hist(tweets["red"]) 91 | ax0.set_title('Red in backgrounds') 92 | 93 | ax1.hist(tweets["red"][tweets["candidate"] == "trump"].values) 94 | ax1.set_title('Red in Trump tweeters') 95 | 96 | ax2.hist(tweets["blue"]) 97 | ax2.set_title('Blue in backgrounds') 98 | 99 | ax3.hist(tweets["blue"][tweets["candidate"] == "trump"].values) 100 | ax3.set_title('Blue in Trump tweeters') 101 | 102 | plt.tight_layout() 103 | plt.show() 104 | 105 | 106 | # In[26]: 107 | 108 | 109 | gr = tweets.groupby("candidate").agg([np.mean, np.std]) 110 | 111 | fig, axes = plt.subplots(nrows=2, ncols=1, figsize=(7, 7)) 112 | ax0, ax1 = axes.flat 113 | 114 | std = gr["polarity"]["std"].iloc[1:] 115 | mean = gr["polarity"]["mean"].iloc[1:] 116 | ax0.bar(range(len(std)), std) 117 | ax0.set_xticklabels(std.index, rotation=30) 118 | ax0.set_title('Standard deviation of tweet sentiment') 119 | 120 | ax1.bar(range(len(mean)), mean) 121 | ax1.set_xticklabels(mean.index, rotation=45) 122 | ax1.set_title('Mean tweet sentiment') 123 | 124 | plt.tight_layout() 125 | plt.show() 126 | -------------------------------------------------------------------------------- /src/ml/preprocess.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 3, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "from sklearn.datasets import load_iris\n", 12 | "import numpy as np\n", 13 | "\n", 14 | "X = np.array([[ 1., -1., 2.],\n", 15 | " [ 2., 0., 0.],\n", 16 | " [ 0., 1., -1.]])" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 7, 22 | "metadata": { 23 | "scrolled": true 24 | }, 25 | "outputs": [ 26 | { 27 | "name": "stdout", 28 | "output_type": "stream", 29 | "text": [ 30 | "[[ 0. -1.22474487 1.33630621]\n", 31 | " [ 1.22474487 0. -0.26726124]\n", 32 | " [-1.22474487 1.22474487 -1.06904497]]\n", 33 | "[ 0. 0. 0.]\n", 34 | "[ 1. 1. 1.]\n" 35 | ] 36 | } 37 | ], 38 | "source": [ 39 | "from sklearn import preprocessing\n", 40 | "X_scaled = preprocessing.scale(X)\n", 41 | "print(X_scaled)\n", 42 | "print(X_scaled.mean(axis=0))\n", 43 | "print(X_scaled.std(axis=0))" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 9, 49 | "metadata": {}, 50 | "outputs": [ 51 | { 52 | "name": "stdout", 53 | "output_type": "stream", 54 | "text": [ 55 | "StandardScaler(copy=True, with_mean=True, with_std=True)\n", 56 | "[ 1. 0. 0.33333333]\n", 57 | "[ 0.81649658 0.81649658 1.24721913]\n", 58 | "[[ 0. -1.22474487 1.33630621]\n", 59 | " [ 1.22474487 0. -0.26726124]\n", 60 | " [-1.22474487 1.22474487 -1.06904497]]\n" 61 | ] 62 | }, 63 | { 64 | "data": { 65 | "text/plain": [ 66 | "array([[-2.44948974, 1.22474487, -0.26726124]])" 67 | ] 68 | }, 69 | "execution_count": 9, 70 | "metadata": {}, 71 | "output_type": "execute_result" 72 | } 73 | ], 74 | "source": [ 75 | "scaler = preprocessing.StandardScaler().fit(X)\n", 76 | "print(scaler)\n", 77 | "\n", 78 | "print(scaler.mean_) \n", 79 | "\n", 80 | "print(scaler.scale_) \n", 81 | "\n", 82 | "print(scaler.transform(X))\n", 83 | "scaler.transform([[-1., 1., 0.]]) " 84 | ] 85 | }, 86 | { 87 | "cell_type": "code", 88 | "execution_count": 12, 89 | "metadata": {}, 90 | "outputs": [ 91 | { 92 | "name": "stdout", 93 | "output_type": "stream", 94 | "text": [ 95 | "[[ 0.5 0. 1. ]\n", 96 | " [ 1. 0.5 0.33333333]\n", 97 | " [ 0. 1. 0. ]]\n" 98 | ] 99 | } 100 | ], 101 | "source": [ 102 | "X_train = np.array([[ 1., -1., 2.],\n", 103 | " [ 2., 0., 0.],\n", 104 | " [ 0., 1., -1.]])\n", 105 | "min_max_scaler = preprocessing.MinMaxScaler()\n", 106 | "X_train_minmax = min_max_scaler.fit_transform(X_train)\n", 107 | "print(X_train_minmax)" 108 | ] 109 | }, 110 | { 111 | "cell_type": "code", 112 | "execution_count": 16, 113 | "metadata": {}, 114 | "outputs": [ 115 | { 116 | "name": "stdout", 117 | "output_type": "stream", 118 | "text": [ 119 | "[[ 0.40824829 -0.40824829 0.81649658]\n", 120 | " [ 1. 0. 0. ]\n", 121 | " [ 0. 0.70710678 -0.70710678]]\n" 122 | ] 123 | }, 124 | { 125 | "data": { 126 | "text/plain": [ 127 | "array([[ 0.40824829, -0.40824829, 0.81649658],\n", 128 | " [ 1. , 0. , 0. ],\n", 129 | " [ 0. , 0.70710678, -0.70710678]])" 130 | ] 131 | }, 132 | "execution_count": 16, 133 | "metadata": {}, 134 | "output_type": "execute_result" 135 | } 136 | ], 137 | "source": [ 138 | "X_normalized = preprocessing.normalize(X_train, norm='l2')\n", 139 | "print(X_normalized)\n", 140 | "normalizer = preprocessing.Normalizer().fit(X_train)\n", 141 | "normalizer.transform(X_train)" 142 | ] 143 | }, 144 | { 145 | "cell_type": "code", 146 | "execution_count": 18, 147 | "metadata": {}, 148 | "outputs": [ 149 | { 150 | "data": { 151 | "text/plain": [ 152 | "array([[ 1., 0., 1., 0., 0., 1.],\n", 153 | " [ 1., 2., 3., 4., 6., 9.],\n", 154 | " [ 1., 4., 5., 16., 20., 25.]])" 155 | ] 156 | }, 157 | "execution_count": 18, 158 | "metadata": {}, 159 | "output_type": "execute_result" 160 | } 161 | ], 162 | "source": [ 163 | "import numpy as np\n", 164 | "from sklearn.preprocessing import PolynomialFeatures\n", 165 | "X = np.arange(6).reshape(3, 2)\n", 166 | "PolynomialFeatures(2).fit_transform(X)" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "execution_count": null, 172 | "metadata": { 173 | "collapsed": true 174 | }, 175 | "outputs": [], 176 | "source": [] 177 | } 178 | ], 179 | "metadata": { 180 | "kernelspec": { 181 | "display_name": "Python 3", 182 | "language": "python", 183 | "name": "python3" 184 | }, 185 | "language_info": { 186 | "codemirror_mode": { 187 | "name": "ipython", 188 | "version": 3 189 | }, 190 | "file_extension": ".py", 191 | "mimetype": "text/x-python", 192 | "name": "python", 193 | "nbconvert_exporter": "python", 194 | "pygments_lexer": "ipython3", 195 | "version": "3.6.1" 196 | } 197 | }, 198 | "nbformat": 4, 199 | "nbformat_minor": 2 200 | } 201 | -------------------------------------------------------------------------------- /src/ml/recommend.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | header = ['user_id', 'item_id', 'rating', 'timestamp'] 5 | df = pd.read_csv('ml-100k/u.data', sep='\t', names=header) 6 | n_users = df.user_id.unique().shape[0] 7 | n_items = df.item_id.unique().shape[0] 8 | print('Number of users = ' + str(n_users) + ' | Number of movies = ' + str(n_items)) 9 | #你可以使用scikit-learn库将数据集分割成测试和训练。Cross_validation.train_test_split 10 | #根据测试样本的比例(test_size),本例中是0.25,来将数据混洗并分割成两个数据集 11 | from sklearn import model_selection as ms 12 | train_data, test_data = ms.train_test_split(df, test_size=0.25) 13 | #Create two user-item matrices, one for training and another for testing 14 | train_data_matrix = np.zeros((n_users, n_items)) 15 | for line in train_data.itertuples(): 16 | train_data_matrix[line[1]-1, line[2]-1] = line[3] 17 | test_data_matrix = np.zeros((n_users, n_items)) 18 | for line in test_data.itertuples(): 19 | test_data_matrix[line[1]-1, line[2]-1] = line[3] 20 | 21 | from sklearn.metrics.pairwise import pairwise_distances 22 | user_similarity = pairwise_distances(train_data_matrix, metric='cosine') 23 | item_similarity = pairwise_distances(train_data_matrix.T, metric='cosine') 24 | print(user_similarity) 25 | 26 | def predict(ratings, similarity, type='user'): 27 | #ratings.mean(axis=1) 按行求平均值 28 | if type == 'user': 29 | mean_user_rating = ratings.mean(axis=1) 30 | #You use np.newaxis so that mean_user_rating has same format as ratings 31 | ratings_diff = (ratings - mean_user_rating[:, np.newaxis]) 32 | pred = mean_user_rating[:, np.newaxis] + similarity.dot(ratings_diff) / np.array([np.abs(similarity).sum(axis=1)]).T 33 | elif type == 'item': 34 | pred = ratings.dot(similarity) / np.array([np.abs(similarity).sum(axis=1)]) 35 | return pred 36 | 37 | item_prediction = predict(train_data_matrix, item_similarity, type='item') 38 | user_prediction = predict(train_data_matrix, user_similarity, type='user') 39 | -------------------------------------------------------------------------------- /src/ml/sci.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[2]: 5 | 6 | 7 | import numpy as np 8 | from scipy import linalg 9 | arr = np.array([[1, 2],[3, 4]]) 10 | ##矩阵行列式 11 | print("矩阵行列式:",linalg.det(arr)) 12 | print("矩阵的逆:",linalg.inv(arr)) 13 | 14 | 15 | # In[5]: 16 | 17 | 18 | #奇异值分解 19 | arr = np.arange(9).reshape((3, 3)) + np.diag([1, 0, 1]) 20 | uarr, spec, vharr = linalg.svd(arr) 21 | print(spec) 22 | sarr = np.diag(spec) 23 | svd_mat = uarr.dot(sarr).dot(vharr) 24 | print(svd_mat) 25 | np.allclose(arr,svd_mat) 26 | 27 | 28 | # In[10]: 29 | 30 | 31 | ##傅里叶变换 32 | ##优化 33 | from scipy import optimize 34 | def f(x): 35 | return x**2 + 10*np.sin(x) 36 | import matplotlib.pyplot as plt 37 | x = np.arange(-10, 10, 0.1) 38 | plt.plot(x, f(x)) 39 | plt.show() 40 | ##bfgs依赖于初始点,有可能得到局部最小 41 | optimize.fmin_bfgs(f, 0) 42 | 43 | 44 | # In[12]: 45 | 46 | 47 | optimize.fmin_bfgs(f, 3) 48 | 49 | 50 | # In[13]: 51 | 52 | 53 | ##全局最优 54 | optimize.basinhopping(f, 0) 55 | 56 | 57 | # In[15]: 58 | 59 | 60 | #计算函数的根 61 | #1 只求的一个 62 | root = optimize.fsolve(f, 1) 63 | root 64 | 65 | 66 | # In[16]: 67 | 68 | 69 | ##曲线拟合 70 | xdata = np.linspace(-10, 10, num=20) 71 | ydata = f(xdata) + np.random.randn(xdata.size) 72 | #假设满足函数f2,然后求a、b 73 | def f2(x, a, b): 74 | return a*x**2 + b*np.sin(x) 75 | guess = [2, 2] 76 | params, params_covariance = optimize.curve_fit(f2, xdata, ydata, guess) 77 | params 78 | 79 | 80 | # In[27]: 81 | 82 | 83 | #统计 84 | a = np.random.normal(size=1000) 85 | bins = np.arange(-4, 5) 86 | print(bins) 87 | histogram = np.histogram(a, bins=bins, normed=True)[0] 88 | print(histogram) 89 | bins = 0.5*(bins[1:] + bins[:-1]) 90 | print(bins) 91 | from scipy import stats 92 | #pdf概率密度函数probability density function 93 | b = stats.norm.pdf(bins) 94 | print("pdf:",b) 95 | plt.plot(bins, histogram) 96 | plt.plot(bins, b) 97 | plt.show() 98 | loc, std = stats.norm.fit(a) 99 | print("loc:"+str(loc)+"std:"+str(std)) 100 | #中位数 101 | np.median(a) 102 | 103 | 104 | # In[28]: 105 | 106 | 107 | #50百分位 108 | stats.scoreatpercentile(a, 50) 109 | 110 | 111 | # In[29]: 112 | 113 | 114 | #t检验 115 | a = np.random.normal(0, 1, size=100) 116 | b = np.random.normal(1, 1, size=10) 117 | stats.ttest_ind(a, b) 118 | 119 | 120 | # In[ ]: 121 | -------------------------------------------------------------------------------- /src/ml/sklearn.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 14, 6 | "metadata": { 7 | "scrolled": true 8 | }, 9 | "outputs": [ 10 | { 11 | "name": "stdout", 12 | "output_type": "stream", 13 | "text": [ 14 | "size: 768\n", 15 | "X: [ 6. 148. 72. 35. 0. 33.6 0.627 50. ]\n", 16 | "y: 1.0\n" 17 | ] 18 | } 19 | ], 20 | "source": [ 21 | "import numpy as np\n", 22 | "import urllib.request\n", 23 | "# url with dataset\n", 24 | "url = \"http://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data\"\n", 25 | "# download the file\n", 26 | "raw_data = urllib.request.urlopen(url)\n", 27 | "# load the CSV file as a numpy matrix\n", 28 | "dataset = np.loadtxt(raw_data, delimiter=\",\")\n", 29 | "# separate the data from the target attributes\n", 30 | "X = dataset[:,0:8]\n", 31 | "y = dataset[:,8]\n", 32 | "print(\"size:\",len(dataset))\n", 33 | "print(\"X: \",X[0])\n", 34 | "print(\"y: \",y[0])" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 10, 40 | "metadata": { 41 | "collapsed": true 42 | }, 43 | "outputs": [], 44 | "source": [ 45 | "from sklearn import preprocessing\n", 46 | "# standardize the data attributes\n", 47 | "standardized_X = preprocessing.scale(X)\n", 48 | "# normalize the data attributes\n", 49 | "normalized_X = preprocessing.normalize(X)" 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "execution_count": 11, 55 | "metadata": {}, 56 | "outputs": [ 57 | { 58 | "name": "stdout", 59 | "output_type": "stream", 60 | "text": [ 61 | "[ 0.11193263 0.26076795 0.10153987 0.08278266 0.07190955 0.12292174\n", 62 | " 0.11527441 0.13287119]\n" 63 | ] 64 | } 65 | ], 66 | "source": [ 67 | "from sklearn import metrics\n", 68 | "from sklearn.ensemble import ExtraTreesClassifier\n", 69 | "model = ExtraTreesClassifier()\n", 70 | "model.fit(X, y)\n", 71 | "# display the relative importance of each attribute\n", 72 | "print(model.feature_importances_)" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 12, 78 | "metadata": {}, 79 | "outputs": [ 80 | { 81 | "name": "stdout", 82 | "output_type": "stream", 83 | "text": [ 84 | "[ True False False False False True True False]\n", 85 | "[1 2 3 5 6 1 1 4]\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "from sklearn.feature_selection import RFE\n", 91 | "from sklearn.linear_model import LogisticRegression\n", 92 | "model = LogisticRegression()\n", 93 | "# create the RFE model and select 3 attributes\n", 94 | "rfe = RFE(model, 3)\n", 95 | "rfe = rfe.fit(X, y)\n", 96 | "# summarize the selection of the attributes\n", 97 | "print(rfe.support_)\n", 98 | "print(rfe.ranking_)" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": 13, 104 | "metadata": { 105 | "scrolled": true 106 | }, 107 | "outputs": [ 108 | { 109 | "name": "stdout", 110 | "output_type": "stream", 111 | "text": [ 112 | "LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n", 113 | " intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1,\n", 114 | " penalty='l2', random_state=None, solver='liblinear', tol=0.0001,\n", 115 | " verbose=0, warm_start=False)\n", 116 | " precision recall f1-score support\n", 117 | "\n", 118 | " 0.0 0.79 0.90 0.84 500\n", 119 | " 1.0 0.74 0.55 0.63 268\n", 120 | "\n", 121 | "avg / total 0.77 0.77 0.77 768\n", 122 | "\n", 123 | "[[448 52]\n", 124 | " [121 147]]\n" 125 | ] 126 | } 127 | ], 128 | "source": [ 129 | "from sklearn import metrics\n", 130 | "from sklearn.linear_model import LogisticRegression\n", 131 | "model = LogisticRegression()\n", 132 | "model.fit(X, y)\n", 133 | "print(model)\n", 134 | "# make predictions\n", 135 | "expected = y\n", 136 | "predicted = model.predict(X)\n", 137 | "# summarize the fit of the model\n", 138 | "print(metrics.classification_report(expected, predicted))\n", 139 | "print(metrics.confusion_matrix(expected, predicted))" 140 | ] 141 | }, 142 | { 143 | "cell_type": "code", 144 | "execution_count": 18, 145 | "metadata": {}, 146 | "outputs": [ 147 | { 148 | "name": "stdout", 149 | "output_type": "stream", 150 | "text": [ 151 | "GaussianNB(priors=None)\n", 152 | " precision recall f1-score support\n", 153 | "\n", 154 | " 0.0 0.80 0.84 0.82 500\n", 155 | " 1.0 0.68 0.62 0.64 268\n", 156 | "\n", 157 | "avg / total 0.76 0.76 0.76 768\n", 158 | "\n", 159 | "[[421 79]\n", 160 | " [103 165]]\n" 161 | ] 162 | } 163 | ], 164 | "source": [ 165 | "from sklearn import metrics\n", 166 | "from sklearn.naive_bayes import GaussianNB\n", 167 | "model = GaussianNB()\n", 168 | "model.fit(X, y)\n", 169 | "print(model)\n", 170 | "# make predictions\n", 171 | "expected = y\n", 172 | "predicted = model.predict(X)\n", 173 | "# summarize the fit of the model\n", 174 | "print(metrics.classification_report(expected, predicted))\n", 175 | "print(metrics.confusion_matrix(expected, predicted))" 176 | ] 177 | }, 178 | { 179 | "cell_type": "code", 180 | "execution_count": 19, 181 | "metadata": {}, 182 | "outputs": [ 183 | { 184 | "name": "stdout", 185 | "output_type": "stream", 186 | "text": [ 187 | "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n", 188 | " metric_params=None, n_jobs=1, n_neighbors=5, p=2,\n", 189 | " weights='uniform')\n", 190 | " precision recall f1-score support\n", 191 | "\n", 192 | " 0.0 0.83 0.88 0.85 500\n", 193 | " 1.0 0.75 0.65 0.70 268\n", 194 | "\n", 195 | "avg / total 0.80 0.80 0.80 768\n", 196 | "\n", 197 | "[[442 58]\n", 198 | " [ 93 175]]\n" 199 | ] 200 | } 201 | ], 202 | "source": [ 203 | "from sklearn import metrics\n", 204 | "from sklearn.neighbors import KNeighborsClassifier\n", 205 | "# fit a k-nearest neighbor model to the data\n", 206 | "model = KNeighborsClassifier()\n", 207 | "model.fit(X, y)\n", 208 | "print(model)\n", 209 | "# make predictions\n", 210 | "expected = y\n", 211 | "predicted = model.predict(X)\n", 212 | "# summarize the fit of the model\n", 213 | "print(metrics.classification_report(expected, predicted))\n", 214 | "print(metrics.confusion_matrix(expected, predicted))" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": 20, 220 | "metadata": {}, 221 | "outputs": [ 222 | { 223 | "name": "stdout", 224 | "output_type": "stream", 225 | "text": [ 226 | "DecisionTreeClassifier(class_weight=None, criterion='gini', max_depth=None,\n", 227 | " max_features=None, max_leaf_nodes=None,\n", 228 | " min_impurity_split=1e-07, min_samples_leaf=1,\n", 229 | " min_samples_split=2, min_weight_fraction_leaf=0.0,\n", 230 | " presort=False, random_state=None, splitter='best')\n", 231 | " precision recall f1-score support\n", 232 | "\n", 233 | " 0.0 1.00 1.00 1.00 500\n", 234 | " 1.0 1.00 1.00 1.00 268\n", 235 | "\n", 236 | "avg / total 1.00 1.00 1.00 768\n", 237 | "\n", 238 | "[[500 0]\n", 239 | " [ 0 268]]\n" 240 | ] 241 | } 242 | ], 243 | "source": [ 244 | "from sklearn import metrics\n", 245 | "from sklearn.tree import DecisionTreeClassifier\n", 246 | "# fit a CART model to the data\n", 247 | "model = DecisionTreeClassifier()\n", 248 | "model.fit(X, y)\n", 249 | "print(model)\n", 250 | "# make predictions\n", 251 | "expected = y\n", 252 | "predicted = model.predict(X)\n", 253 | "# summarize the fit of the model\n", 254 | "print(metrics.classification_report(expected, predicted))\n", 255 | "print(metrics.confusion_matrix(expected, predicted))" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": 21, 261 | "metadata": {}, 262 | "outputs": [ 263 | { 264 | "name": "stdout", 265 | "output_type": "stream", 266 | "text": [ 267 | "SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,\n", 268 | " decision_function_shape=None, degree=3, gamma='auto', kernel='rbf',\n", 269 | " max_iter=-1, probability=False, random_state=None, shrinking=True,\n", 270 | " tol=0.001, verbose=False)\n", 271 | " precision recall f1-score support\n", 272 | "\n", 273 | " 0.0 1.00 1.00 1.00 500\n", 274 | " 1.0 1.00 1.00 1.00 268\n", 275 | "\n", 276 | "avg / total 1.00 1.00 1.00 768\n", 277 | "\n", 278 | "[[500 0]\n", 279 | " [ 0 268]]\n" 280 | ] 281 | } 282 | ], 283 | "source": [ 284 | "from sklearn import metrics\n", 285 | "from sklearn.svm import SVC\n", 286 | "# fit a SVM model to the data\n", 287 | "model = SVC()\n", 288 | "model.fit(X, y)\n", 289 | "print(model)\n", 290 | "# make predictions\n", 291 | "expected = y\n", 292 | "predicted = model.predict(X)\n", 293 | "# summarize the fit of the model\n", 294 | "print(metrics.classification_report(expected, predicted))\n", 295 | "print(metrics.confusion_matrix(expected, predicted))" 296 | ] 297 | }, 298 | { 299 | "cell_type": "code", 300 | "execution_count": 25, 301 | "metadata": {}, 302 | "outputs": [ 303 | { 304 | "name": "stdout", 305 | "output_type": "stream", 306 | "text": [ 307 | "GridSearchCV(cv=None, error_score='raise',\n", 308 | " estimator=Ridge(alpha=1.0, copy_X=True, fit_intercept=True, max_iter=None,\n", 309 | " normalize=False, random_state=None, solver='auto', tol=0.001),\n", 310 | " fit_params={}, iid=True, n_jobs=1,\n", 311 | " param_grid={'alpha': array([ 1.00000e+00, 1.00000e-01, 1.00000e-02, 1.00000e-03,\n", 312 | " 1.00000e-04, 0.00000e+00])},\n", 313 | " pre_dispatch='2*n_jobs', refit=True, return_train_score=True,\n", 314 | " scoring=None, verbose=0)\n", 315 | "0.279617559313\n", 316 | "1.0\n" 317 | ] 318 | } 319 | ], 320 | "source": [ 321 | "import numpy as np\n", 322 | "from sklearn.linear_model import Ridge\n", 323 | "from sklearn.model_selection import GridSearchCV\n", 324 | "# prepare a range of alpha values to test\n", 325 | "alphas = np.array([1,0.1,0.01,0.001,0.0001,0])\n", 326 | "# create and fit a ridge regression model, testing each alpha\n", 327 | "model = Ridge()\n", 328 | "grid = GridSearchCV(estimator=model, param_grid=dict(alpha=alphas))\n", 329 | "grid.fit(X, y)\n", 330 | "print(grid)\n", 331 | "# summarize the results of the grid search\n", 332 | "print(grid.best_score_)\n", 333 | "print(grid.best_estimator_.alpha)" 334 | ] 335 | }, 336 | { 337 | "cell_type": "code", 338 | "execution_count": 26, 339 | "metadata": {}, 340 | "outputs": [ 341 | { 342 | "name": "stdout", 343 | "output_type": "stream", 344 | "text": [ 345 | "RandomizedSearchCV(cv=None, error_score='raise',\n", 346 | " estimator=Ridge(alpha=1.0, copy_X=True, fit_intercept=True, max_iter=None,\n", 347 | " normalize=False, random_state=None, solver='auto', tol=0.001),\n", 348 | " fit_params={}, iid=True, n_iter=100, n_jobs=1,\n", 349 | " param_distributions={'alpha': },\n", 350 | " pre_dispatch='2*n_jobs', random_state=None, refit=True,\n", 351 | " return_train_score=True, scoring=None, verbose=0)\n", 352 | "0.279617531252\n", 353 | "0.998565254036\n" 354 | ] 355 | } 356 | ], 357 | "source": [ 358 | "import numpy as np\n", 359 | "from scipy.stats import uniform as sp_rand\n", 360 | "from sklearn.linear_model import Ridge\n", 361 | "from sklearn.model_selection import RandomizedSearchCV\n", 362 | "# prepare a uniform distribution to sample for the alpha parameter\n", 363 | "param_grid = {'alpha': sp_rand()}\n", 364 | "# create and fit a ridge regression model, testing random alpha values\n", 365 | "model = Ridge()\n", 366 | "rsearch = RandomizedSearchCV(estimator=model, param_distributions=param_grid, n_iter=100)\n", 367 | "rsearch.fit(X, y)\n", 368 | "print(rsearch)\n", 369 | "# summarize the results of the random parameter search\n", 370 | "print(rsearch.best_score_)\n", 371 | "print(rsearch.best_estimator_.alpha)" 372 | ] 373 | }, 374 | { 375 | "cell_type": "code", 376 | "execution_count": null, 377 | "metadata": { 378 | "collapsed": true 379 | }, 380 | "outputs": [], 381 | "source": [] 382 | } 383 | ], 384 | "metadata": { 385 | "kernelspec": { 386 | "display_name": "Python 3", 387 | "language": "python", 388 | "name": "python3" 389 | }, 390 | "language_info": { 391 | "codemirror_mode": { 392 | "name": "ipython", 393 | "version": 3 394 | }, 395 | "file_extension": ".py", 396 | "mimetype": "text/x-python", 397 | "name": "python", 398 | "nbconvert_exporter": "python", 399 | "pygments_lexer": "ipython3", 400 | "version": "3.6.1" 401 | } 402 | }, 403 | "nbformat": 4, 404 | "nbformat_minor": 2 405 | } 406 | -------------------------------------------------------------------------------- /src/ml/wordcloudtest.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | from pyecharts import WordCloud 3 | from snownlp import SnowNLP 4 | import jieba 5 | 6 | ##词云 7 | 8 | filename = "wdqbs.txt" 9 | with open(filename) as f: 10 | mytext = f.read() 11 | #print mytext 12 | 13 | s= SnowNLP(unicode(mytext,'utf8')) 14 | for word in s.keywords(10): 15 | print word.encode('utf8') 16 | 17 | seg_list = jieba.cut(mytext) 18 | 19 | punct = set(u''':!),.:;?]}¢'"、。〉》」』】〕〗〞︰︱︳﹐、﹒ 20 | ﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏、~¢ 21 | 々‖•·ˇˉ―--′’”([{£¥'"‵〈《「『【〔〖([{£¥〝︵︷︹︻ 22 | ︽︿﹁﹃﹙﹛﹝({“‘-—_…''') 23 | # 对str/unicode 24 | filterpunt = lambda s: ''.join(filter(lambda x: x not in punct, s)) 25 | # 对list 26 | filterpuntl = lambda l: list(filter(lambda x: x not in punct, l)) 27 | 28 | dict={} 29 | for word in filterpuntl(seg_list): 30 | if word in dict: 31 | dict[word]=int(dict[word])+1 32 | else: 33 | dict[word]=1 34 | name=[] 35 | for word in dict.keys(): 36 | name.append(word.encode('utf8')) 37 | print name 38 | value = dict.values() 39 | print value 40 | wordcloud = WordCloud(width=1300, height=620) 41 | wordcloud.add("", name, value, word_size_range=[20, 100]) 42 | wordcloud.show_config() 43 | wordcloud.render() 44 | -------------------------------------------------------------------------------- /tensorflow.md: -------------------------------------------------------------------------------- 1 | ## awesome 2 | [awesome-tensorflow](https://github.com/jtoy/awesome-tensorflow)--A curated list of dedicated resources http://tensorflow.org 3 | 4 | ## tutorial 5 | [tensorflow学习用例](https://github.com/burness/tensorflow-101) 6 | 7 | [DeepLearningZeroToAll](https://github.com/hunkim/DeepLearningZeroToAll)---TensorFlow Basic Tutorial Labs 8 | 9 | [TensorFlow Tutorial and Examples for beginners](https://github.com/aymericdamien/TensorFlow-Examples) 10 | 11 | [TensorBox](https://github.com/TensorBox/TensorBox)-----Object detection in TensorFlow 12 | 13 | [Tensorflow入门:数据结构和编程思想](http://blog.csdn.net/lingerlanlan/article/details/61616906) 14 | 15 | [TensorFlow学习笔记1:入门](http://www.jeyzhang.com/tensorflow-learning-notes.html) 16 | 17 | [tensorflow-talk-debugging](https://github.com/wookayin/tensorflow-talk-debugging)------ Slides and supplementary codes for my talk 'Debugging Tips on TensorFlow' (2016) 18 | 19 | [learning to learn](https://github.com/deepmind/learning-to-learn)------Learning to Learn in TensorFlow 20 | 21 | [Example code to help get started using TensorFlow](https://github.com/Hack-a-Day/bincounter_TensorFlow_example/) 22 | 23 | [详解TensorBoard如何调参](http://geek.csdn.net/news/detail/197155) 24 | 25 | 26 | [Implementations of CNNs, RNNs, GANs, etc](https://github.com/adeshpande3/Tensorflow-Programs-and-Tutorials) 27 | 28 | [TensorFlow Wide And Deep 模型详解与应用 29 | TensorFlow Wide-And-Deep](http://geek.csdn.net/news/detail/235465) 30 | 31 | ## 架构 32 | [TensorFlow框架剖析与应⽤](http://ocgxshkaw.bkt.clouddn.com/11%20%E3%80%8ATensorFlow%E6%A1%86%E6%9E%B6%E5%89%96%E6%9E%90%E5%8F%8A%E5%BA%94%E7%94%A8%E3%80%8B%E7%8E%8B%E7%90%9B.pdf) 33 | 34 | [十图详解TensorFlow数据读取机制(附代码)](http://geek.csdn.net/news/detail/201552) 35 | 36 | 37 | ## 周边 38 | 39 | ### TensorFlowOnSpark 40 | [TensorFlowOnSpark git](https://github.com/yahoo/TensorFlowOnSpark) 41 | 42 | [TensorFlow遇上Spark](http://www.jianshu.com/p/62b4ebb5a2f4) 43 | 44 | ```python 45 | node1 = tf.constant(3.0, tf.float32) 46 | node2 = tf.constant(4.0) 47 | node3=tf.add(node1,node2) 48 | #print(sess.run(node3)) 49 | tf.summary.scalar("test",node3) 50 | summary_op = tf.summary.merge_all() 51 | sess.run(node3) 52 | summary_log_dir=vi.get_summary_log_dir() 53 | file_writer = tf.summary.FileWriter(summary_log_dir, sess.graph) 54 | port = vi.open_tensorboard(summary_log_dir) 55 | ``` 56 | --------------------------------------------------------------------------------