├── image
├── aws-architect.png
├── aws-developer.png
└── machine-learning-certificate.png
├── mobile_apps
├── mobile_bert
│ ├── .DS_Store
│ ├── assets
│ │ ├── .DS_Store
│ │ ├── images
│ │ │ ├── icon.png
│ │ │ ├── tfjs.jpg
│ │ │ ├── splash.png
│ │ │ ├── robot-dev.png
│ │ │ └── robot-prod.png
│ │ └── fonts
│ │ │ └── SpaceMono-Regular.ttf
│ ├── babel.config.js
│ ├── .expo
│ │ ├── settings.json
│ │ └── packager-info.json
│ ├── README.md
│ ├── components
│ │ ├── StyledText.js
│ │ ├── __tests__
│ │ │ ├── StyledText-test.js
│ │ │ └── __snapshots__
│ │ │ │ └── StyledText-test.js.snap
│ │ └── TabBarIcon.js
│ ├── constants
│ │ ├── Layout.js
│ │ └── Colors.js
│ ├── navigation
│ │ ├── useLinking.js
│ │ └── BottomTabNavigator.js
│ ├── app.json
│ ├── package.json
│ ├── App.js
│ └── screens
│ │ ├── LinksScreen.js
│ │ ├── HomeScreen.js
│ │ └── QnaScreen.js
├── objects_detection
│ ├── assets
│ │ ├── .DS_Store
│ │ ├── images
│ │ │ ├── icon.png
│ │ │ ├── splash.png
│ │ │ ├── tfjs.jpg
│ │ │ ├── robot-dev.png
│ │ │ └── robot-prod.png
│ │ └── fonts
│ │ │ └── SpaceMono-Regular.ttf
│ ├── babel.config.js
│ ├── components
│ │ ├── StyledText.js
│ │ ├── __tests__
│ │ │ ├── StyledText-test.js
│ │ │ └── __snapshots__
│ │ │ │ └── StyledText-test.js.snap
│ │ └── TabBarIcon.js
│ ├── constants
│ │ ├── Layout.js
│ │ └── Colors.js
│ ├── README.md
│ ├── navigation
│ │ ├── useLinking.js
│ │ └── BottomTabNavigator.js
│ ├── app.json
│ ├── package.json
│ ├── App.js
│ └── screens
│ │ ├── LinksScreen.js
│ │ ├── HomeScreen.js
│ │ └── CocoSsdScreen.js
├── image_classification
│ ├── assets
│ │ ├── .DS_Store
│ │ ├── images
│ │ │ ├── icon.png
│ │ │ ├── tfjs.jpg
│ │ │ ├── splash.png
│ │ │ ├── robot-dev.png
│ │ │ └── robot-prod.png
│ │ └── fonts
│ │ │ └── SpaceMono-Regular.ttf
│ ├── babel.config.js
│ ├── constants
│ │ ├── Layout.js
│ │ └── Colors.js
│ ├── README.md
│ ├── navigation
│ │ ├── useLinking.js
│ │ └── BottomTabNavigator.js
│ ├── app.json
│ ├── package.json
│ ├── App.js
│ └── screens
│ │ ├── LinksScreen.js
│ │ ├── HomeScreen.js
│ │ └── ImageClassificationScreen.js
└── expo_cli_docker
│ ├── entrypoint.sh
│ ├── Dockerfile
│ ├── LICENSE.md
│ └── README.md
├── certificates
├── Yuefeng_certificate_11_28_2017.pdf
├── AWS_Certified_Developer_Associate_Certificate.pdf
└── AWS_Certified_Solutions_Architect_Associate_certificate.pdf
├── Random_Forest
└── interview_attendance
│ ├── images
│ └── CRISP-DM_Process_Diagram.png
│ └── README.md
├── deep_learning
├── finance
│ └── fraud_detection
│ │ └── README.md
├── unsupervised_learning
│ └── dec_keras_clustering
│ │ └── README.md
├── nlp
│ ├── spam-classification-with-word2vec-keras
│ │ └── README.md
│ └── spark-nlp-docker
│ │ ├── README.md
│ │ └── Dockerfile
├── multi_input_transfer_learning
│ └── README.md
└── Multi_Layer_Perceptron
│ └── breast-cancer-wisconsin
│ ├── README.md
│ ├── breast-cancer-wisconsin.names.txt
│ ├── breast-cancer-wisconsin.csv
│ └── breast-cancer-wisconsin.data
├── README.md
└── recommender
└── netflix-demo.ipynb
/image/aws-architect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/image/aws-architect.png
--------------------------------------------------------------------------------
/image/aws-developer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/image/aws-developer.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/.DS_Store
--------------------------------------------------------------------------------
/image/machine-learning-certificate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/image/machine-learning-certificate.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/.DS_Store
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/images/icon.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/images/tfjs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/images/tfjs.jpg
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/.DS_Store
--------------------------------------------------------------------------------
/certificates/Yuefeng_certificate_11_28_2017.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/certificates/Yuefeng_certificate_11_28_2017.pdf
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/.DS_Store
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/images/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/images/splash.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/images/robot-dev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/images/robot-dev.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/images/robot-prod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/images/robot-prod.png
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/images/icon.png
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/images/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/images/splash.png
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/images/tfjs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/images/tfjs.jpg
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/images/icon.png
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/images/tfjs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/images/tfjs.jpg
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/images/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/images/splash.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/mobile_bert/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/images/robot-dev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/images/robot-dev.png
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/images/robot-prod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/images/robot-prod.png
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/images/robot-dev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/images/robot-dev.png
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/images/robot-prod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/images/robot-prod.png
--------------------------------------------------------------------------------
/mobile_apps/image_classification/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/certificates/AWS_Certified_Developer_Associate_Certificate.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/certificates/AWS_Certified_Developer_Associate_Certificate.pdf
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/objects_detection/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/mobile_apps/image_classification/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/mobile_apps/image_classification/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/Random_Forest/interview_attendance/images/CRISP-DM_Process_Diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/Random_Forest/interview_attendance/images/CRISP-DM_Process_Diagram.png
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/.expo/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "hostType": "lan",
3 | "lanType": "ip",
4 | "dev": true,
5 | "minify": false,
6 | "urlRandomness": "gf-qgh",
7 | "https": false
8 | }
9 |
--------------------------------------------------------------------------------
/certificates/AWS_Certified_Solutions_Architect_Associate_certificate.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzzhang/machine-learning/HEAD/certificates/AWS_Certified_Solutions_Architect_Associate_certificate.pdf
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/README.md:
--------------------------------------------------------------------------------
1 | # Deep Learning for Natural Language Processing on Mobile Devices
2 |
3 | This Github is for the article [Deep Learning for Natural Language Processing on Mobile Devices]() in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/components/StyledText.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Text } from 'react-native';
3 |
4 | export function MonoText(props) {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/components/StyledText.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Text } from 'react-native';
3 |
4 | export function MonoText(props) {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/.expo/packager-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "devToolsPort": 19002,
3 | "expoServerPort": null,
4 | "packagerPort": null,
5 | "packagerPid": null,
6 | "expoServerNgrokUrl": null,
7 | "packagerNgrokUrl": null,
8 | "ngrokPid": null
9 | }
10 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/constants/Layout.js:
--------------------------------------------------------------------------------
1 | import { Dimensions } from 'react-native';
2 |
3 | const width = Dimensions.get('window').width;
4 | const height = Dimensions.get('window').height;
5 |
6 | export default {
7 | window: {
8 | width,
9 | height,
10 | },
11 | isSmallDevice: width < 375,
12 | };
13 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/constants/Layout.js:
--------------------------------------------------------------------------------
1 | import { Dimensions } from 'react-native';
2 |
3 | const width = Dimensions.get('window').width;
4 | const height = Dimensions.get('window').height;
5 |
6 | export default {
7 | window: {
8 | width,
9 | height,
10 | },
11 | isSmallDevice: width < 375,
12 | };
13 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/constants/Layout.js:
--------------------------------------------------------------------------------
1 | import { Dimensions } from 'react-native';
2 |
3 | const width = Dimensions.get('window').width;
4 | const height = Dimensions.get('window').height;
5 |
6 | export default {
7 | window: {
8 | width,
9 | height,
10 | },
11 | isSmallDevice: width < 375,
12 | };
13 |
--------------------------------------------------------------------------------
/deep_learning/finance/fraud_detection/README.md:
--------------------------------------------------------------------------------
1 | # Automatic Machine Learning in Fraud Detection Using H2O AutoML
2 |
3 | This Github is for the article [Automatic Machine Learning in Fraud Detection Using H2O AutoML](https://medium.com/@zhangyuefeng1/automatic-machine-learning-in-fraud-detection-using-h2o-automl-6ba5cbf5c79b) in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/components/__tests__/StyledText-test.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import renderer from 'react-test-renderer';
3 |
4 | import { MonoText } from '../StyledText';
5 |
6 | it(`renders correctly`, () => {
7 | const tree = renderer.create(Snapshot test!).toJSON();
8 |
9 | expect(tree).toMatchSnapshot();
10 | });
11 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/components/__tests__/__snapshots__/StyledText-test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders correctly 1`] = `
4 |
14 | Snapshot test!
15 |
16 | `;
17 |
--------------------------------------------------------------------------------
/deep_learning/unsupervised_learning/dec_keras_clustering/README.md:
--------------------------------------------------------------------------------
1 | # Deep Clustering for Financial Market Segmentation
2 |
3 | This Github is for the article [Deep Clustering for Financial Market Segmentation](https://medium.com/@zhangyuefeng1/deep-clustering-for-financial-market-segmentation-2a41573618cf?sk=a3f7a7e5d21f0ef47b2167ce3f0d0cb6) in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/components/__tests__/StyledText-test.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import renderer from 'react-test-renderer';
3 |
4 | import { MonoText } from '../StyledText';
5 |
6 | it(`renders correctly`, () => {
7 | const tree = renderer.create(Snapshot test!).toJSON();
8 |
9 | expect(tree).toMatchSnapshot();
10 | });
11 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/components/__tests__/__snapshots__/StyledText-test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders correctly 1`] = `
4 |
14 | Snapshot test!
15 |
16 | `;
17 |
--------------------------------------------------------------------------------
/deep_learning/nlp/spam-classification-with-word2vec-keras/README.md:
--------------------------------------------------------------------------------
1 | # Deep Learning for Natural Language Processing Using word2vec-keras
2 |
3 | This Github is for the article [Deep Learning for Natural Language Processing Using word2vec-keras](https://medium.com/@zhangyuefeng1/deep-learning-for-natural-language-processing-using-word2vec-keras-d9a240c7bb9d) in Towards Data Science by Yuefeng Zhang.
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/constants/Colors.js:
--------------------------------------------------------------------------------
1 | const tintColor = '#2f95dc';
2 |
3 | export default {
4 | tintColor,
5 | tabIconDefault: '#ccc',
6 | tabIconSelected: tintColor,
7 | tabBar: '#fefefe',
8 | errorBackground: 'red',
9 | errorText: '#fff',
10 | warningBackground: '#EAEB5E',
11 | warningText: '#666804',
12 | noticeBackground: tintColor,
13 | noticeText: '#fff',
14 | };
15 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/constants/Colors.js:
--------------------------------------------------------------------------------
1 | const tintColor = '#2f95dc';
2 |
3 | export default {
4 | tintColor,
5 | tabIconDefault: '#ccc',
6 | tabIconSelected: tintColor,
7 | tabBar: '#fefefe',
8 | errorBackground: 'red',
9 | errorText: '#fff',
10 | warningBackground: '#EAEB5E',
11 | warningText: '#666804',
12 | noticeBackground: tintColor,
13 | noticeText: '#fff',
14 | };
15 |
--------------------------------------------------------------------------------
/deep_learning/multi_input_transfer_learning/README.md:
--------------------------------------------------------------------------------
1 | # Deep Multi-Input Models Transfer Learning for Image and Word Tag Recognition
2 |
3 | This Github is for the article [Deep Multi-Input Models Transfer Learning for Image and Word Tag Recognition](https://towardsdatascience.com/deep-multi-input-models-transfer-learning-for-image-and-word-tag-recognition-7ae0462253dc) in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/constants/Colors.js:
--------------------------------------------------------------------------------
1 | const tintColor = '#2f95dc';
2 |
3 | export default {
4 | tintColor,
5 | tabIconDefault: '#ccc',
6 | tabIconSelected: tintColor,
7 | tabBar: '#fefefe',
8 | errorBackground: 'red',
9 | errorText: '#fff',
10 | warningBackground: '#EAEB5E',
11 | warningText: '#666804',
12 | noticeBackground: tintColor,
13 | noticeText: '#fff',
14 | };
15 |
--------------------------------------------------------------------------------
/Random_Forest/interview_attendance/README.md:
--------------------------------------------------------------------------------
1 | # Object-Oriented Machine Learning Pipeline with mlflow for Pandas and Koalas DataFrames
2 |
3 | This Github is for the article [Object-Oriented Machine Learning Pipeline with mlflow for Pandas and Koalas DataFrames](https://towardsdatascience.com/object-oriented-machine-learning-pipeline-with-mlflow-for-pandas-and-koalas-dataframes-ef8517d39a12) in Towards Data Science by Yuefeng Zhang.
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/README.md:
--------------------------------------------------------------------------------
1 | # Deep Learning for Detecting Objects in an Image on Mobile Devices
2 |
3 | This Github is for the article [Deep Learning for Detecting Objects in an Image on Mobile Devices](https://medium.com/p/deep-learning-for-detecting-objects-in-an-image-on-mobile-devices-7d5b2e5621f9?source=email-80e8f2faf4bc--writer.postDistributed&sk=19e420fca7758dd3391adcf6f3df5c55) in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/components/TabBarIcon.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from '@expo/vector-icons';
2 | import * as React from 'react';
3 |
4 | import Colors from '../constants/Colors';
5 |
6 | export default function TabBarIcon(props) {
7 | return (
8 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/components/TabBarIcon.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from '@expo/vector-icons';
2 | import * as React from 'react';
3 |
4 | import Colors from '../constants/Colors';
5 |
6 | export default function TabBarIcon(props) {
7 | return (
8 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/mobile_apps/expo_cli_docker/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | # authenticate without showing password
6 | if [ -n "$EXPO_CLI_USERNAME" ] && [ -n "$EXPO_CLI_PASSWORD" ]; then
7 | expo-cli login --non-interactive --username $EXPO_CLI_USERNAME
8 | fi
9 |
10 | # see: https://github.com/nodejs/docker-node/blob/4a29572/12/stretch/docker-entrypoint.sh#L4-L6
11 | if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
12 | set -- expo-cli "$@"
13 | fi
14 |
15 | exec "$@"
16 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/README.md:
--------------------------------------------------------------------------------
1 | # Deep Learning for Image Classification on Mobile Devices
2 |
3 | This Github is for the article [Deep Learning for Image Classification on Mobile Devices](https://towardsdatascience.com/deep-learning-for-image-classification-on-mobile-devices-f93efac860fd?source=email-80e8f2faf4bc-1587344316988-layerCake.autoLayerCakeWriterNotification-------------------------6d3c9f8a_2a4d_49a4_b49e_64eaa6c28eb9&sk=fdd9218d4f879cda3cc064d20701a939) in Towards Data Science by Yuefeng Zhang.
4 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/navigation/useLinking.js:
--------------------------------------------------------------------------------
1 | import { useLinking } from '@react-navigation/native';
2 | import { Linking } from 'expo';
3 |
4 | export default function(containerRef) {
5 | return useLinking(containerRef, {
6 | prefixes: [Linking.makeUrl('/')],
7 | config: {
8 | Root: {
9 | path: 'root',
10 | screens: {
11 | Home: 'home',
12 | Links: 'links',
13 | Settings: 'settings',
14 | },
15 | },
16 | },
17 | });
18 | }
19 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/navigation/useLinking.js:
--------------------------------------------------------------------------------
1 | import { useLinking } from '@react-navigation/native';
2 | import { Linking } from 'expo';
3 |
4 | export default function(containerRef) {
5 | return useLinking(containerRef, {
6 | prefixes: [Linking.makeUrl('/')],
7 | config: {
8 | Root: {
9 | path: 'root',
10 | screens: {
11 | Home: 'home',
12 | Links: 'links',
13 | Settings: 'settings',
14 | },
15 | },
16 | },
17 | });
18 | }
19 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/navigation/useLinking.js:
--------------------------------------------------------------------------------
1 | import { useLinking } from '@react-navigation/native';
2 | import { Linking } from 'expo';
3 |
4 | export default function(containerRef) {
5 | return useLinking(containerRef, {
6 | prefixes: [Linking.makeUrl('/')],
7 | config: {
8 | Root: {
9 | path: 'root',
10 | screens: {
11 | Home: 'home',
12 | Links: 'links',
13 | Settings: 'settings',
14 | },
15 | },
16 | },
17 | });
18 | }
19 |
--------------------------------------------------------------------------------
/mobile_apps/expo_cli_docker/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG NODE_VERSION="13"
2 |
3 | FROM node:$NODE_VERSION
4 |
5 | LABEL name="Expo Cli for Docker"
6 | LABEL repository="https://github.com/yzzhang/machine-learning/tree/master/mobile_apps/expo_cli_docker"
7 | LABEL homepage="https://github.com/yzzhang/machine-learning/tree/master/mobile_apps/expo_cli_docker"
8 | LABEL maintainer="Yuefeng Zhang"
9 |
10 | EXPOSE 19000
11 | EXPOSE 19001
12 |
13 | ENV REACT_NATIVE_PACKAGER_HOSTNAME="10.0.1.198"
14 |
15 | ARG EXPO_VERSION="latest"
16 |
17 | RUN yarn global add expo-cli@$EXPO_VERSION \
18 | && yarn cache clean
19 |
20 | COPY entrypoint.sh LICENSE.md README.md /
21 |
22 | ENTRYPOINT ["/entrypoint.sh"]
23 | CMD ["--help"]
24 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "ObjectsDetection",
4 | "slug": "react-native-deeplearning",
5 | "platforms": [
6 | "ios",
7 | "android",
8 | "web"
9 | ],
10 | "version": "1.0.0",
11 | "orientation": "portrait",
12 | "icon": "./assets/images/icon.png",
13 | "scheme": "myapp",
14 | "splash": {
15 | "image": "./assets/images/splash.png",
16 | "resizeMode": "contain",
17 | "backgroundColor": "#ffffff"
18 | },
19 | "updates": {
20 | "fallbackToCacheTimeout": 0
21 | },
22 | "assetBundlePatterns": [
23 | "**/*"
24 | ],
25 | "ios": {
26 | "supportsTablet": true
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "ObjectsDetection",
4 | "slug": "react-native-deeplearning",
5 | "platforms": [
6 | "ios",
7 | "android",
8 | "web"
9 | ],
10 | "version": "1.0.0",
11 | "orientation": "portrait",
12 | "icon": "./assets/images/icon.png",
13 | "scheme": "myapp",
14 | "splash": {
15 | "image": "./assets/images/splash.png",
16 | "resizeMode": "contain",
17 | "backgroundColor": "#ffffff"
18 | },
19 | "updates": {
20 | "fallbackToCacheTimeout": 0
21 | },
22 | "assetBundlePatterns": [
23 | "**/*"
24 | ],
25 | "ios": {
26 | "supportsTablet": true
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "ImageClassification",
4 | "slug": "react-native-deeplearning",
5 | "platforms": [
6 | "ios",
7 | "android",
8 | "web"
9 | ],
10 | "version": "1.0.0",
11 | "orientation": "portrait",
12 | "icon": "./assets/images/icon.png",
13 | "scheme": "myapp",
14 | "splash": {
15 | "image": "./assets/images/splash.png",
16 | "resizeMode": "contain",
17 | "backgroundColor": "#ffffff"
18 | },
19 | "updates": {
20 | "fallbackToCacheTimeout": 0
21 | },
22 | "assetBundlePatterns": [
23 | "**/*"
24 | ],
25 | "ios": {
26 | "supportsTablet": true
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/mobile_apps/expo_cli_docker/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License (MIT)
2 |
3 | Copyright (c) 2020-present Yuefeng Zhang
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
13 | > all 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
21 | > THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/deep_learning/nlp/spark-nlp-docker/README.md:
--------------------------------------------------------------------------------
1 | # Running Spark NLP in Docker Container
2 |
3 | This repository is to show how to setup a docker environment for running [Spark NLP](https://www.johnsnowlabs.com/spark-nlp) in docker container. It is based on the [Spark NLP Docker image](https://hub.docker.com/r/johnsnowlabs/spark-nlp-workshop) with the following modifications:
4 | * removed tutorials and related notebooks and data files
5 | * replaced Spark NLP 2.4.5 with Spark NLP 2.5.1
6 | * adjusted docker hub username
7 | * adjusted the home directory name in docker container
8 | * added the command line --volumn option to map the current host direcrory to the home directory in docker container
9 | * removed Jupyter notebook configuration
10 |
11 | ## Docker setup
12 |
13 | Method 1- Get the existing docker image for spark-nlp:
14 |
15 | ```bash
16 | docker pull zhangyuefeng123/sparknlp:1.0
17 | ```
18 |
19 | Method 2- Build a new docker image
20 |
21 | ```bash
22 | docker build -t zhangyuefeng123/sparknlp:1.0 .
23 | ```
24 |
25 | 2- Run the image locally with port binding
26 |
27 | ```bash
28 | docker run -it --volume $PWD:/home/yuefeng -p 8888:8888 -p 4040:4040 zhangyuefeng123/sparknlp:1.0
29 | ```
30 |
31 | 3- Open Jupyter notebooks inside your browser by using the token printed on the console like below:
32 |
33 | ```bash
34 | http://127.0.0.1:8888/?token=d7e598479d9f3ce5b62d6e91276d9a557f68b6e3c919ddbc
35 | ```
36 |
37 | Once the Jupyter notebook starts, we can use it as usual.
38 |
39 |
--------------------------------------------------------------------------------
/deep_learning/Multi_Layer_Perceptron/breast-cancer-wisconsin/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Deep Learning in Wisconsin Breast Cancer Diagnosis
3 |
4 |
5 | ## Install
6 |
7 | The Jupyter notebook requires **Python 2.7 or 3.6** and the following Python libraries installed:
8 |
9 | - [NumPy](http://www.numpy.org/)
10 | - [Pandas](http://pandas.pydata.org/)
11 | - [matplotlib](http://matplotlib.org/)
12 | - [scikit-learn](http://scikit-learn.org/stable/)
13 | - [Kares](https://keras.io/)
14 | - [Tensorflow](https://www.tensorflow.org/)
15 |
16 | You will also need to have software installed to run and execute a [Jupyter Notebook](http://ipython.org/notebook.html)
17 |
18 | If you do not have Python installed yet, it is highly recommended that you install the [Anaconda](http://continuum.io/downloads) distribution of Python, which already has the above packages and more included.
19 |
20 | The Kares and Tensorflow can be installed as follows:
21 |
22 | ```
23 | pip install tensorflow
24 | pip install keras
25 | ```
26 |
27 | ## Run
28 |
29 | In a terminal or command window, navigate to the top-level project directory `breast-cancer-wisconsin/` (that contains this README) and run the following command:
30 |
31 | ```
32 | jupyter notebook breast-cancer-wisconsin.ipynb
33 |
34 | ```
35 |
36 | ## Data
37 |
38 | The Wisconsin Breast Cancer Dataset is publically avilable at: http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data
39 |
40 | The instructions of the dataset are available at: http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.names
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject",
9 | "test": "jest --watchAll"
10 | },
11 | "jest": {
12 | "preset": "jest-expo"
13 | },
14 | "dependencies": {
15 | "@expo/vector-icons": "~10.0.6",
16 | "@react-native-community/async-storage": "^1.9.0",
17 | "@react-native-community/masked-view": "0.1.6",
18 | "@react-navigation/bottom-tabs": "^5.0.0",
19 | "@react-navigation/native": "^5.0.0",
20 | "@react-navigation/stack": "^5.0.0",
21 | "@react-navigation/web": "~1.0.0-alpha.9",
22 | "@tensorflow-models/qna": "^1.0.0",
23 | "@tensorflow/tfjs": "^1.7.2",
24 | "@tensorflow/tfjs-react-native": "^0.2.3",
25 | "expo": "~37.0.3",
26 | "expo-asset": "~8.1.3",
27 | "expo-constants": "~9.0.0",
28 | "expo-camera": "^8.2.0",
29 | "expo-font": "~8.1.0",
30 | "expo-gl": "^8.1.0",
31 | "expo-web-browser": "~8.1.0",
32 | "react": "~16.9.0",
33 | "react-dom": "~16.9.0",
34 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
35 | "react-native-fs": "^2.16.6",
36 | "react-native-gesture-handler": "~1.6.0",
37 | "react-native-safe-area-context": "0.7.3",
38 | "react-native-screens": "~2.2.0",
39 | "react-native-svg": "11.0.1",
40 | "react-native-web": "~0.11.7"
41 | },
42 | "devDependencies": {
43 | "@babel/core": "^7.8.6",
44 | "babel-preset-expo": "~8.1.0",
45 | "jest-expo": "~37.0.0"
46 | },
47 | "private": true
48 | }
49 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject",
9 | "test": "jest --watchAll"
10 | },
11 | "jest": {
12 | "preset": "jest-expo"
13 | },
14 | "dependencies": {
15 | "@expo/vector-icons": "~10.0.6",
16 | "@react-native-community/async-storage": "^1.9.0",
17 | "@react-native-community/masked-view": "0.1.6",
18 | "@react-navigation/bottom-tabs": "^5.0.0",
19 | "@react-navigation/native": "^5.0.0",
20 | "@react-navigation/stack": "^5.0.0",
21 | "@react-navigation/web": "~1.0.0-alpha.9",
22 | "@tensorflow-models/mobilenet": "^2.0.4",
23 | "@tensorflow/tfjs": "^1.7.2",
24 | "@tensorflow/tfjs-react-native": "^0.2.3",
25 | "expo": "~37.0.3",
26 | "expo-asset": "~8.1.3",
27 | "expo-camera": "^8.2.0",
28 | "expo-constants": "~9.0.0",
29 | "expo-font": "~8.1.0",
30 | "expo-gl": "^8.1.0",
31 | "expo-web-browser": "~8.1.0",
32 | "jpeg-js": "^0.3.7",
33 | "react": "~16.9.0",
34 | "react-dom": "~16.9.0",
35 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
36 | "react-native-fs": "^2.16.6",
37 | "react-native-gesture-handler": "~1.6.0",
38 | "react-native-safe-area-context": "0.7.3",
39 | "react-native-screens": "~2.2.0",
40 | "react-native-web": "~0.11.7",
41 | "expo-permissions": "~8.1.0",
42 | "expo-image-picker": "~8.1.0"
43 | },
44 | "devDependencies": {
45 | "@babel/core": "^7.8.6",
46 | "babel-preset-expo": "~8.1.0",
47 | "jest-expo": "~37.0.0"
48 | },
49 | "private": true
50 | }
51 |
--------------------------------------------------------------------------------
/deep_learning/nlp/spark-nlp-docker/Dockerfile:
--------------------------------------------------------------------------------
1 | #Download base image ubuntu 18.04
2 | FROM ubuntu:18.04
3 |
4 | ENV NB_USER yuefeng
5 | ENV NB_UID 1000
6 | ENV HOME /home/${NB_USER}
7 |
8 | ENV PYSPARK_PYTHON=python3
9 | ENV PYSPARK_DRIVER_PYTHON=python3
10 |
11 | RUN apt-get update && apt-get install -y \
12 | tar \
13 | wget \
14 | bash \
15 | rsync \
16 | gcc \
17 | libfreetype6-dev \
18 | libhdf5-serial-dev \
19 | libpng-dev \
20 | libzmq3-dev \
21 | python3 \
22 | python3-dev \
23 | python3-pip \
24 | unzip \
25 | pkg-config \
26 | software-properties-common \
27 | graphviz
28 |
29 | RUN adduser --disabled-password \
30 | --gecos "Default user" \
31 | --uid ${NB_UID} \
32 | ${NB_USER}
33 |
34 | # Install OpenJDK-8
35 | RUN apt-get update && \
36 | apt-get install -y openjdk-8-jdk && \
37 | apt-get install -y ant && \
38 | apt-get clean;
39 |
40 | # Fix certificate issues
41 | RUN apt-get update && \
42 | apt-get install ca-certificates-java && \
43 | apt-get clean && \
44 | update-ca-certificates -f;
45 | # Setup JAVA_HOME -- useful for docker commandline
46 | ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
47 | RUN export JAVA_HOME
48 |
49 | RUN echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> ~/.bashrc
50 |
51 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
52 |
53 | RUN pip3 install --upgrade pip
54 | RUN pip3 install --no-cache-dir notebook==5.* numpy pyspark==2.4.4 spark-nlp==2.5.1 pandas mlflow Keras scikit-spark scikit-learn scipy matplotlib pydot tensorflow graphviz
55 |
56 | USER root
57 | RUN chown -R ${NB_UID} ${HOME}
58 | USER ${NB_USER}
59 |
60 | WORKDIR ${HOME}
61 |
62 | # Specify the default command to run
63 | CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject",
9 | "test": "jest --watchAll"
10 | },
11 | "jest": {
12 | "preset": "jest-expo"
13 | },
14 | "dependencies": {
15 | "@expo/vector-icons": "~10.0.6",
16 | "@react-native-community/async-storage": "^1.9.0",
17 | "@react-native-community/masked-view": "0.1.6",
18 | "@react-navigation/bottom-tabs": "^5.0.0",
19 | "@react-navigation/native": "^5.0.0",
20 | "@react-navigation/stack": "^5.0.0",
21 | "@react-navigation/web": "~1.0.0-alpha.9",
22 | "@tensorflow-models/coco-ssd": "^2.0.3",
23 | "@tensorflow/tfjs": "^1.7.2",
24 | "@tensorflow/tfjs-react-native": "^0.2.3",
25 | "expo": "~37.0.3",
26 | "expo-asset": "~8.1.3",
27 | "expo-camera": "^8.2.0",
28 | "expo-constants": "~9.0.0",
29 | "expo-font": "~8.1.0",
30 | "expo-gl": "^8.1.0",
31 | "expo-image-picker": "~8.1.0",
32 | "expo-permissions": "~8.1.0",
33 | "expo-web-browser": "~8.1.0",
34 | "jpeg-js": "^0.3.7",
35 | "react": "~16.9.0",
36 | "react-dom": "~16.9.0",
37 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
38 | "react-native-fs": "^2.16.6",
39 | "react-native-gesture-handler": "~1.6.0",
40 | "react-native-safe-area-context": "0.7.3",
41 | "react-native-screens": "~2.2.0",
42 | "react-native-web": "~0.11.7",
43 | "react-native-svg": "11.0.1"
44 | },
45 | "devDependencies": {
46 | "@babel/core": "^7.8.6",
47 | "babel-preset-expo": "~8.1.0",
48 | "jest-expo": "~37.0.0"
49 | },
50 | "private": true
51 | }
52 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/navigation/BottomTabNavigator.js:
--------------------------------------------------------------------------------
1 | import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
2 | import * as React from 'react';
3 |
4 | import TabBarIcon from '../components/TabBarIcon';
5 | import HomeScreen from '../screens/HomeScreen';
6 | import QnaScreen from '../screens/QnaScreen';
7 | import LinksScreen from '../screens/LinksScreen';
8 |
9 | const BottomTab = createBottomTabNavigator();
10 | const INITIAL_ROUTE_NAME = 'Home';
11 |
12 | export default function BottomTabNavigator({ navigation, route }) {
13 | // Set the header title on the parent stack navigator depending on the
14 | // currently active tab. Learn more in the documentation:
15 | // https://reactnavigation.org/docs/en/screen-options-resolution.html
16 | navigation.setOptions({ headerTitle: getHeaderTitle(route) });
17 |
18 | return (
19 |
20 | ,
26 | }}
27 | />
28 | ,
34 | }}
35 | />
36 | ,
42 | }}
43 | />
44 |
45 | );
46 | }
47 |
48 | function getHeaderTitle(route) {
49 | const routeName = route.state?.routes[route.state.index]?.name ?? INITIAL_ROUTE_NAME;
50 |
51 | switch (routeName) {
52 | case 'Home':
53 | return 'Introduction';
54 | case 'Qna':
55 | return 'Qna';
56 | case 'Links':
57 | return 'References';
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/navigation/BottomTabNavigator.js:
--------------------------------------------------------------------------------
1 | import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
2 | import * as React from 'react';
3 |
4 | import TabBarIcon from '../components/TabBarIcon';
5 | import HomeScreen from '../screens/HomeScreen';
6 | import CocoSsdScreen from '../screens/CocoSsdScreen';
7 | import LinksScreen from '../screens/LinksScreen';
8 |
9 | const BottomTab = createBottomTabNavigator();
10 | const INITIAL_ROUTE_NAME = 'Home';
11 |
12 | export default function BottomTabNavigator({ navigation, route }) {
13 | // Set the header title on the parent stack navigator depending on the
14 | // currently active tab. Learn more in the documentation:
15 | // https://reactnavigation.org/docs/en/screen-options-resolution.html
16 | navigation.setOptions({ headerTitle: getHeaderTitle(route) });
17 |
18 | return (
19 |
20 | ,
26 | }}
27 | />
28 | ,
34 | }}
35 | />
36 | ,
42 | }}
43 | />
44 |
45 | );
46 | }
47 |
48 | function getHeaderTitle(route) {
49 | const routeName = route.state?.routes[route.state.index]?.name ?? INITIAL_ROUTE_NAME;
50 |
51 | switch (routeName) {
52 | case 'Home':
53 | return 'Introduction';
54 | case 'CocoSsd':
55 | return 'COCO-SSD';
56 | case 'Links':
57 | return 'References';
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/navigation/BottomTabNavigator.js:
--------------------------------------------------------------------------------
1 | import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
2 | import * as React from 'react';
3 |
4 | import TabBarIcon from '../components/TabBarIcon';
5 | import HomeScreen from '../screens/HomeScreen';
6 | import ImageClassificationScreen from '../screens/ImageClassificationScreen';
7 | import LinksScreen from '../screens/LinksScreen';
8 |
9 | const BottomTab = createBottomTabNavigator();
10 | const INITIAL_ROUTE_NAME = 'Home';
11 |
12 | export default function BottomTabNavigator({ navigation, route }) {
13 | // Set the header title on the parent stack navigator depending on the
14 | // currently active tab. Learn more in the documentation:
15 | // https://reactnavigation.org/docs/en/screen-options-resolution.html
16 | navigation.setOptions({ headerTitle: getHeaderTitle(route) });
17 |
18 | return (
19 |
20 | ,
26 | }}
27 | />
28 | ,
34 | }}
35 | />
36 | ,
42 | }}
43 | />
44 |
45 | );
46 | }
47 |
48 | function getHeaderTitle(route) {
49 | const routeName = route.state?.routes[route.state.index]?.name ?? INITIAL_ROUTE_NAME;
50 |
51 | switch (routeName) {
52 | case 'Home':
53 | return 'Introduction';
54 | case 'ImageClassification':
55 | return 'Image Classification';
56 | case 'Links':
57 | return 'References';
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/App.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Platform, StatusBar, StyleSheet, View } from 'react-native';
3 | import { SplashScreen } from 'expo';
4 | import * as Font from 'expo-font';
5 | import { Ionicons } from '@expo/vector-icons';
6 | import { NavigationContainer } from '@react-navigation/native';
7 | import { createStackNavigator } from '@react-navigation/stack';
8 |
9 | import BottomTabNavigator from './navigation/BottomTabNavigator';
10 | import useLinking from './navigation/useLinking';
11 |
12 | const Stack = createStackNavigator();
13 |
14 | export default function App(props) {
15 | const [isLoadingComplete, setLoadingComplete] = React.useState(false);
16 | const [initialNavigationState, setInitialNavigationState] = React.useState();
17 | const containerRef = React.useRef();
18 | const { getInitialState } = useLinking(containerRef);
19 |
20 | // Load any resources or data that we need prior to rendering the app
21 | React.useEffect(() => {
22 | async function loadResourcesAndDataAsync() {
23 | try {
24 | SplashScreen.preventAutoHide();
25 |
26 | // Load our initial navigation state
27 | setInitialNavigationState(await getInitialState());
28 |
29 | // Load fonts
30 | await Font.loadAsync({
31 | ...Ionicons.font,
32 | 'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
33 | });
34 | } catch (e) {
35 | // We might want to provide this error information to an error reporting service
36 | console.warn(e);
37 | } finally {
38 | setLoadingComplete(true);
39 | SplashScreen.hide();
40 | }
41 | }
42 |
43 | loadResourcesAndDataAsync();
44 | }, []);
45 |
46 | if (!isLoadingComplete && !props.skipLoadingScreen) {
47 | return null;
48 | } else {
49 | return (
50 |
51 | {Platform.OS === 'ios' && }
52 |
53 |
54 |
55 |
56 |
57 |
58 | );
59 | }
60 | }
61 |
62 | const styles = StyleSheet.create({
63 | container: {
64 | flex: 1,
65 | backgroundColor: '#fff',
66 | },
67 | });
68 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/App.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Platform, StatusBar, StyleSheet, View } from 'react-native';
3 | import { SplashScreen } from 'expo';
4 | import * as Font from 'expo-font';
5 | import { Ionicons } from '@expo/vector-icons';
6 | import { NavigationContainer } from '@react-navigation/native';
7 | import { createStackNavigator } from '@react-navigation/stack';
8 |
9 | import BottomTabNavigator from './navigation/BottomTabNavigator';
10 | import useLinking from './navigation/useLinking';
11 |
12 | const Stack = createStackNavigator();
13 |
14 | export default function App(props) {
15 | const [isLoadingComplete, setLoadingComplete] = React.useState(false);
16 | const [initialNavigationState, setInitialNavigationState] = React.useState();
17 | const containerRef = React.useRef();
18 | const { getInitialState } = useLinking(containerRef);
19 |
20 | // Load any resources or data that we need prior to rendering the app
21 | React.useEffect(() => {
22 | async function loadResourcesAndDataAsync() {
23 | try {
24 | SplashScreen.preventAutoHide();
25 |
26 | // Load our initial navigation state
27 | setInitialNavigationState(await getInitialState());
28 |
29 | // Load fonts
30 | await Font.loadAsync({
31 | ...Ionicons.font,
32 | 'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
33 | });
34 | } catch (e) {
35 | // We might want to provide this error information to an error reporting service
36 | console.warn(e);
37 | } finally {
38 | setLoadingComplete(true);
39 | SplashScreen.hide();
40 | }
41 | }
42 |
43 | loadResourcesAndDataAsync();
44 | }, []);
45 |
46 | if (!isLoadingComplete && !props.skipLoadingScreen) {
47 | return null;
48 | } else {
49 | return (
50 |
51 | {Platform.OS === 'ios' && }
52 |
53 |
54 |
55 |
56 |
57 |
58 | );
59 | }
60 | }
61 |
62 | const styles = StyleSheet.create({
63 | container: {
64 | flex: 1,
65 | backgroundColor: '#fff',
66 | },
67 | });
68 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/App.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Platform, StatusBar, StyleSheet, View } from 'react-native';
3 | import { SplashScreen } from 'expo';
4 | import * as Font from 'expo-font';
5 | import { Ionicons } from '@expo/vector-icons';
6 | import { NavigationContainer } from '@react-navigation/native';
7 | import { createStackNavigator } from '@react-navigation/stack';
8 |
9 | import BottomTabNavigator from './navigation/BottomTabNavigator';
10 | import useLinking from './navigation/useLinking';
11 |
12 | const Stack = createStackNavigator();
13 |
14 | export default function App(props) {
15 | const [isLoadingComplete, setLoadingComplete] = React.useState(false);
16 | const [initialNavigationState, setInitialNavigationState] = React.useState();
17 | const containerRef = React.useRef();
18 | const { getInitialState } = useLinking(containerRef);
19 |
20 | // Load any resources or data that we need prior to rendering the app
21 | React.useEffect(() => {
22 | async function loadResourcesAndDataAsync() {
23 | try {
24 | SplashScreen.preventAutoHide();
25 |
26 | // Load our initial navigation state
27 | setInitialNavigationState(await getInitialState());
28 |
29 | // Load fonts
30 | await Font.loadAsync({
31 | ...Ionicons.font,
32 | 'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
33 | });
34 | } catch (e) {
35 | // We might want to provide this error information to an error reporting service
36 | console.warn(e);
37 | } finally {
38 | setLoadingComplete(true);
39 | SplashScreen.hide();
40 | }
41 | }
42 |
43 | loadResourcesAndDataAsync();
44 | }, []);
45 |
46 | if (!isLoadingComplete && !props.skipLoadingScreen) {
47 | return null;
48 | } else {
49 | return (
50 |
51 | {Platform.OS === 'ios' && }
52 |
53 |
54 |
55 |
56 |
57 |
58 | );
59 | }
60 | }
61 |
62 | const styles = StyleSheet.create({
63 | container: {
64 | flex: 1,
65 | backgroundColor: '#fff',
66 | },
67 | });
68 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Selected List of Publications on Data Science
2 |
3 | ### Also see my [Web site](https://yzzhang.github.io/) for details.
4 |
5 |
6 | ### 1. Deep Learning
7 |
8 | #### 1.1 Deep Clustering for Financial Market Segmentation
9 | See publication: [A unsupervised deep learning approach for credit card customer clustering, Towards Data Science, Nov 23, 2019](https://medium.com/@zhangyuefeng1/deep-clustering-for-financial-market-segmentation-2a41573618cf?sk=a3f7a7e5d21f0ef47b2167ce3f0d0cb6)
10 |
11 | #### 1.2 Deep Multi-Input Models Transfer Learning for Image and Word Tag Recognition
12 | See publication: [A multi-models deep learning approach for image and text understanding, Towards Data Science, Nov 20, 2019](https://towardsdatascience.com/deep-multi-input-models-transfer-learning-for-image-and-word-tag-recognition-7ae0462253dc)
13 |
14 | #### 1.3 Deep Learning for Natural Language Processing Using word2vec-keras
15 | See publication: [A deep learning approach for NLP by combining Word2Vec with Keras LSTM, Towards Data Science, Nov 3, 2019](https://towardsdatascience.com/deep-learning-for-natural-language-processing-using-word2vec-keras-d9a240c7bb9d)
16 |
17 | #### 1.4 Deep Learning in Winonsin Breast Cancer Diagnosis
18 | See publication: [A deep learning approach for healthcare, Towards Data Science, Oct 30, 2019](https://towardsdatascience.com/deep-learning-in-winonsin-breast-cancer-diagnosis-6bab13838abd)
19 |
20 |
21 | ### 2. Machine Learning
22 |
23 | #### 2.1 Automatic Machine Learning in Fraud Detection Using H2O AutoML
24 | See publication: [Machine Learning Automation in Finance, Towards Data Science, Nov 13, 2019](https://towardsdatascience.com/automatic-machine-learning-in-fraud-detection-using-h2o-automl-6ba5cbf5c79b)
25 |
26 | #### 2.2 Object-Oriented Machine Learning Pipeline with mlflow for Pandas and Koalas DataFrames
27 | See publication: [End-to-end process of developing Spark-enabled machine learning pipeline in Python using Pandas, Koalas, scikit-learn, and mlflow, Towards Data Science, Oct 24, 2019](https://towardsdatascience.com/object-oriented-machine-learning-pipeline-with-mlflow-for-pandas-and-koalas-dataframes-ef8517d39a12)
28 |
29 |
30 | #### 2.3 Python Data Preprocessing Using Pandas DataFrame, Spark DataFrame, and Koalas DataFrame
31 | See publication: [Preparing data for machine learning in Python, Towards Data Science, Oct 14, 2019](https://towardsdatascience.com/python-data-preprocessing-using-pandas-dataframe-spark-dataframe-and-koalas-dataframe-e44c42258a8f)
32 |
33 |
34 |
35 | ## Certificates
36 |
37 | * [Udacity Machine Learning Engineer Nanodegree](https://github.com/yzzhang/machine-learning/blob/master/certificates/Yuefeng_certificate_11_28_2017.pdf)
38 |
39 | 
40 |
41 | * [AWS Certified Solutions Architect - Associate](https://github.com/yzzhang/machine-learning/blob/master/certificates/AWS_Certified_Solutions_Architect_Associate_certificate.pdf)
42 |
43 | 
44 |
45 | * [AWS Certified Developer - Associate](https://github.com/yzzhang/machine-learning/blob/master/certificates/AWS_Certified_Developer_Associate_Certificate.pdf)
46 |
47 | 
48 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/screens/LinksScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from '@expo/vector-icons';
2 | import * as WebBrowser from 'expo-web-browser';
3 | import * as React from 'react';
4 | import { Image, StyleSheet, Text, View } from 'react-native';
5 | import { RectButton, ScrollView } from 'react-native-gesture-handler';
6 |
7 | export default function LinksScreen() {
8 | return (
9 |
10 |
11 |
12 |
20 |
21 |
22 | WebBrowser.openBrowserAsync('https://www.tensorflow.org/js')}
26 | />
27 |
28 | WebBrowser.openBrowserAsync('https://github.com/tensorflow/tfjs-models/tree/master/coco-ssd')}
32 | />
33 |
34 | WebBrowser.openBrowserAsync('https://docs.expo.io')}
38 | />
39 |
40 | WebBrowser.openBrowserAsync('https://reactnative.dev/docs/getting-started')}
44 | />
45 |
46 | );
47 | }
48 |
49 | function OptionButton({ icon, label, onPress, isLastOption }) {
50 | return (
51 |
52 |
53 |
54 |
55 |
56 |
57 | {label}
58 |
59 |
60 |
61 | );
62 | }
63 |
64 | const styles = StyleSheet.create({
65 | container: {
66 | flex: 1,
67 | backgroundColor: '#fafafa',
68 | },
69 | welcomeContainer: {
70 | alignItems: 'center',
71 | marginTop: 10,
72 | marginBottom: 20,
73 | },
74 | welcomeImage: {
75 | width: 100,
76 | height: 80,
77 | resizeMode: 'contain',
78 | marginTop: 3,
79 | marginLeft: -10,
80 | },
81 | contentContainer: {
82 | paddingTop: 30,
83 | },
84 | optionIconContainer: {
85 | marginRight: 12,
86 | },
87 | option: {
88 | backgroundColor: '#fdfdfd',
89 | paddingHorizontal: 15,
90 | paddingVertical: 15,
91 | borderWidth: StyleSheet.hairlineWidth,
92 | borderBottomWidth: 0,
93 | borderColor: '#ededed',
94 | },
95 | lastOption: {
96 | borderBottomWidth: StyleSheet.hairlineWidth,
97 | },
98 | optionText: {
99 | fontSize: 15,
100 | alignSelf: 'flex-start',
101 | marginTop: 1,
102 | },
103 | });
104 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/screens/LinksScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from '@expo/vector-icons';
2 | import * as WebBrowser from 'expo-web-browser';
3 | import * as React from 'react';
4 | import { Image, StyleSheet, Text, View } from 'react-native';
5 | import { RectButton, ScrollView } from 'react-native-gesture-handler';
6 |
7 | export default function LinksScreen() {
8 | return (
9 |
10 |
11 |
12 |
20 |
21 |
22 | WebBrowser.openBrowserAsync('https://www.tensorflow.org/js')}
26 | />
27 |
28 | WebBrowser.openBrowserAsync('https://github.com/tensorflow/tfjs-models/tree/master/mobilenet')}
32 | />
33 |
34 | WebBrowser.openBrowserAsync('https://docs.expo.io')}
38 | />
39 |
40 | WebBrowser.openBrowserAsync('https://reactnative.dev/docs/getting-started')}
44 | />
45 |
46 | );
47 | }
48 |
49 | function OptionButton({ icon, label, onPress, isLastOption }) {
50 | return (
51 |
52 |
53 |
54 |
55 |
56 |
57 | {label}
58 |
59 |
60 |
61 | );
62 | }
63 |
64 | const styles = StyleSheet.create({
65 | container: {
66 | flex: 1,
67 | backgroundColor: '#fafafa',
68 | },
69 | welcomeContainer: {
70 | alignItems: 'center',
71 | marginTop: 10,
72 | marginBottom: 20,
73 | },
74 | welcomeImage: {
75 | width: 100,
76 | height: 80,
77 | resizeMode: 'contain',
78 | marginTop: 3,
79 | marginLeft: -10,
80 | },
81 | contentContainer: {
82 | paddingTop: 30,
83 | },
84 | optionIconContainer: {
85 | marginRight: 12,
86 | },
87 | option: {
88 | backgroundColor: '#fdfdfd',
89 | paddingHorizontal: 15,
90 | paddingVertical: 15,
91 | borderWidth: StyleSheet.hairlineWidth,
92 | borderBottomWidth: 0,
93 | borderColor: '#ededed',
94 | },
95 | lastOption: {
96 | borderBottomWidth: StyleSheet.hairlineWidth,
97 | },
98 | optionText: {
99 | fontSize: 15,
100 | alignSelf: 'flex-start',
101 | marginTop: 1,
102 | },
103 | });
104 |
--------------------------------------------------------------------------------
/mobile_apps/expo_cli_docker/README.md:
--------------------------------------------------------------------------------
1 | # Expo Cli for Docker
2 |
3 | This repository is for building a new Expo Cli docker image. It is based on the following great work:
4 | * C.V. Putten, https://github.com/byCedric/expo-cli-images
5 | * H. Majid, https://medium.com/@hmajid2301/running-expo-react-native-in-docker-ff9c4f2a4388
6 |
7 | The image to be built shall contain all necessary libraries to perform all commands of the Expo CLI.
8 |
9 | ## Supported versions
10 |
11 | image | node | expo | status
12 | --- | --- | --- | ---
13 | `zhangyuefeng123/expo-cli:3` | `13` | `3` | **latest**
14 |
15 | ## What's inside the Dokerfile?
16 |
17 | The entry point of this image forwards to the [Expo CLI][link-cli].
18 | It automatically authenticates when both `EXPO_CLI_USERNAME` and `EXPO_CLI_PASSWORD` are defined.
19 | When these environment variables are undefined, it skips this step and forwards the command directly to Expo.
20 |
21 | As Majid pointed out, the REACT_NATIVE_PACKAGER_HOSTNAME environment variable in Dockerfile is very important because it sets which IP address Expo (cli) is running on, this is the IP Address your phone will try to connect to. If this is not set correctly, you’ll run into an error for the following reason. When you run in a Docker container you cannot connect to it because it’s trying to use the Docker IP address (one of the ones starting with 172.xxx.xxx.xxx). You can work out the correct IP address on Mac by using the ifconfig command. The IP address with en0 should be the host IP (10.0.1.198 on my Mac laptop).
22 |
23 | ## How to build a new image?
24 |
25 | You can build a custom version of both node and expo-cli as below.
26 | It accepts both `NODE_VERSION` and `EXPO_VERSION` as build arguments.
27 |
28 | ```bash
29 | # create a node 10 and expo cli 2 image
30 | $ docker build . \
31 | --build-arg NODE_VERSION=13 \
32 | --build-arg EXPO_VERSION=3 \
33 | --tag awsomeorg/expo-cli
34 | ```
35 |
36 | ## How to run the new image?
37 |
38 | In order to run the new image in a container, you should go to your Expo project directory first and then run the following command:
39 |
40 | ```bash
41 | # perform authenticated expo commands directly
42 | $ docker run \
43 | --tty \
44 | --env EXPO_CLI_USERNAME=byyuefeng \
45 | --env EXPO_CLI_PASSWORD=mypass \
46 | awsomeorg/expo-cli publish
47 |
48 | # mount your project as volume and use the cli manually
49 | $ docker run \
50 | --tty \
51 | --interactive \
52 | --workdir /code \
53 | --volume $PWD:/code \
54 | --env EXPO_CLI_USERNAME=byyuefeng \
55 | --env EXPO_CLI_PASSWORD=mypass \
56 | -p 19000:19000 -p 19001:19001 \
57 | awsomeorg/expo-cli bash
58 | ```
59 |
60 | ## How to start Expo project?
61 |
62 | Since the docker container workdir is mapped to the current directory (your Expo project location) on the host machine, you can start the Expo project as usual:
63 |
64 | ```bash
65 | $ expo start
66 | ```
67 |
68 | ## License
69 |
70 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
71 |
72 | --- ---
73 |
74 |
75 | with :heart: byCedric
76 |
77 |
78 | [link-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
79 | [link-docs]: https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration
80 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/screens/LinksScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from '@expo/vector-icons';
2 | import * as WebBrowser from 'expo-web-browser';
3 | import * as React from 'react';
4 | import { Image, StyleSheet, Text, View } from 'react-native';
5 | import { RectButton, ScrollView } from 'react-native-gesture-handler';
6 |
7 | export default function LinksScreen() {
8 | return (
9 |
10 |
11 |
12 |
20 |
21 |
22 | WebBrowser.openBrowserAsync('https://www.tensorflow.org/js')}
26 | />
27 |
28 | WebBrowser.openBrowserAsync('https://arxiv.org/abs/1810.04805')}
32 | />
33 |
34 | WebBrowser.openBrowserAsync('https://arxiv.org/abs/2004.02984')}
38 | />
39 |
40 | WebBrowser.openBrowserAsync('https://github.com/tensorflow/tfjs-models/tree/master/qna')}
44 | />
45 |
46 | WebBrowser.openBrowserAsync('https://docs.expo.io')}
50 | />
51 |
52 | WebBrowser.openBrowserAsync('https://reactnative.dev/docs/getting-started')}
56 | />
57 |
58 | );
59 | }
60 |
61 | function OptionButton({ icon, label, onPress, isLastOption }) {
62 | return (
63 |
64 |
65 |
66 |
67 |
68 |
69 | {label}
70 |
71 |
72 |
73 | );
74 | }
75 |
76 | const styles = StyleSheet.create({
77 | container: {
78 | flex: 1,
79 | backgroundColor: '#fafafa',
80 | },
81 | welcomeContainer: {
82 | alignItems: 'center',
83 | marginTop: 10,
84 | marginBottom: 20,
85 | },
86 | welcomeImage: {
87 | width: 100,
88 | height: 80,
89 | resizeMode: 'contain',
90 | marginTop: 3,
91 | marginLeft: -10,
92 | },
93 | contentContainer: {
94 | paddingTop: 30,
95 | },
96 | optionIconContainer: {
97 | marginRight: 12,
98 | },
99 | option: {
100 | backgroundColor: '#fdfdfd',
101 | paddingHorizontal: 15,
102 | paddingVertical: 15,
103 | borderWidth: StyleSheet.hairlineWidth,
104 | borderBottomWidth: 0,
105 | borderColor: '#ededed',
106 | },
107 | lastOption: {
108 | borderBottomWidth: StyleSheet.hairlineWidth,
109 | },
110 | optionText: {
111 | fontSize: 15,
112 | alignSelf: 'flex-start',
113 | marginTop: 1,
114 | },
115 | });
116 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/screens/HomeScreen.js:
--------------------------------------------------------------------------------
1 | import * as WebBrowser from 'expo-web-browser';
2 | import * as React from 'react';
3 | import { Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import { MonoText } from '../components/StyledText';
7 |
8 | export default function HomeScreen() {
9 | return (
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
25 | This mobile application is to demonstrate how to use TensorFlow.js and a pre-trained
26 | deep convolutional neural network model MobileNet to classify images on mobile devices.
27 | It is developed in Expo and React-Native, and thus should work on both iOS and
28 | Android mobile devices.
29 |
30 |
31 |
32 | Click the image classification tab to start the demo.
33 |
34 |
35 |
36 | Click the references tab for more information.
37 |
38 |
39 |
40 |
41 |
42 | );
43 | }
44 |
45 | HomeScreen.navigationOptions = {
46 | header: null,
47 | };
48 |
49 | const styles = StyleSheet.create({
50 | container: {
51 | flex: 1,
52 | backgroundColor: '#fff',
53 | },
54 | developmentModeText: {
55 | marginBottom: 20,
56 | color: 'rgba(0,0,0,0.4)',
57 | fontSize: 14,
58 | lineHeight: 19,
59 | textAlign: 'center',
60 | },
61 | contentContainer: {
62 | paddingTop: 30,
63 | },
64 | welcomeContainer: {
65 | alignItems: 'center',
66 | marginTop: 10,
67 | marginBottom: 20,
68 | },
69 | welcomeImage: {
70 | width: 100,
71 | height: 80,
72 | resizeMode: 'contain',
73 | marginTop: 3,
74 | marginLeft: -10,
75 | },
76 | getStartedContainer: {
77 | alignItems: 'center',
78 | marginHorizontal: 50,
79 | },
80 | homeScreenFilename: {
81 | marginVertical: 7,
82 | },
83 | codeHighlightText: {
84 | color: 'rgba(96,100,109, 0.8)',
85 | },
86 | codeHighlightContainer: {
87 | backgroundColor: 'rgba(0,0,0,0.05)',
88 | borderRadius: 3,
89 | paddingHorizontal: 4,
90 | },
91 | getStartedText: {
92 | fontSize: 17,
93 | color: 'rgba(96,100,109, 1)',
94 | lineHeight: 24,
95 | textAlign: 'center',
96 | },
97 | tabBarInfoContainer: {
98 | position: 'absolute',
99 | bottom: 0,
100 | left: 0,
101 | right: 0,
102 | ...Platform.select({
103 | ios: {
104 | shadowColor: 'black',
105 | shadowOffset: { width: 0, height: -3 },
106 | shadowOpacity: 0.1,
107 | shadowRadius: 3,
108 | },
109 | android: {
110 | elevation: 20,
111 | },
112 | }),
113 | alignItems: 'center',
114 | backgroundColor: '#fbfbfb',
115 | paddingVertical: 20,
116 | },
117 | tabBarInfoText: {
118 | fontSize: 17,
119 | color: 'rgba(96,100,109, 1)',
120 | textAlign: 'center',
121 | },
122 | navigationFilename: {
123 | marginTop: 5,
124 | },
125 | helpContainer: {
126 | marginTop: 15,
127 | alignItems: 'center',
128 | },
129 | helpLink: {
130 | paddingVertical: 15,
131 | },
132 | helpLinkText: {
133 | fontSize: 14,
134 | color: '#2e78b7',
135 | },
136 | });
137 |
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/screens/HomeScreen.js:
--------------------------------------------------------------------------------
1 | import * as WebBrowser from 'expo-web-browser';
2 | import * as React from 'react';
3 | import { Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import { MonoText } from '../components/StyledText';
7 |
8 | export default function HomeScreen() {
9 | return (
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
25 | This mobile application is to demonstrate how to use TensorFlow.js and a pre-trained
26 | deep convolutional neural network model COCO-SSD to detect objects from an image on mobile devices.
27 | It is developed in Expo and React-Native, and thus should work on both iOS and
28 | Android mobile devices.
29 |
30 |
31 |
32 | Click the COCO-SSD tab to start the demo.
33 |
34 |
35 |
36 | Click the references tab for more information.
37 |
38 |
39 |
40 |
41 |
42 | );
43 | }
44 |
45 | HomeScreen.navigationOptions = {
46 | header: null,
47 | };
48 |
49 | const styles = StyleSheet.create({
50 | container: {
51 | flex: 1,
52 | backgroundColor: '#fff',
53 | },
54 | developmentModeText: {
55 | marginBottom: 20,
56 | color: 'rgba(0,0,0,0.4)',
57 | fontSize: 14,
58 | lineHeight: 19,
59 | textAlign: 'center',
60 | },
61 | contentContainer: {
62 | paddingTop: 30,
63 | },
64 | welcomeContainer: {
65 | alignItems: 'center',
66 | marginTop: 10,
67 | marginBottom: 20,
68 | },
69 | welcomeImage: {
70 | width: 100,
71 | height: 80,
72 | resizeMode: 'contain',
73 | marginTop: 3,
74 | marginLeft: -10,
75 | },
76 | getStartedContainer: {
77 | alignItems: 'center',
78 | marginHorizontal: 50,
79 | },
80 | homeScreenFilename: {
81 | marginVertical: 7,
82 | },
83 | codeHighlightText: {
84 | color: 'rgba(96,100,109, 0.8)',
85 | },
86 | codeHighlightContainer: {
87 | backgroundColor: 'rgba(0,0,0,0.05)',
88 | borderRadius: 3,
89 | paddingHorizontal: 4,
90 | },
91 | getStartedText: {
92 | fontSize: 17,
93 | color: 'rgba(96,100,109, 1)',
94 | lineHeight: 24,
95 | textAlign: 'center',
96 | },
97 | tabBarInfoContainer: {
98 | position: 'absolute',
99 | bottom: 0,
100 | left: 0,
101 | right: 0,
102 | ...Platform.select({
103 | ios: {
104 | shadowColor: 'black',
105 | shadowOffset: { width: 0, height: -3 },
106 | shadowOpacity: 0.1,
107 | shadowRadius: 3,
108 | },
109 | android: {
110 | elevation: 20,
111 | },
112 | }),
113 | alignItems: 'center',
114 | backgroundColor: '#fbfbfb',
115 | paddingVertical: 20,
116 | },
117 | tabBarInfoText: {
118 | fontSize: 17,
119 | color: 'rgba(96,100,109, 1)',
120 | textAlign: 'center',
121 | },
122 | navigationFilename: {
123 | marginTop: 5,
124 | },
125 | helpContainer: {
126 | marginTop: 15,
127 | alignItems: 'center',
128 | },
129 | helpLink: {
130 | paddingVertical: 15,
131 | },
132 | helpLinkText: {
133 | fontSize: 14,
134 | color: '#2e78b7',
135 | },
136 | });
137 |
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/screens/HomeScreen.js:
--------------------------------------------------------------------------------
1 | import * as WebBrowser from 'expo-web-browser';
2 | import * as React from 'react';
3 | import { Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import { MonoText } from '../components/StyledText';
7 |
8 | export default function HomeScreen() {
9 | return (
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
25 | This mobile application is to demonstrate how to use TensorFlow.js and a pre-trained
26 | deep natural language processing model MobileBERT to answer question on a given related passage
27 | on mobile devices. It is developed in Expo and React-Native, and thus should work on both iOS and
28 | Android mobile devices.
29 |
30 |
31 |
32 | Click the Qna tab to start the demo.
33 |
34 |
35 |
36 | Click the references tab for more information.
37 |
38 |
39 |
40 |
41 |
42 | );
43 | }
44 |
45 | HomeScreen.navigationOptions = {
46 | header: null,
47 | };
48 |
49 | const styles = StyleSheet.create({
50 | container: {
51 | flex: 1,
52 | backgroundColor: '#fff',
53 | },
54 | developmentModeText: {
55 | marginBottom: 20,
56 | color: 'rgba(0,0,0,0.4)',
57 | fontSize: 14,
58 | lineHeight: 19,
59 | textAlign: 'center',
60 | },
61 | contentContainer: {
62 | paddingTop: 30,
63 | },
64 | welcomeContainer: {
65 | alignItems: 'center',
66 | marginTop: 10,
67 | marginBottom: 20,
68 | },
69 | welcomeImage: {
70 | width: 100,
71 | height: 80,
72 | resizeMode: 'contain',
73 | marginTop: 3,
74 | marginLeft: -10,
75 | },
76 | getStartedContainer: {
77 | alignItems: 'center',
78 | marginHorizontal: 50,
79 | },
80 | homeScreenFilename: {
81 | marginVertical: 7,
82 | },
83 | codeHighlightText: {
84 | color: 'rgba(96,100,109, 0.8)',
85 | },
86 | codeHighlightContainer: {
87 | backgroundColor: 'rgba(0,0,0,0.05)',
88 | borderRadius: 3,
89 | paddingHorizontal: 4,
90 | },
91 | getStartedText: {
92 | fontSize: 17,
93 | color: 'rgba(96,100,109, 1)',
94 | lineHeight: 24,
95 | textAlign: 'center',
96 | },
97 | tabBarInfoContainer: {
98 | position: 'absolute',
99 | bottom: 0,
100 | left: 0,
101 | right: 0,
102 | ...Platform.select({
103 | ios: {
104 | shadowColor: 'black',
105 | shadowOffset: { width: 0, height: -3 },
106 | shadowOpacity: 0.1,
107 | shadowRadius: 3,
108 | },
109 | android: {
110 | elevation: 20,
111 | },
112 | }),
113 | alignItems: 'center',
114 | backgroundColor: '#fbfbfb',
115 | paddingVertical: 20,
116 | },
117 | tabBarInfoText: {
118 | fontSize: 17,
119 | color: 'rgba(96,100,109, 1)',
120 | textAlign: 'center',
121 | },
122 | navigationFilename: {
123 | marginTop: 5,
124 | },
125 | helpContainer: {
126 | marginTop: 15,
127 | alignItems: 'center',
128 | },
129 | helpLink: {
130 | paddingVertical: 15,
131 | },
132 | helpLinkText: {
133 | fontSize: 14,
134 | color: '#2e78b7',
135 | },
136 | });
137 |
--------------------------------------------------------------------------------
/deep_learning/Multi_Layer_Perceptron/breast-cancer-wisconsin/breast-cancer-wisconsin.names.txt:
--------------------------------------------------------------------------------
1 | Citation Request:
2 | This breast cancer databases was obtained from the University of Wisconsin
3 | Hospitals, Madison from Dr. William H. Wolberg. If you publish results
4 | when using this database, then please include this information in your
5 | acknowledgements. Also, please cite one or more of:
6 |
7 | 1. O. L. Mangasarian and W. H. Wolberg: "Cancer diagnosis via linear
8 | programming", SIAM News, Volume 23, Number 5, September 1990, pp 1 & 18.
9 |
10 | 2. William H. Wolberg and O.L. Mangasarian: "Multisurface method of
11 | pattern separation for medical diagnosis applied to breast cytology",
12 | Proceedings of the National Academy of Sciences, U.S.A., Volume 87,
13 | December 1990, pp 9193-9196.
14 |
15 | 3. O. L. Mangasarian, R. Setiono, and W.H. Wolberg: "Pattern recognition
16 | via linear programming: Theory and application to medical diagnosis",
17 | in: "Large-scale numerical optimization", Thomas F. Coleman and Yuying
18 | Li, editors, SIAM Publications, Philadelphia 1990, pp 22-30.
19 |
20 | 4. K. P. Bennett & O. L. Mangasarian: "Robust linear programming
21 | discrimination of two linearly inseparable sets", Optimization Methods
22 | and Software 1, 1992, 23-34 (Gordon & Breach Science Publishers).
23 |
24 | 1. Title: Wisconsin Breast Cancer Database (January 8, 1991)
25 |
26 | 2. Sources:
27 | -- Dr. WIlliam H. Wolberg (physician)
28 | University of Wisconsin Hospitals
29 | Madison, Wisconsin
30 | USA
31 | -- Donor: Olvi Mangasarian (mangasarian@cs.wisc.edu)
32 | Received by David W. Aha (aha@cs.jhu.edu)
33 | -- Date: 15 July 1992
34 |
35 | 3. Past Usage:
36 |
37 | Attributes 2 through 10 have been used to represent instances.
38 | Each instance has one of 2 possible classes: benign or malignant.
39 |
40 | 1. Wolberg,~W.~H., \& Mangasarian,~O.~L. (1990). Multisurface method of
41 | pattern separation for medical diagnosis applied to breast cytology. In
42 | {\it Proceedings of the National Academy of Sciences}, {\it 87},
43 | 9193--9196.
44 | -- Size of data set: only 369 instances (at that point in time)
45 | -- Collected classification results: 1 trial only
46 | -- Two pairs of parallel hyperplanes were found to be consistent with
47 | 50% of the data
48 | -- Accuracy on remaining 50% of dataset: 93.5%
49 | -- Three pairs of parallel hyperplanes were found to be consistent with
50 | 67% of data
51 | -- Accuracy on remaining 33% of dataset: 95.9%
52 |
53 | 2. Zhang,~J. (1992). Selecting typical instances in instance-based
54 | learning. In {\it Proceedings of the Ninth International Machine
55 | Learning Conference} (pp. 470--479). Aberdeen, Scotland: Morgan
56 | Kaufmann.
57 | -- Size of data set: only 369 instances (at that point in time)
58 | -- Applied 4 instance-based learning algorithms
59 | -- Collected classification results averaged over 10 trials
60 | -- Best accuracy result:
61 | -- 1-nearest neighbor: 93.7%
62 | -- trained on 200 instances, tested on the other 169
63 | -- Also of interest:
64 | -- Using only typical instances: 92.2% (storing only 23.1 instances)
65 | -- trained on 200 instances, tested on the other 169
66 |
67 | 4. Relevant Information:
68 |
69 | Samples arrive periodically as Dr. Wolberg reports his clinical cases.
70 | The database therefore reflects this chronological grouping of the data.
71 | This grouping information appears immediately below, having been removed
72 | from the data itself:
73 |
74 | Group 1: 367 instances (January 1989)
75 | Group 2: 70 instances (October 1989)
76 | Group 3: 31 instances (February 1990)
77 | Group 4: 17 instances (April 1990)
78 | Group 5: 48 instances (August 1990)
79 | Group 6: 49 instances (Updated January 1991)
80 | Group 7: 31 instances (June 1991)
81 | Group 8: 86 instances (November 1991)
82 | -----------------------------------------
83 | Total: 699 points (as of the donated datbase on 15 July 1992)
84 |
85 | Note that the results summarized above in Past Usage refer to a dataset
86 | of size 369, while Group 1 has only 367 instances. This is because it
87 | originally contained 369 instances; 2 were removed. The following
88 | statements summarizes changes to the original Group 1's set of data:
89 |
90 | ##### Group 1 : 367 points: 200B 167M (January 1989)
91 | ##### Revised Jan 10, 1991: Replaced zero bare nuclei in 1080185 & 1187805
92 | ##### Revised Nov 22,1991: Removed 765878,4,5,9,7,10,10,10,3,8,1 no record
93 | ##### : Removed 484201,2,7,8,8,4,3,10,3,4,1 zero epithelial
94 | ##### : Changed 0 to 1 in field 6 of sample 1219406
95 | ##### : Changed 0 to 1 in field 8 of following sample:
96 | ##### : 1182404,2,3,1,1,1,2,0,1,1,1
97 |
98 | 5. Number of Instances: 699 (as of 15 July 1992)
99 |
100 | 6. Number of Attributes: 10 plus the class attribute
101 |
102 | 7. Attribute Information: (class attribute has been moved to last column)
103 |
104 | # Attribute Domain
105 | -- -----------------------------------------
106 | 1. Sample code number id number
107 | 2. Clump Thickness 1 - 10
108 | 3. Uniformity of Cell Size 1 - 10
109 | 4. Uniformity of Cell Shape 1 - 10
110 | 5. Marginal Adhesion 1 - 10
111 | 6. Single Epithelial Cell Size 1 - 10
112 | 7. Bare Nuclei 1 - 10
113 | 8. Bland Chromatin 1 - 10
114 | 9. Normal Nucleoli 1 - 10
115 | 10. Mitoses 1 - 10
116 | 11. Class: (2 for benign, 4 for malignant)
117 |
118 | 8. Missing attribute values: 16
119 |
120 | There are 16 instances in Groups 1 to 6 that contain a single missing
121 | (i.e., unavailable) attribute value, now denoted by "?".
122 |
123 | 9. Class distribution:
124 |
125 | Benign: 458 (65.5%)
126 | Malignant: 241 (34.5%)
127 |
--------------------------------------------------------------------------------
/mobile_apps/image_classification/screens/ImageClassificationScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React, { Component } from 'react';
3 | import { StyleSheet, Text, View, StatusBar, ActivityIndicator, TouchableOpacity, Image } from 'react-native'
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import * as tf from '@tensorflow/tfjs';
7 | import '@tensorflow/tfjs-react-native';
8 |
9 | import * as mobilenet from '@tensorflow-models/mobilenet'
10 |
11 | import Constants from 'expo-constants'
12 | import * as Permissions from 'expo-permissions'
13 | import * as jpeg from 'jpeg-js'
14 | import * as ImagePicker from 'expo-image-picker'
15 |
16 | import { fetch } from '@tensorflow/tfjs-react-native'
17 |
18 | export default class ImageClassificationScreen extends React.Component {
19 | constructor(props) {
20 | super(props);
21 | this.state = {
22 | isTfReady: false,
23 | isModelReady: false,
24 | predictions: null,
25 | image: null
26 | };
27 | }
28 |
29 | async componentDidMount() {
30 | await tf.ready(); // preparing TensorFlow
31 | this.setState({ isTfReady: true,});
32 |
33 | this.model = await mobilenet.load(); // preparing MobileNet model
34 | this.setState({ isModelReady: true });
35 |
36 | this.getPermissionAsync(); // get permission for accessing camera on mobile device
37 | }
38 |
39 | getPermissionAsync = async () => {
40 | if (Constants.platform.ios) {
41 | const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL)
42 | if (status !== 'granted') {
43 | alert('Please grant camera roll permission for this project!')
44 | }
45 | }
46 | }
47 |
48 | imageToTensor(rawImageData) {
49 | const TO_UINT8ARRAY = true
50 | const { width, height, data } = jpeg.decode(rawImageData, TO_UINT8ARRAY)
51 | // Drop the alpha channel info for mobilenet
52 | const buffer = new Uint8Array(width * height * 3)
53 | let offset = 0 // offset into original data
54 | for (let i = 0; i < buffer.length; i += 3) {
55 | buffer[i] = data[offset]
56 | buffer[i + 1] = data[offset + 1]
57 | buffer[i + 2] = data[offset + 2]
58 |
59 | offset += 4
60 | }
61 |
62 | return tf.tensor3d(buffer, [height, width, 3])
63 | }
64 |
65 | classifyImage = async () => {
66 | try {
67 | const imageAssetPath = Image.resolveAssetSource(this.state.image)
68 | const response = await fetch(imageAssetPath.uri, {}, { isBinary: true })
69 | const rawImageData = await response.arrayBuffer()
70 | const imageTensor = this.imageToTensor(rawImageData)
71 | const predictions = await this.model.classify(imageTensor)
72 | this.setState({ predictions: predictions })
73 | } catch (error) {
74 | console.log('Exception Error: ', error)
75 | }
76 | }
77 |
78 | selectImage = async () => {
79 | try {
80 | let response = await ImagePicker.launchImageLibraryAsync({
81 | mediaTypes: ImagePicker.MediaTypeOptions.All,
82 | allowsEditing: true,
83 | aspect: [4, 3]
84 | })
85 |
86 | if (!response.cancelled) {
87 | const source = { uri: response.uri }
88 | this.setState({ image: source })
89 | this.classifyImage()
90 | }
91 | } catch (error) {
92 | console.log(error)
93 | }
94 | }
95 |
96 | renderPrediction = (prediction) => {
97 | return (
98 |
99 |
100 | Prediction: {prediction.className} {', '} Probability: {prediction.probability}
101 |
102 |
103 | )
104 | }
105 |
106 | render() {
107 | const { isTfReady, isModelReady, predictions, image } = this.state
108 |
109 | return (
110 |
111 |
112 |
113 |
114 |
122 |
123 |
124 |
125 |
126 | TensorFlow.js ready? {isTfReady ? ✅ : ''}
127 |
128 |
129 |
130 | MobileNet model ready?
131 | {isModelReady ? (
132 | ✅
133 | ) : (
134 |
135 | )}
136 |
137 |
138 |
141 | {image && }
142 |
143 | {isModelReady && !image && (
144 | Tap to choose image
145 | )}
146 |
147 |
148 | {isModelReady && image && (
149 |
150 | Predictions: {predictions ? '' : 'Predicting...'}
151 |
152 | )}
153 | {isModelReady &&
154 | predictions &&
155 | predictions.map(p => this.renderPrediction(p))}
156 |
157 |
158 |
159 |
160 | )
161 | }
162 | }
163 |
164 | ImageClassificationScreen.navigationOptions = {
165 | header: null,
166 | };
167 |
168 | const styles = StyleSheet.create({
169 | container: {
170 | flex: 1,
171 | backgroundColor: '#171f24'
172 | },
173 | welcomeContainer: {
174 | alignItems: 'center',
175 | marginTop: 10,
176 | marginBottom: 20,
177 | },
178 | welcomeImage: {
179 | width: 100,
180 | height: 80,
181 | resizeMode: 'contain',
182 | marginTop: 3,
183 | marginLeft: -10,
184 | },
185 | contentContainer: {
186 | paddingTop: 30,
187 | },
188 | loadingContainer: {
189 | marginTop: 80,
190 | justifyContent: 'center'
191 | },
192 | text: {
193 | color: '#ffffff',
194 | fontSize: 16
195 | },
196 | loadingModelContainer: {
197 | flexDirection: 'row',
198 | marginTop: 10
199 | },
200 | imageWrapper: {
201 | width: 280,
202 | height: 280,
203 | padding: 10,
204 | borderColor: '#cf667f',
205 | borderWidth: 5,
206 | borderStyle: 'dashed',
207 | marginTop: 40,
208 | marginBottom: 10,
209 | position: 'relative',
210 | justifyContent: 'center',
211 | alignItems: 'center'
212 | },
213 | imageContainer: {
214 | width: 250,
215 | height: 250,
216 | position: 'absolute',
217 | top: 10,
218 | left: 10,
219 | bottom: 10,
220 | right: 10
221 | },
222 | predictionWrapper: {
223 | height: 100,
224 | width: '100%',
225 | flexDirection: 'column',
226 | alignItems: 'center'
227 | },
228 | transparentText: {
229 | color: '#ffffff',
230 | opacity: 0.7
231 | },
232 | footer: {
233 | marginTop: 40
234 | },
235 | poweredBy: {
236 | fontSize: 20,
237 | color: '#e69e34',
238 | marginBottom: 6
239 | },
240 | tfLogo: {
241 | width: 125,
242 | height: 70
243 | }
244 | })
--------------------------------------------------------------------------------
/mobile_apps/objects_detection/screens/CocoSsdScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React, { Component } from 'react';
3 | import { StyleSheet, Text, View, StatusBar, ActivityIndicator, TouchableOpacity, Image } from 'react-native'
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import * as tf from '@tensorflow/tfjs';
7 | import '@tensorflow/tfjs-react-native';
8 |
9 | // import * as mobilenet from '@tensorflow-models/mobilenet'
10 | // see https://github.com/tensorflow/tfjs-models
11 | import * as cocossd from '@tensorflow-models/coco-ssd'
12 |
13 | import Constants from 'expo-constants'
14 | import * as Permissions from 'expo-permissions'
15 | import * as jpeg from 'jpeg-js'
16 | import * as ImagePicker from 'expo-image-picker'
17 |
18 | import { fetch } from '@tensorflow/tfjs-react-native'
19 |
20 | export default class CocoSsdScreen extends React.Component {
21 | constructor(props) {
22 | super(props);
23 | this.state = {
24 | isTfReady: false,
25 | isModelReady: false,
26 | predictions: null,
27 | image: null
28 | };
29 | }
30 |
31 | async componentDidMount() {
32 | await tf.ready(); // preparing TensorFlow
33 | this.setState({ isTfReady: true,});
34 |
35 | // this.model = await mobilenet.load(); // preparing MobileNet model
36 | this.model = await cocossd.load(); // preparing COCO-SSD model
37 | this.setState({ isModelReady: true });
38 |
39 | this.getPermissionAsync(); // get permission for accessing camera on mobile device
40 | }
41 |
42 | getPermissionAsync = async () => {
43 | if (Constants.platform.ios) {
44 | const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL)
45 | if (status !== 'granted') {
46 | alert('Please grant camera roll permission for this project!')
47 | }
48 | }
49 | }
50 |
51 | imageToTensor(rawImageData) {
52 | const TO_UINT8ARRAY = true
53 | const { width, height, data } = jpeg.decode(rawImageData, TO_UINT8ARRAY)
54 | // Drop the alpha channel info for mobilenet
55 | const buffer = new Uint8Array(width * height * 3)
56 | let offset = 0 // offset into original data
57 | for (let i = 0; i < buffer.length; i += 3) {
58 | buffer[i] = data[offset]
59 | buffer[i + 1] = data[offset + 1]
60 | buffer[i + 2] = data[offset + 2]
61 |
62 | offset += 4
63 | }
64 |
65 | return tf.tensor3d(buffer, [height, width, 3])
66 | }
67 |
68 | detectObjects = async () => {
69 | try {
70 | const imageAssetPath = Image.resolveAssetSource(this.state.image)
71 |
72 | const response = await fetch(imageAssetPath.uri, {}, { isBinary: true })
73 | const rawImageData = await response.arrayBuffer()
74 | const imageTensor = this.imageToTensor(rawImageData)
75 | const predictions = await this.model.detect(imageTensor)
76 |
77 | this.setState({ predictions: predictions })
78 | // this.setState({ image_uri: imageAssetPath.uri })
79 |
80 | console.log('----------- predictions: ', predictions);
81 |
82 | } catch (error) {
83 | console.log('Exception Error: ', error)
84 | }
85 | }
86 |
87 | selectImage = async () => {
88 | try {
89 | let response = await ImagePicker.launchImageLibraryAsync({
90 | mediaTypes: ImagePicker.MediaTypeOptions.All,
91 | allowsEditing: true,
92 | aspect: [4, 3]
93 | })
94 |
95 | if (!response.cancelled) {
96 | const source = { uri: response.uri }
97 | this.setState({ image: source })
98 | this.detectObjects()
99 | }
100 | } catch (error) {
101 | console.log(error)
102 | }
103 | }
104 |
105 | /*
106 | [{
107 | bbox: [x, y, width, height],
108 | class: "person",
109 | score: 0.8380282521247864
110 | }, {
111 | bbox: [x, y, width, height],
112 | class: "kite",
113 | score: 0.74644153267145157
114 | }]
115 | */
116 | renderPrediction = (prediction, index) => {
117 | const pclass = prediction.class;
118 | const score = prediction.score;
119 | const x = prediction.bbox[0];
120 | const y = prediction.bbox[1];
121 | const w = prediction.bbox[2];
122 | const h = prediction.bbox[3];
123 |
124 | return (
125 |
126 |
127 | Prediction: {pclass} {', '} Probability: {score} {', '} Bbox: {x} {', '} {y} {', '} {w} {', '} {h}
128 |
129 |
130 | )
131 | }
132 |
133 | render() {
134 | const { isTfReady, isModelReady, predictions, image } = this.state
135 |
136 | return (
137 |
138 |
139 |
140 |
141 |
149 |
150 |
151 |
152 |
153 | TensorFlow.js ready? {isTfReady ? ✅ : ''}
154 |
155 |
156 |
157 | COCO-SSD model ready?
158 | {isModelReady ? (
159 | ✅
160 | ) : (
161 |
162 | )}
163 |
164 |
165 |
168 | {image && }
169 |
170 | {isModelReady && !image && (
171 | Tap to choose image
172 | )}
173 |
174 |
175 | {isModelReady && image && (
176 |
177 | Predictions: {predictions ? '' : 'Detecting...'}
178 |
179 | )}
180 |
181 | {isModelReady &&
182 | predictions &&
183 | predictions.map((p, index) => this.renderPrediction(p, index))}
184 |
185 |
186 |
187 |
188 | )
189 | }
190 | }
191 |
192 | CocoSsdScreen.navigationOptions = {
193 | header: null,
194 | };
195 |
196 | const styles = StyleSheet.create({
197 | container: {
198 | flex: 1,
199 | backgroundColor: '#171f24'
200 | },
201 | welcomeContainer: {
202 | alignItems: 'center',
203 | marginTop: 10,
204 | marginBottom: 20,
205 | },
206 | welcomeImage: {
207 | width: 100,
208 | height: 80,
209 | resizeMode: 'contain',
210 | marginTop: 3,
211 | marginLeft: -10,
212 | },
213 | contentContainer: {
214 | paddingTop: 30,
215 | },
216 | loadingContainer: {
217 | marginTop: 80,
218 | justifyContent: 'center'
219 | },
220 | text: {
221 | color: '#ffffff',
222 | fontSize: 16
223 | },
224 | loadingModelContainer: {
225 | flexDirection: 'row',
226 | marginTop: 10
227 | },
228 | imageWrapper: {
229 | width: 280,
230 | height: 280,
231 | padding: 10,
232 | borderColor: '#cf667f',
233 | borderWidth: 5,
234 | borderStyle: 'dashed',
235 | marginTop: 40,
236 | marginBottom: 10,
237 | position: 'relative',
238 | justifyContent: 'center',
239 | alignItems: 'center'
240 | },
241 | imageContainer: {
242 | width: 250,
243 | height: 250,
244 | position: 'absolute',
245 | top: 10,
246 | left: 10,
247 | bottom: 10,
248 | right: 10
249 | },
250 | predictionWrapper: {
251 | height: 100,
252 | width: '100%',
253 | flexDirection: 'column',
254 | alignItems: 'center'
255 | },
256 | transparentText: {
257 | color: '#ffffff',
258 | opacity: 0.7
259 | },
260 | footer: {
261 | marginTop: 40
262 | },
263 | poweredBy: {
264 | fontSize: 20,
265 | color: '#e69e34',
266 | marginBottom: 6
267 | },
268 | tfLogo: {
269 | width: 125,
270 | height: 70
271 | }
272 | })
--------------------------------------------------------------------------------
/mobile_apps/mobile_bert/screens/QnaScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React, { Component } from 'react';
3 | import { StyleSheet, Text, TextInput, Image, Button, View, StatusBar, ActivityIndicator, TouchableOpacity } from 'react-native'
4 | import { ScrollView } from 'react-native-gesture-handler';
5 |
6 | import * as tf from '@tensorflow/tfjs';
7 | import '@tensorflow/tfjs-react-native';
8 |
9 | import * as qna from '@tensorflow-models/qna'
10 |
11 | import Constants from 'expo-constants'
12 |
13 | export default class QnaScreen extends React.Component {
14 | constructor(props) {
15 | super(props);
16 | this.state = {
17 | isTfReady: false,
18 | isModelReady: false,
19 | default_question: "Who is the CEO of Google?",
20 | default_passage: "Google LLC is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple, and Facebook. Google was founded in September 1998 by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University in California. Together they own about 14 percent of its shares and control 56 percent of the stockholder voting power through supervoting stock. They incorporated Google as a California privately held company on September 4, 1998, in California. Google was then reincorporated in Delaware on October 22, 2002. An initial public offering (IPO) took place on August 19, 2004, and Google moved to its headquarters in Mountain View, California, nicknamed the Googleplex. In August 2015, Google announced plans to reorganize its various interests as a conglomerate called Alphabet Inc. Google is Alphabet's leading subsidiary and will continue to be the umbrella company for Alphabet's Internet interests. Sundar Pichai was appointed CEO of Google, replacing Larry Page who became the CEO of Alphabet.",
21 | question: ' default question',
22 | passage: ' default pessage',
23 | answers: null,
24 | };
25 | }
26 |
27 | async componentDidMount() {
28 | await tf.ready(); // preparing TensorFlow
29 | this.setState({ isTfReady: true,});
30 |
31 | this.model = await qna.load(); // preparing MobileBERT model qna
32 | this.setState({ isModelReady: true });
33 | }
34 |
35 | findAnswers = async () => {
36 | try {
37 | const question = this.state.default_question;
38 | const passage = this.state.default_passage;
39 |
40 | const answers = await this.model.findAnswers(question, passage);
41 |
42 | console.log('answers: ');
43 | console.log(answers);
44 |
45 | return answers;
46 |
47 | } catch (error) {
48 | console.log('Exception Error: ', error)
49 | }
50 | }
51 |
52 | /*
53 | answers:
54 |
55 | Array [
56 | Object {
57 | "endIndex": 1206,
58 | "score": 12.2890625,
59 | "startIndex": 1186,
60 | "text": "replacing Larry Page",
61 | },
62 | Object {
63 | "endIndex": 1206,
64 | "score": 10.87109375,
65 | "startIndex": 1150,
66 | "text": "Pichai was appointed CEO of Google, replacing Larry Page",
67 | },
68 | Object {
69 | "endIndex": 1206,
70 | "score": 9.658203125,
71 | "startIndex": 1196,
72 | "text": "Larry Page",
73 | },
74 | Object {
75 | "endIndex": 1156,
76 | "score": 5.2802734375,
77 | "startIndex": 1150,
78 | "text": "Pichai",
79 | },
80 | ]
81 | */
82 | renderAnswer = (answer, index) => {
83 | const text = answer.text;
84 | const score = answer.score;
85 | const startIndex = answer.startIndex;
86 | const endIndex = answer.endIndex;
87 |
88 | return (
89 |
90 |
91 | Answer: {text} {', '} Probability: {score} {', '} start: {startIndex} {', '} end: {endIndex}
92 |
93 |
94 | )
95 | }
96 |
97 | render() {
98 | const { isTfReady, isModelReady, passage, question, answers } = this.state
99 |
100 | const onPress = () => {
101 | this.findAnswers().then((the_answers) => {
102 | this.setState({ answers: the_answers });
103 | })
104 | }
105 |
106 | return (
107 |
108 |
109 |
110 |
111 |
119 |
120 |
121 |
122 |
123 | TensorFlow.js ready? {isTfReady ? ✅ : ''}
124 |
125 |
126 |
127 | MobileBERT model qna ready?
128 | {isModelReady ? (
129 | ✅
130 | ) : (
131 |
132 | )}
133 |
134 |
135 |
136 |
137 |
138 | Passage:
139 |
140 | this.setState({passage: text})}
146 | value={this.state.passage}
147 | />
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 | Question:
159 |
160 |
161 | this.setState({question: text})}
165 | value={this.state.question}
166 | />
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
181 |
182 |
183 | {isModelReady && (
184 |
185 | Predictions: {answers ? '' : 'Finding answers...'}
186 |
187 | )}
188 |
189 | {isModelReady &&
190 | answers &&
191 | answers.map((a, index) => this.renderAnswer(a, index))}
192 |
193 |
194 |
195 |
196 |
197 |
198 | )
199 | }
200 | }
201 |
202 | QnaScreen.navigationOptions = {
203 | header: null,
204 | };
205 |
206 | const styles = StyleSheet.create({
207 | container: {
208 | flex: 1,
209 | backgroundColor: '#171f24'
210 | },
211 | welcomeContainer: {
212 | alignItems: 'center',
213 | marginTop: 10,
214 | marginBottom: 20,
215 | },
216 | welcomeImage: {
217 | width: 100,
218 | height: 80,
219 | resizeMode: 'contain',
220 | marginTop: 3,
221 | marginLeft: -10,
222 | },
223 | contentContainer: {
224 | paddingTop: 30,
225 | },
226 | loadingContainer: {
227 | marginTop: 80,
228 | justifyContent: 'center'
229 | },
230 | text: {
231 | color: '#ffffff',
232 | fontSize: 16
233 | },
234 | loadingModelContainer: {
235 | flexDirection: 'row',
236 | marginTop: 10
237 | },
238 | imageWrapper: {
239 | width: 280,
240 | height: 280,
241 | padding: 10,
242 | borderColor: '#cf667f',
243 | borderWidth: 5,
244 | borderStyle: 'dashed',
245 | marginTop: 40,
246 | marginBottom: 10,
247 | position: 'relative',
248 | justifyContent: 'center',
249 | alignItems: 'center'
250 | },
251 | imageContainer: {
252 | width: 250,
253 | height: 250,
254 | position: 'absolute',
255 | top: 10,
256 | left: 10,
257 | bottom: 10,
258 | right: 10
259 | },
260 | predictionWrapper: {
261 | height: 100,
262 | width: '100%',
263 | flexDirection: 'column',
264 | alignItems: 'center'
265 | },
266 | transparentText: {
267 | color: '#ffffff',
268 | opacity: 0.7
269 | },
270 | footer: {
271 | marginTop: 40
272 | },
273 | poweredBy: {
274 | fontSize: 20,
275 | color: '#e69e34',
276 | marginBottom: 6
277 | },
278 | tfLogo: {
279 | width: 125,
280 | height: 70
281 | }
282 | })
--------------------------------------------------------------------------------
/deep_learning/Multi_Layer_Perceptron/breast-cancer-wisconsin/breast-cancer-wisconsin.csv:
--------------------------------------------------------------------------------
1 | 1000025,5,1,1,1,2,1,3,1,1,2
2 | 1002945,5,4,4,5,7,10,3,2,1,2
3 | 1015425,3,1,1,1,2,2,3,1,1,2
4 | 1016277,6,8,8,1,3,4,3,7,1,2
5 | 1017023,4,1,1,3,2,1,3,1,1,2
6 | 1017122,8,10,10,8,7,10,9,7,1,4
7 | 1018099,1,1,1,1,2,10,3,1,1,2
8 | 1018561,2,1,2,1,2,1,3,1,1,2
9 | 1033078,2,1,1,1,2,1,1,1,5,2
10 | 1033078,4,2,1,1,2,1,2,1,1,2
11 | 1035283,1,1,1,1,1,1,3,1,1,2
12 | 1036172,2,1,1,1,2,1,2,1,1,2
13 | 1041801,5,3,3,3,2,3,4,4,1,4
14 | 1043999,1,1,1,1,2,3,3,1,1,2
15 | 1044572,8,7,5,10,7,9,5,5,4,4
16 | 1047630,7,4,6,4,6,1,4,3,1,4
17 | 1048672,4,1,1,1,2,1,2,1,1,2
18 | 1049815,4,1,1,1,2,1,3,1,1,2
19 | 1050670,10,7,7,6,4,10,4,1,2,4
20 | 1050718,6,1,1,1,2,1,3,1,1,2
21 | 1054590,7,3,2,10,5,10,5,4,4,4
22 | 1054593,10,5,5,3,6,7,7,10,1,4
23 | 1056784,3,1,1,1,2,1,2,1,1,2
24 | 1057013,8,4,5,1,2,?,7,3,1,4
25 | 1059552,1,1,1,1,2,1,3,1,1,2
26 | 1065726,5,2,3,4,2,7,3,6,1,4
27 | 1066373,3,2,1,1,1,1,2,1,1,2
28 | 1066979,5,1,1,1,2,1,2,1,1,2
29 | 1067444,2,1,1,1,2,1,2,1,1,2
30 | 1070935,1,1,3,1,2,1,1,1,1,2
31 | 1070935,3,1,1,1,1,1,2,1,1,2
32 | 1071760,2,1,1,1,2,1,3,1,1,2
33 | 1072179,10,7,7,3,8,5,7,4,3,4
34 | 1074610,2,1,1,2,2,1,3,1,1,2
35 | 1075123,3,1,2,1,2,1,2,1,1,2
36 | 1079304,2,1,1,1,2,1,2,1,1,2
37 | 1080185,10,10,10,8,6,1,8,9,1,4
38 | 1081791,6,2,1,1,1,1,7,1,1,2
39 | 1084584,5,4,4,9,2,10,5,6,1,4
40 | 1091262,2,5,3,3,6,7,7,5,1,4
41 | 1096800,6,6,6,9,6,?,7,8,1,2
42 | 1099510,10,4,3,1,3,3,6,5,2,4
43 | 1100524,6,10,10,2,8,10,7,3,3,4
44 | 1102573,5,6,5,6,10,1,3,1,1,4
45 | 1103608,10,10,10,4,8,1,8,10,1,4
46 | 1103722,1,1,1,1,2,1,2,1,2,2
47 | 1105257,3,7,7,4,4,9,4,8,1,4
48 | 1105524,1,1,1,1,2,1,2,1,1,2
49 | 1106095,4,1,1,3,2,1,3,1,1,2
50 | 1106829,7,8,7,2,4,8,3,8,2,4
51 | 1108370,9,5,8,1,2,3,2,1,5,4
52 | 1108449,5,3,3,4,2,4,3,4,1,4
53 | 1110102,10,3,6,2,3,5,4,10,2,4
54 | 1110503,5,5,5,8,10,8,7,3,7,4
55 | 1110524,10,5,5,6,8,8,7,1,1,4
56 | 1111249,10,6,6,3,4,5,3,6,1,4
57 | 1112209,8,10,10,1,3,6,3,9,1,4
58 | 1113038,8,2,4,1,5,1,5,4,4,4
59 | 1113483,5,2,3,1,6,10,5,1,1,4
60 | 1113906,9,5,5,2,2,2,5,1,1,4
61 | 1115282,5,3,5,5,3,3,4,10,1,4
62 | 1115293,1,1,1,1,2,2,2,1,1,2
63 | 1116116,9,10,10,1,10,8,3,3,1,4
64 | 1116132,6,3,4,1,5,2,3,9,1,4
65 | 1116192,1,1,1,1,2,1,2,1,1,2
66 | 1116998,10,4,2,1,3,2,4,3,10,4
67 | 1117152,4,1,1,1,2,1,3,1,1,2
68 | 1118039,5,3,4,1,8,10,4,9,1,4
69 | 1120559,8,3,8,3,4,9,8,9,8,4
70 | 1121732,1,1,1,1,2,1,3,2,1,2
71 | 1121919,5,1,3,1,2,1,2,1,1,2
72 | 1123061,6,10,2,8,10,2,7,8,10,4
73 | 1124651,1,3,3,2,2,1,7,2,1,2
74 | 1125035,9,4,5,10,6,10,4,8,1,4
75 | 1126417,10,6,4,1,3,4,3,2,3,4
76 | 1131294,1,1,2,1,2,2,4,2,1,2
77 | 1132347,1,1,4,1,2,1,2,1,1,2
78 | 1133041,5,3,1,2,2,1,2,1,1,2
79 | 1133136,3,1,1,1,2,3,3,1,1,2
80 | 1136142,2,1,1,1,3,1,2,1,1,2
81 | 1137156,2,2,2,1,1,1,7,1,1,2
82 | 1143978,4,1,1,2,2,1,2,1,1,2
83 | 1143978,5,2,1,1,2,1,3,1,1,2
84 | 1147044,3,1,1,1,2,2,7,1,1,2
85 | 1147699,3,5,7,8,8,9,7,10,7,4
86 | 1147748,5,10,6,1,10,4,4,10,10,4
87 | 1148278,3,3,6,4,5,8,4,4,1,4
88 | 1148873,3,6,6,6,5,10,6,8,3,4
89 | 1152331,4,1,1,1,2,1,3,1,1,2
90 | 1155546,2,1,1,2,3,1,2,1,1,2
91 | 1156272,1,1,1,1,2,1,3,1,1,2
92 | 1156948,3,1,1,2,2,1,1,1,1,2
93 | 1157734,4,1,1,1,2,1,3,1,1,2
94 | 1158247,1,1,1,1,2,1,2,1,1,2
95 | 1160476,2,1,1,1,2,1,3,1,1,2
96 | 1164066,1,1,1,1,2,1,3,1,1,2
97 | 1165297,2,1,1,2,2,1,1,1,1,2
98 | 1165790,5,1,1,1,2,1,3,1,1,2
99 | 1165926,9,6,9,2,10,6,2,9,10,4
100 | 1166630,7,5,6,10,5,10,7,9,4,4
101 | 1166654,10,3,5,1,10,5,3,10,2,4
102 | 1167439,2,3,4,4,2,5,2,5,1,4
103 | 1167471,4,1,2,1,2,1,3,1,1,2
104 | 1168359,8,2,3,1,6,3,7,1,1,4
105 | 1168736,10,10,10,10,10,1,8,8,8,4
106 | 1169049,7,3,4,4,3,3,3,2,7,4
107 | 1170419,10,10,10,8,2,10,4,1,1,4
108 | 1170420,1,6,8,10,8,10,5,7,1,4
109 | 1171710,1,1,1,1,2,1,2,3,1,2
110 | 1171710,6,5,4,4,3,9,7,8,3,4
111 | 1171795,1,3,1,2,2,2,5,3,2,2
112 | 1171845,8,6,4,3,5,9,3,1,1,4
113 | 1172152,10,3,3,10,2,10,7,3,3,4
114 | 1173216,10,10,10,3,10,8,8,1,1,4
115 | 1173235,3,3,2,1,2,3,3,1,1,2
116 | 1173347,1,1,1,1,2,5,1,1,1,2
117 | 1173347,8,3,3,1,2,2,3,2,1,2
118 | 1173509,4,5,5,10,4,10,7,5,8,4
119 | 1173514,1,1,1,1,4,3,1,1,1,2
120 | 1173681,3,2,1,1,2,2,3,1,1,2
121 | 1174057,1,1,2,2,2,1,3,1,1,2
122 | 1174057,4,2,1,1,2,2,3,1,1,2
123 | 1174131,10,10,10,2,10,10,5,3,3,4
124 | 1174428,5,3,5,1,8,10,5,3,1,4
125 | 1175937,5,4,6,7,9,7,8,10,1,4
126 | 1176406,1,1,1,1,2,1,2,1,1,2
127 | 1176881,7,5,3,7,4,10,7,5,5,4
128 | 1177027,3,1,1,1,2,1,3,1,1,2
129 | 1177399,8,3,5,4,5,10,1,6,2,4
130 | 1177512,1,1,1,1,10,1,1,1,1,2
131 | 1178580,5,1,3,1,2,1,2,1,1,2
132 | 1179818,2,1,1,1,2,1,3,1,1,2
133 | 1180194,5,10,8,10,8,10,3,6,3,4
134 | 1180523,3,1,1,1,2,1,2,2,1,2
135 | 1180831,3,1,1,1,3,1,2,1,1,2
136 | 1181356,5,1,1,1,2,2,3,3,1,2
137 | 1182404,4,1,1,1,2,1,2,1,1,2
138 | 1182410,3,1,1,1,2,1,1,1,1,2
139 | 1183240,4,1,2,1,2,1,2,1,1,2
140 | 1183246,1,1,1,1,1,?,2,1,1,2
141 | 1183516,3,1,1,1,2,1,1,1,1,2
142 | 1183911,2,1,1,1,2,1,1,1,1,2
143 | 1183983,9,5,5,4,4,5,4,3,3,4
144 | 1184184,1,1,1,1,2,5,1,1,1,2
145 | 1184241,2,1,1,1,2,1,2,1,1,2
146 | 1184840,1,1,3,1,2,?,2,1,1,2
147 | 1185609,3,4,5,2,6,8,4,1,1,4
148 | 1185610,1,1,1,1,3,2,2,1,1,2
149 | 1187457,3,1,1,3,8,1,5,8,1,2
150 | 1187805,8,8,7,4,10,10,7,8,7,4
151 | 1188472,1,1,1,1,1,1,3,1,1,2
152 | 1189266,7,2,4,1,6,10,5,4,3,4
153 | 1189286,10,10,8,6,4,5,8,10,1,4
154 | 1190394,4,1,1,1,2,3,1,1,1,2
155 | 1190485,1,1,1,1,2,1,1,1,1,2
156 | 1192325,5,5,5,6,3,10,3,1,1,4
157 | 1193091,1,2,2,1,2,1,2,1,1,2
158 | 1193210,2,1,1,1,2,1,3,1,1,2
159 | 1193683,1,1,2,1,3,?,1,1,1,2
160 | 1196295,9,9,10,3,6,10,7,10,6,4
161 | 1196915,10,7,7,4,5,10,5,7,2,4
162 | 1197080,4,1,1,1,2,1,3,2,1,2
163 | 1197270,3,1,1,1,2,1,3,1,1,2
164 | 1197440,1,1,1,2,1,3,1,1,7,2
165 | 1197510,5,1,1,1,2,?,3,1,1,2
166 | 1197979,4,1,1,1,2,2,3,2,1,2
167 | 1197993,5,6,7,8,8,10,3,10,3,4
168 | 1198128,10,8,10,10,6,1,3,1,10,4
169 | 1198641,3,1,1,1,2,1,3,1,1,2
170 | 1199219,1,1,1,2,1,1,1,1,1,2
171 | 1199731,3,1,1,1,2,1,1,1,1,2
172 | 1199983,1,1,1,1,2,1,3,1,1,2
173 | 1200772,1,1,1,1,2,1,2,1,1,2
174 | 1200847,6,10,10,10,8,10,10,10,7,4
175 | 1200892,8,6,5,4,3,10,6,1,1,4
176 | 1200952,5,8,7,7,10,10,5,7,1,4
177 | 1201834,2,1,1,1,2,1,3,1,1,2
178 | 1201936,5,10,10,3,8,1,5,10,3,4
179 | 1202125,4,1,1,1,2,1,3,1,1,2
180 | 1202812,5,3,3,3,6,10,3,1,1,4
181 | 1203096,1,1,1,1,1,1,3,1,1,2
182 | 1204242,1,1,1,1,2,1,1,1,1,2
183 | 1204898,6,1,1,1,2,1,3,1,1,2
184 | 1205138,5,8,8,8,5,10,7,8,1,4
185 | 1205579,8,7,6,4,4,10,5,1,1,4
186 | 1206089,2,1,1,1,1,1,3,1,1,2
187 | 1206695,1,5,8,6,5,8,7,10,1,4
188 | 1206841,10,5,6,10,6,10,7,7,10,4
189 | 1207986,5,8,4,10,5,8,9,10,1,4
190 | 1208301,1,2,3,1,2,1,3,1,1,2
191 | 1210963,10,10,10,8,6,8,7,10,1,4
192 | 1211202,7,5,10,10,10,10,4,10,3,4
193 | 1212232,5,1,1,1,2,1,2,1,1,2
194 | 1212251,1,1,1,1,2,1,3,1,1,2
195 | 1212422,3,1,1,1,2,1,3,1,1,2
196 | 1212422,4,1,1,1,2,1,3,1,1,2
197 | 1213375,8,4,4,5,4,7,7,8,2,2
198 | 1213383,5,1,1,4,2,1,3,1,1,2
199 | 1214092,1,1,1,1,2,1,1,1,1,2
200 | 1214556,3,1,1,1,2,1,2,1,1,2
201 | 1214966,9,7,7,5,5,10,7,8,3,4
202 | 1216694,10,8,8,4,10,10,8,1,1,4
203 | 1216947,1,1,1,1,2,1,3,1,1,2
204 | 1217051,5,1,1,1,2,1,3,1,1,2
205 | 1217264,1,1,1,1,2,1,3,1,1,2
206 | 1218105,5,10,10,9,6,10,7,10,5,4
207 | 1218741,10,10,9,3,7,5,3,5,1,4
208 | 1218860,1,1,1,1,1,1,3,1,1,2
209 | 1218860,1,1,1,1,1,1,3,1,1,2
210 | 1219406,5,1,1,1,1,1,3,1,1,2
211 | 1219525,8,10,10,10,5,10,8,10,6,4
212 | 1219859,8,10,8,8,4,8,7,7,1,4
213 | 1220330,1,1,1,1,2,1,3,1,1,2
214 | 1221863,10,10,10,10,7,10,7,10,4,4
215 | 1222047,10,10,10,10,3,10,10,6,1,4
216 | 1222936,8,7,8,7,5,5,5,10,2,4
217 | 1223282,1,1,1,1,2,1,2,1,1,2
218 | 1223426,1,1,1,1,2,1,3,1,1,2
219 | 1223793,6,10,7,7,6,4,8,10,2,4
220 | 1223967,6,1,3,1,2,1,3,1,1,2
221 | 1224329,1,1,1,2,2,1,3,1,1,2
222 | 1225799,10,6,4,3,10,10,9,10,1,4
223 | 1226012,4,1,1,3,1,5,2,1,1,4
224 | 1226612,7,5,6,3,3,8,7,4,1,4
225 | 1227210,10,5,5,6,3,10,7,9,2,4
226 | 1227244,1,1,1,1,2,1,2,1,1,2
227 | 1227481,10,5,7,4,4,10,8,9,1,4
228 | 1228152,8,9,9,5,3,5,7,7,1,4
229 | 1228311,1,1,1,1,1,1,3,1,1,2
230 | 1230175,10,10,10,3,10,10,9,10,1,4
231 | 1230688,7,4,7,4,3,7,7,6,1,4
232 | 1231387,6,8,7,5,6,8,8,9,2,4
233 | 1231706,8,4,6,3,3,1,4,3,1,2
234 | 1232225,10,4,5,5,5,10,4,1,1,4
235 | 1236043,3,3,2,1,3,1,3,6,1,2
236 | 1241232,3,1,4,1,2,?,3,1,1,2
237 | 1241559,10,8,8,2,8,10,4,8,10,4
238 | 1241679,9,8,8,5,6,2,4,10,4,4
239 | 1242364,8,10,10,8,6,9,3,10,10,4
240 | 1243256,10,4,3,2,3,10,5,3,2,4
241 | 1270479,5,1,3,3,2,2,2,3,1,2
242 | 1276091,3,1,1,3,1,1,3,1,1,2
243 | 1277018,2,1,1,1,2,1,3,1,1,2
244 | 128059,1,1,1,1,2,5,5,1,1,2
245 | 1285531,1,1,1,1,2,1,3,1,1,2
246 | 1287775,5,1,1,2,2,2,3,1,1,2
247 | 144888,8,10,10,8,5,10,7,8,1,4
248 | 145447,8,4,4,1,2,9,3,3,1,4
249 | 167528,4,1,1,1,2,1,3,6,1,2
250 | 169356,3,1,1,1,2,?,3,1,1,2
251 | 183913,1,2,2,1,2,1,1,1,1,2
252 | 191250,10,4,4,10,2,10,5,3,3,4
253 | 1017023,6,3,3,5,3,10,3,5,3,2
254 | 1100524,6,10,10,2,8,10,7,3,3,4
255 | 1116116,9,10,10,1,10,8,3,3,1,4
256 | 1168736,5,6,6,2,4,10,3,6,1,4
257 | 1182404,3,1,1,1,2,1,1,1,1,2
258 | 1182404,3,1,1,1,2,1,2,1,1,2
259 | 1198641,3,1,1,1,2,1,3,1,1,2
260 | 242970,5,7,7,1,5,8,3,4,1,2
261 | 255644,10,5,8,10,3,10,5,1,3,4
262 | 263538,5,10,10,6,10,10,10,6,5,4
263 | 274137,8,8,9,4,5,10,7,8,1,4
264 | 303213,10,4,4,10,6,10,5,5,1,4
265 | 314428,7,9,4,10,10,3,5,3,3,4
266 | 1182404,5,1,4,1,2,1,3,2,1,2
267 | 1198641,10,10,6,3,3,10,4,3,2,4
268 | 320675,3,3,5,2,3,10,7,1,1,4
269 | 324427,10,8,8,2,3,4,8,7,8,4
270 | 385103,1,1,1,1,2,1,3,1,1,2
271 | 390840,8,4,7,1,3,10,3,9,2,4
272 | 411453,5,1,1,1,2,1,3,1,1,2
273 | 320675,3,3,5,2,3,10,7,1,1,4
274 | 428903,7,2,4,1,3,4,3,3,1,4
275 | 431495,3,1,1,1,2,1,3,2,1,2
276 | 432809,3,1,3,1,2,?,2,1,1,2
277 | 434518,3,1,1,1,2,1,2,1,1,2
278 | 452264,1,1,1,1,2,1,2,1,1,2
279 | 456282,1,1,1,1,2,1,3,1,1,2
280 | 476903,10,5,7,3,3,7,3,3,8,4
281 | 486283,3,1,1,1,2,1,3,1,1,2
282 | 486662,2,1,1,2,2,1,3,1,1,2
283 | 488173,1,4,3,10,4,10,5,6,1,4
284 | 492268,10,4,6,1,2,10,5,3,1,4
285 | 508234,7,4,5,10,2,10,3,8,2,4
286 | 527363,8,10,10,10,8,10,10,7,3,4
287 | 529329,10,10,10,10,10,10,4,10,10,4
288 | 535331,3,1,1,1,3,1,2,1,1,2
289 | 543558,6,1,3,1,4,5,5,10,1,4
290 | 555977,5,6,6,8,6,10,4,10,4,4
291 | 560680,1,1,1,1,2,1,1,1,1,2
292 | 561477,1,1,1,1,2,1,3,1,1,2
293 | 563649,8,8,8,1,2,?,6,10,1,4
294 | 601265,10,4,4,6,2,10,2,3,1,4
295 | 606140,1,1,1,1,2,?,2,1,1,2
296 | 606722,5,5,7,8,6,10,7,4,1,4
297 | 616240,5,3,4,3,4,5,4,7,1,2
298 | 61634,5,4,3,1,2,?,2,3,1,2
299 | 625201,8,2,1,1,5,1,1,1,1,2
300 | 63375,9,1,2,6,4,10,7,7,2,4
301 | 635844,8,4,10,5,4,4,7,10,1,4
302 | 636130,1,1,1,1,2,1,3,1,1,2
303 | 640744,10,10,10,7,9,10,7,10,10,4
304 | 646904,1,1,1,1,2,1,3,1,1,2
305 | 653777,8,3,4,9,3,10,3,3,1,4
306 | 659642,10,8,4,4,4,10,3,10,4,4
307 | 666090,1,1,1,1,2,1,3,1,1,2
308 | 666942,1,1,1,1,2,1,3,1,1,2
309 | 667204,7,8,7,6,4,3,8,8,4,4
310 | 673637,3,1,1,1,2,5,5,1,1,2
311 | 684955,2,1,1,1,3,1,2,1,1,2
312 | 688033,1,1,1,1,2,1,1,1,1,2
313 | 691628,8,6,4,10,10,1,3,5,1,4
314 | 693702,1,1,1,1,2,1,1,1,1,2
315 | 704097,1,1,1,1,1,1,2,1,1,2
316 | 704168,4,6,5,6,7,?,4,9,1,2
317 | 706426,5,5,5,2,5,10,4,3,1,4
318 | 709287,6,8,7,8,6,8,8,9,1,4
319 | 718641,1,1,1,1,5,1,3,1,1,2
320 | 721482,4,4,4,4,6,5,7,3,1,2
321 | 730881,7,6,3,2,5,10,7,4,6,4
322 | 733639,3,1,1,1,2,?,3,1,1,2
323 | 733639,3,1,1,1,2,1,3,1,1,2
324 | 733823,5,4,6,10,2,10,4,1,1,4
325 | 740492,1,1,1,1,2,1,3,1,1,2
326 | 743348,3,2,2,1,2,1,2,3,1,2
327 | 752904,10,1,1,1,2,10,5,4,1,4
328 | 756136,1,1,1,1,2,1,2,1,1,2
329 | 760001,8,10,3,2,6,4,3,10,1,4
330 | 760239,10,4,6,4,5,10,7,1,1,4
331 | 76389,10,4,7,2,2,8,6,1,1,4
332 | 764974,5,1,1,1,2,1,3,1,2,2
333 | 770066,5,2,2,2,2,1,2,2,1,2
334 | 785208,5,4,6,6,4,10,4,3,1,4
335 | 785615,8,6,7,3,3,10,3,4,2,4
336 | 792744,1,1,1,1,2,1,1,1,1,2
337 | 797327,6,5,5,8,4,10,3,4,1,4
338 | 798429,1,1,1,1,2,1,3,1,1,2
339 | 704097,1,1,1,1,1,1,2,1,1,2
340 | 806423,8,5,5,5,2,10,4,3,1,4
341 | 809912,10,3,3,1,2,10,7,6,1,4
342 | 810104,1,1,1,1,2,1,3,1,1,2
343 | 814265,2,1,1,1,2,1,1,1,1,2
344 | 814911,1,1,1,1,2,1,1,1,1,2
345 | 822829,7,6,4,8,10,10,9,5,3,4
346 | 826923,1,1,1,1,2,1,1,1,1,2
347 | 830690,5,2,2,2,3,1,1,3,1,2
348 | 831268,1,1,1,1,1,1,1,3,1,2
349 | 832226,3,4,4,10,5,1,3,3,1,4
350 | 832567,4,2,3,5,3,8,7,6,1,4
351 | 836433,5,1,1,3,2,1,1,1,1,2
352 | 837082,2,1,1,1,2,1,3,1,1,2
353 | 846832,3,4,5,3,7,3,4,6,1,2
354 | 850831,2,7,10,10,7,10,4,9,4,4
355 | 855524,1,1,1,1,2,1,2,1,1,2
356 | 857774,4,1,1,1,3,1,2,2,1,2
357 | 859164,5,3,3,1,3,3,3,3,3,4
358 | 859350,8,10,10,7,10,10,7,3,8,4
359 | 866325,8,10,5,3,8,4,4,10,3,4
360 | 873549,10,3,5,4,3,7,3,5,3,4
361 | 877291,6,10,10,10,10,10,8,10,10,4
362 | 877943,3,10,3,10,6,10,5,1,4,4
363 | 888169,3,2,2,1,4,3,2,1,1,2
364 | 888523,4,4,4,2,2,3,2,1,1,2
365 | 896404,2,1,1,1,2,1,3,1,1,2
366 | 897172,2,1,1,1,2,1,2,1,1,2
367 | 95719,6,10,10,10,8,10,7,10,7,4
368 | 160296,5,8,8,10,5,10,8,10,3,4
369 | 342245,1,1,3,1,2,1,1,1,1,2
370 | 428598,1,1,3,1,1,1,2,1,1,2
371 | 492561,4,3,2,1,3,1,2,1,1,2
372 | 493452,1,1,3,1,2,1,1,1,1,2
373 | 493452,4,1,2,1,2,1,2,1,1,2
374 | 521441,5,1,1,2,2,1,2,1,1,2
375 | 560680,3,1,2,1,2,1,2,1,1,2
376 | 636437,1,1,1,1,2,1,1,1,1,2
377 | 640712,1,1,1,1,2,1,2,1,1,2
378 | 654244,1,1,1,1,1,1,2,1,1,2
379 | 657753,3,1,1,4,3,1,2,2,1,2
380 | 685977,5,3,4,1,4,1,3,1,1,2
381 | 805448,1,1,1,1,2,1,1,1,1,2
382 | 846423,10,6,3,6,4,10,7,8,4,4
383 | 1002504,3,2,2,2,2,1,3,2,1,2
384 | 1022257,2,1,1,1,2,1,1,1,1,2
385 | 1026122,2,1,1,1,2,1,1,1,1,2
386 | 1071084,3,3,2,2,3,1,1,2,3,2
387 | 1080233,7,6,6,3,2,10,7,1,1,4
388 | 1114570,5,3,3,2,3,1,3,1,1,2
389 | 1114570,2,1,1,1,2,1,2,2,1,2
390 | 1116715,5,1,1,1,3,2,2,2,1,2
391 | 1131411,1,1,1,2,2,1,2,1,1,2
392 | 1151734,10,8,7,4,3,10,7,9,1,4
393 | 1156017,3,1,1,1,2,1,2,1,1,2
394 | 1158247,1,1,1,1,1,1,1,1,1,2
395 | 1158405,1,2,3,1,2,1,2,1,1,2
396 | 1168278,3,1,1,1,2,1,2,1,1,2
397 | 1176187,3,1,1,1,2,1,3,1,1,2
398 | 1196263,4,1,1,1,2,1,1,1,1,2
399 | 1196475,3,2,1,1,2,1,2,2,1,2
400 | 1206314,1,2,3,1,2,1,1,1,1,2
401 | 1211265,3,10,8,7,6,9,9,3,8,4
402 | 1213784,3,1,1,1,2,1,1,1,1,2
403 | 1223003,5,3,3,1,2,1,2,1,1,2
404 | 1223306,3,1,1,1,2,4,1,1,1,2
405 | 1223543,1,2,1,3,2,1,1,2,1,2
406 | 1229929,1,1,1,1,2,1,2,1,1,2
407 | 1231853,4,2,2,1,2,1,2,1,1,2
408 | 1234554,1,1,1,1,2,1,2,1,1,2
409 | 1236837,2,3,2,2,2,2,3,1,1,2
410 | 1237674,3,1,2,1,2,1,2,1,1,2
411 | 1238021,1,1,1,1,2,1,2,1,1,2
412 | 1238464,1,1,1,1,1,?,2,1,1,2
413 | 1238633,10,10,10,6,8,4,8,5,1,4
414 | 1238915,5,1,2,1,2,1,3,1,1,2
415 | 1238948,8,5,6,2,3,10,6,6,1,4
416 | 1239232,3,3,2,6,3,3,3,5,1,2
417 | 1239347,8,7,8,5,10,10,7,2,1,4
418 | 1239967,1,1,1,1,2,1,2,1,1,2
419 | 1240337,5,2,2,2,2,2,3,2,2,2
420 | 1253505,2,3,1,1,5,1,1,1,1,2
421 | 1255384,3,2,2,3,2,3,3,1,1,2
422 | 1257200,10,10,10,7,10,10,8,2,1,4
423 | 1257648,4,3,3,1,2,1,3,3,1,2
424 | 1257815,5,1,3,1,2,1,2,1,1,2
425 | 1257938,3,1,1,1,2,1,1,1,1,2
426 | 1258549,9,10,10,10,10,10,10,10,1,4
427 | 1258556,5,3,6,1,2,1,1,1,1,2
428 | 1266154,8,7,8,2,4,2,5,10,1,4
429 | 1272039,1,1,1,1,2,1,2,1,1,2
430 | 1276091,2,1,1,1,2,1,2,1,1,2
431 | 1276091,1,3,1,1,2,1,2,2,1,2
432 | 1276091,5,1,1,3,4,1,3,2,1,2
433 | 1277629,5,1,1,1,2,1,2,2,1,2
434 | 1293439,3,2,2,3,2,1,1,1,1,2
435 | 1293439,6,9,7,5,5,8,4,2,1,2
436 | 1294562,10,8,10,1,3,10,5,1,1,4
437 | 1295186,10,10,10,1,6,1,2,8,1,4
438 | 527337,4,1,1,1,2,1,1,1,1,2
439 | 558538,4,1,3,3,2,1,1,1,1,2
440 | 566509,5,1,1,1,2,1,1,1,1,2
441 | 608157,10,4,3,10,4,10,10,1,1,4
442 | 677910,5,2,2,4,2,4,1,1,1,2
443 | 734111,1,1,1,3,2,3,1,1,1,2
444 | 734111,1,1,1,1,2,2,1,1,1,2
445 | 780555,5,1,1,6,3,1,2,1,1,2
446 | 827627,2,1,1,1,2,1,1,1,1,2
447 | 1049837,1,1,1,1,2,1,1,1,1,2
448 | 1058849,5,1,1,1,2,1,1,1,1,2
449 | 1182404,1,1,1,1,1,1,1,1,1,2
450 | 1193544,5,7,9,8,6,10,8,10,1,4
451 | 1201870,4,1,1,3,1,1,2,1,1,2
452 | 1202253,5,1,1,1,2,1,1,1,1,2
453 | 1227081,3,1,1,3,2,1,1,1,1,2
454 | 1230994,4,5,5,8,6,10,10,7,1,4
455 | 1238410,2,3,1,1,3,1,1,1,1,2
456 | 1246562,10,2,2,1,2,6,1,1,2,4
457 | 1257470,10,6,5,8,5,10,8,6,1,4
458 | 1259008,8,8,9,6,6,3,10,10,1,4
459 | 1266124,5,1,2,1,2,1,1,1,1,2
460 | 1267898,5,1,3,1,2,1,1,1,1,2
461 | 1268313,5,1,1,3,2,1,1,1,1,2
462 | 1268804,3,1,1,1,2,5,1,1,1,2
463 | 1276091,6,1,1,3,2,1,1,1,1,2
464 | 1280258,4,1,1,1,2,1,1,2,1,2
465 | 1293966,4,1,1,1,2,1,1,1,1,2
466 | 1296572,10,9,8,7,6,4,7,10,3,4
467 | 1298416,10,6,6,2,4,10,9,7,1,4
468 | 1299596,6,6,6,5,4,10,7,6,2,4
469 | 1105524,4,1,1,1,2,1,1,1,1,2
470 | 1181685,1,1,2,1,2,1,2,1,1,2
471 | 1211594,3,1,1,1,1,1,2,1,1,2
472 | 1238777,6,1,1,3,2,1,1,1,1,2
473 | 1257608,6,1,1,1,1,1,1,1,1,2
474 | 1269574,4,1,1,1,2,1,1,1,1,2
475 | 1277145,5,1,1,1,2,1,1,1,1,2
476 | 1287282,3,1,1,1,2,1,1,1,1,2
477 | 1296025,4,1,2,1,2,1,1,1,1,2
478 | 1296263,4,1,1,1,2,1,1,1,1,2
479 | 1296593,5,2,1,1,2,1,1,1,1,2
480 | 1299161,4,8,7,10,4,10,7,5,1,4
481 | 1301945,5,1,1,1,1,1,1,1,1,2
482 | 1302428,5,3,2,4,2,1,1,1,1,2
483 | 1318169,9,10,10,10,10,5,10,10,10,4
484 | 474162,8,7,8,5,5,10,9,10,1,4
485 | 787451,5,1,2,1,2,1,1,1,1,2
486 | 1002025,1,1,1,3,1,3,1,1,1,2
487 | 1070522,3,1,1,1,1,1,2,1,1,2
488 | 1073960,10,10,10,10,6,10,8,1,5,4
489 | 1076352,3,6,4,10,3,3,3,4,1,4
490 | 1084139,6,3,2,1,3,4,4,1,1,4
491 | 1115293,1,1,1,1,2,1,1,1,1,2
492 | 1119189,5,8,9,4,3,10,7,1,1,4
493 | 1133991,4,1,1,1,1,1,2,1,1,2
494 | 1142706,5,10,10,10,6,10,6,5,2,4
495 | 1155967,5,1,2,10,4,5,2,1,1,2
496 | 1170945,3,1,1,1,1,1,2,1,1,2
497 | 1181567,1,1,1,1,1,1,1,1,1,2
498 | 1182404,4,2,1,1,2,1,1,1,1,2
499 | 1204558,4,1,1,1,2,1,2,1,1,2
500 | 1217952,4,1,1,1,2,1,2,1,1,2
501 | 1224565,6,1,1,1,2,1,3,1,1,2
502 | 1238186,4,1,1,1,2,1,2,1,1,2
503 | 1253917,4,1,1,2,2,1,2,1,1,2
504 | 1265899,4,1,1,1,2,1,3,1,1,2
505 | 1268766,1,1,1,1,2,1,1,1,1,2
506 | 1277268,3,3,1,1,2,1,1,1,1,2
507 | 1286943,8,10,10,10,7,5,4,8,7,4
508 | 1295508,1,1,1,1,2,4,1,1,1,2
509 | 1297327,5,1,1,1,2,1,1,1,1,2
510 | 1297522,2,1,1,1,2,1,1,1,1,2
511 | 1298360,1,1,1,1,2,1,1,1,1,2
512 | 1299924,5,1,1,1,2,1,2,1,1,2
513 | 1299994,5,1,1,1,2,1,1,1,1,2
514 | 1304595,3,1,1,1,1,1,2,1,1,2
515 | 1306282,6,6,7,10,3,10,8,10,2,4
516 | 1313325,4,10,4,7,3,10,9,10,1,4
517 | 1320077,1,1,1,1,1,1,1,1,1,2
518 | 1320077,1,1,1,1,1,1,2,1,1,2
519 | 1320304,3,1,2,2,2,1,1,1,1,2
520 | 1330439,4,7,8,3,4,10,9,1,1,4
521 | 333093,1,1,1,1,3,1,1,1,1,2
522 | 369565,4,1,1,1,3,1,1,1,1,2
523 | 412300,10,4,5,4,3,5,7,3,1,4
524 | 672113,7,5,6,10,4,10,5,3,1,4
525 | 749653,3,1,1,1,2,1,2,1,1,2
526 | 769612,3,1,1,2,2,1,1,1,1,2
527 | 769612,4,1,1,1,2,1,1,1,1,2
528 | 798429,4,1,1,1,2,1,3,1,1,2
529 | 807657,6,1,3,2,2,1,1,1,1,2
530 | 8233704,4,1,1,1,1,1,2,1,1,2
531 | 837480,7,4,4,3,4,10,6,9,1,4
532 | 867392,4,2,2,1,2,1,2,1,1,2
533 | 869828,1,1,1,1,1,1,3,1,1,2
534 | 1043068,3,1,1,1,2,1,2,1,1,2
535 | 1056171,2,1,1,1,2,1,2,1,1,2
536 | 1061990,1,1,3,2,2,1,3,1,1,2
537 | 1113061,5,1,1,1,2,1,3,1,1,2
538 | 1116192,5,1,2,1,2,1,3,1,1,2
539 | 1135090,4,1,1,1,2,1,2,1,1,2
540 | 1145420,6,1,1,1,2,1,2,1,1,2
541 | 1158157,5,1,1,1,2,2,2,1,1,2
542 | 1171578,3,1,1,1,2,1,1,1,1,2
543 | 1174841,5,3,1,1,2,1,1,1,1,2
544 | 1184586,4,1,1,1,2,1,2,1,1,2
545 | 1186936,2,1,3,2,2,1,2,1,1,2
546 | 1197527,5,1,1,1,2,1,2,1,1,2
547 | 1222464,6,10,10,10,4,10,7,10,1,4
548 | 1240603,2,1,1,1,1,1,1,1,1,2
549 | 1240603,3,1,1,1,1,1,1,1,1,2
550 | 1241035,7,8,3,7,4,5,7,8,2,4
551 | 1287971,3,1,1,1,2,1,2,1,1,2
552 | 1289391,1,1,1,1,2,1,3,1,1,2
553 | 1299924,3,2,2,2,2,1,4,2,1,2
554 | 1306339,4,4,2,1,2,5,2,1,2,2
555 | 1313658,3,1,1,1,2,1,1,1,1,2
556 | 1313982,4,3,1,1,2,1,4,8,1,2
557 | 1321264,5,2,2,2,1,1,2,1,1,2
558 | 1321321,5,1,1,3,2,1,1,1,1,2
559 | 1321348,2,1,1,1,2,1,2,1,1,2
560 | 1321931,5,1,1,1,2,1,2,1,1,2
561 | 1321942,5,1,1,1,2,1,3,1,1,2
562 | 1321942,5,1,1,1,2,1,3,1,1,2
563 | 1328331,1,1,1,1,2,1,3,1,1,2
564 | 1328755,3,1,1,1,2,1,2,1,1,2
565 | 1331405,4,1,1,1,2,1,3,2,1,2
566 | 1331412,5,7,10,10,5,10,10,10,1,4
567 | 1333104,3,1,2,1,2,1,3,1,1,2
568 | 1334071,4,1,1,1,2,3,2,1,1,2
569 | 1343068,8,4,4,1,6,10,2,5,2,4
570 | 1343374,10,10,8,10,6,5,10,3,1,4
571 | 1344121,8,10,4,4,8,10,8,2,1,4
572 | 142932,7,6,10,5,3,10,9,10,2,4
573 | 183936,3,1,1,1,2,1,2,1,1,2
574 | 324382,1,1,1,1,2,1,2,1,1,2
575 | 378275,10,9,7,3,4,2,7,7,1,4
576 | 385103,5,1,2,1,2,1,3,1,1,2
577 | 690557,5,1,1,1,2,1,2,1,1,2
578 | 695091,1,1,1,1,2,1,2,1,1,2
579 | 695219,1,1,1,1,2,1,2,1,1,2
580 | 824249,1,1,1,1,2,1,3,1,1,2
581 | 871549,5,1,2,1,2,1,2,1,1,2
582 | 878358,5,7,10,6,5,10,7,5,1,4
583 | 1107684,6,10,5,5,4,10,6,10,1,4
584 | 1115762,3,1,1,1,2,1,1,1,1,2
585 | 1217717,5,1,1,6,3,1,1,1,1,2
586 | 1239420,1,1,1,1,2,1,1,1,1,2
587 | 1254538,8,10,10,10,6,10,10,10,1,4
588 | 1261751,5,1,1,1,2,1,2,2,1,2
589 | 1268275,9,8,8,9,6,3,4,1,1,4
590 | 1272166,5,1,1,1,2,1,1,1,1,2
591 | 1294261,4,10,8,5,4,1,10,1,1,4
592 | 1295529,2,5,7,6,4,10,7,6,1,4
593 | 1298484,10,3,4,5,3,10,4,1,1,4
594 | 1311875,5,1,2,1,2,1,1,1,1,2
595 | 1315506,4,8,6,3,4,10,7,1,1,4
596 | 1320141,5,1,1,1,2,1,2,1,1,2
597 | 1325309,4,1,2,1,2,1,2,1,1,2
598 | 1333063,5,1,3,1,2,1,3,1,1,2
599 | 1333495,3,1,1,1,2,1,2,1,1,2
600 | 1334659,5,2,4,1,1,1,1,1,1,2
601 | 1336798,3,1,1,1,2,1,2,1,1,2
602 | 1344449,1,1,1,1,1,1,2,1,1,2
603 | 1350568,4,1,1,1,2,1,2,1,1,2
604 | 1352663,5,4,6,8,4,1,8,10,1,4
605 | 188336,5,3,2,8,5,10,8,1,2,4
606 | 352431,10,5,10,3,5,8,7,8,3,4
607 | 353098,4,1,1,2,2,1,1,1,1,2
608 | 411453,1,1,1,1,2,1,1,1,1,2
609 | 557583,5,10,10,10,10,10,10,1,1,4
610 | 636375,5,1,1,1,2,1,1,1,1,2
611 | 736150,10,4,3,10,3,10,7,1,2,4
612 | 803531,5,10,10,10,5,2,8,5,1,4
613 | 822829,8,10,10,10,6,10,10,10,10,4
614 | 1016634,2,3,1,1,2,1,2,1,1,2
615 | 1031608,2,1,1,1,1,1,2,1,1,2
616 | 1041043,4,1,3,1,2,1,2,1,1,2
617 | 1042252,3,1,1,1,2,1,2,1,1,2
618 | 1057067,1,1,1,1,1,?,1,1,1,2
619 | 1061990,4,1,1,1,2,1,2,1,1,2
620 | 1073836,5,1,1,1,2,1,2,1,1,2
621 | 1083817,3,1,1,1,2,1,2,1,1,2
622 | 1096352,6,3,3,3,3,2,6,1,1,2
623 | 1140597,7,1,2,3,2,1,2,1,1,2
624 | 1149548,1,1,1,1,2,1,1,1,1,2
625 | 1174009,5,1,1,2,1,1,2,1,1,2
626 | 1183596,3,1,3,1,3,4,1,1,1,2
627 | 1190386,4,6,6,5,7,6,7,7,3,4
628 | 1190546,2,1,1,1,2,5,1,1,1,2
629 | 1213273,2,1,1,1,2,1,1,1,1,2
630 | 1218982,4,1,1,1,2,1,1,1,1,2
631 | 1225382,6,2,3,1,2,1,1,1,1,2
632 | 1235807,5,1,1,1,2,1,2,1,1,2
633 | 1238777,1,1,1,1,2,1,1,1,1,2
634 | 1253955,8,7,4,4,5,3,5,10,1,4
635 | 1257366,3,1,1,1,2,1,1,1,1,2
636 | 1260659,3,1,4,1,2,1,1,1,1,2
637 | 1268952,10,10,7,8,7,1,10,10,3,4
638 | 1275807,4,2,4,3,2,2,2,1,1,2
639 | 1277792,4,1,1,1,2,1,1,1,1,2
640 | 1277792,5,1,1,3,2,1,1,1,1,2
641 | 1285722,4,1,1,3,2,1,1,1,1,2
642 | 1288608,3,1,1,1,2,1,2,1,1,2
643 | 1290203,3,1,1,1,2,1,2,1,1,2
644 | 1294413,1,1,1,1,2,1,1,1,1,2
645 | 1299596,2,1,1,1,2,1,1,1,1,2
646 | 1303489,3,1,1,1,2,1,2,1,1,2
647 | 1311033,1,2,2,1,2,1,1,1,1,2
648 | 1311108,1,1,1,3,2,1,1,1,1,2
649 | 1315807,5,10,10,10,10,2,10,10,10,4
650 | 1318671,3,1,1,1,2,1,2,1,1,2
651 | 1319609,3,1,1,2,3,4,1,1,1,2
652 | 1323477,1,2,1,3,2,1,2,1,1,2
653 | 1324572,5,1,1,1,2,1,2,2,1,2
654 | 1324681,4,1,1,1,2,1,2,1,1,2
655 | 1325159,3,1,1,1,2,1,3,1,1,2
656 | 1326892,3,1,1,1,2,1,2,1,1,2
657 | 1330361,5,1,1,1,2,1,2,1,1,2
658 | 1333877,5,4,5,1,8,1,3,6,1,2
659 | 1334015,7,8,8,7,3,10,7,2,3,4
660 | 1334667,1,1,1,1,2,1,1,1,1,2
661 | 1339781,1,1,1,1,2,1,2,1,1,2
662 | 1339781,4,1,1,1,2,1,3,1,1,2
663 | 13454352,1,1,3,1,2,1,2,1,1,2
664 | 1345452,1,1,3,1,2,1,2,1,1,2
665 | 1345593,3,1,1,3,2,1,2,1,1,2
666 | 1347749,1,1,1,1,2,1,1,1,1,2
667 | 1347943,5,2,2,2,2,1,1,1,2,2
668 | 1348851,3,1,1,1,2,1,3,1,1,2
669 | 1350319,5,7,4,1,6,1,7,10,3,4
670 | 1350423,5,10,10,8,5,5,7,10,1,4
671 | 1352848,3,10,7,8,5,8,7,4,1,4
672 | 1353092,3,2,1,2,2,1,3,1,1,2
673 | 1354840,2,1,1,1,2,1,3,1,1,2
674 | 1354840,5,3,2,1,3,1,1,1,1,2
675 | 1355260,1,1,1,1,2,1,2,1,1,2
676 | 1365075,4,1,4,1,2,1,1,1,1,2
677 | 1365328,1,1,2,1,2,1,2,1,1,2
678 | 1368267,5,1,1,1,2,1,1,1,1,2
679 | 1368273,1,1,1,1,2,1,1,1,1,2
680 | 1368882,2,1,1,1,2,1,1,1,1,2
681 | 1369821,10,10,10,10,5,10,10,10,7,4
682 | 1371026,5,10,10,10,4,10,5,6,3,4
683 | 1371920,5,1,1,1,2,1,3,2,1,2
684 | 466906,1,1,1,1,2,1,1,1,1,2
685 | 466906,1,1,1,1,2,1,1,1,1,2
686 | 534555,1,1,1,1,2,1,1,1,1,2
687 | 536708,1,1,1,1,2,1,1,1,1,2
688 | 566346,3,1,1,1,2,1,2,3,1,2
689 | 603148,4,1,1,1,2,1,1,1,1,2
690 | 654546,1,1,1,1,2,1,1,1,8,2
691 | 654546,1,1,1,3,2,1,1,1,1,2
692 | 695091,5,10,10,5,4,5,4,4,1,4
693 | 714039,3,1,1,1,2,1,1,1,1,2
694 | 763235,3,1,1,1,2,1,2,1,2,2
695 | 776715,3,1,1,1,3,2,1,1,1,2
696 | 841769,2,1,1,1,2,1,1,1,1,2
697 | 888820,5,10,10,3,7,3,8,10,2,4
698 | 897471,4,8,6,4,3,4,10,6,1,4
699 | 897471,4,8,8,5,4,5,10,4,1,4
--------------------------------------------------------------------------------
/deep_learning/Multi_Layer_Perceptron/breast-cancer-wisconsin/breast-cancer-wisconsin.data:
--------------------------------------------------------------------------------
1 | 1000025,5,1,1,1,2,1,3,1,1,2
2 | 1002945,5,4,4,5,7,10,3,2,1,2
3 | 1015425,3,1,1,1,2,2,3,1,1,2
4 | 1016277,6,8,8,1,3,4,3,7,1,2
5 | 1017023,4,1,1,3,2,1,3,1,1,2
6 | 1017122,8,10,10,8,7,10,9,7,1,4
7 | 1018099,1,1,1,1,2,10,3,1,1,2
8 | 1018561,2,1,2,1,2,1,3,1,1,2
9 | 1033078,2,1,1,1,2,1,1,1,5,2
10 | 1033078,4,2,1,1,2,1,2,1,1,2
11 | 1035283,1,1,1,1,1,1,3,1,1,2
12 | 1036172,2,1,1,1,2,1,2,1,1,2
13 | 1041801,5,3,3,3,2,3,4,4,1,4
14 | 1043999,1,1,1,1,2,3,3,1,1,2
15 | 1044572,8,7,5,10,7,9,5,5,4,4
16 | 1047630,7,4,6,4,6,1,4,3,1,4
17 | 1048672,4,1,1,1,2,1,2,1,1,2
18 | 1049815,4,1,1,1,2,1,3,1,1,2
19 | 1050670,10,7,7,6,4,10,4,1,2,4
20 | 1050718,6,1,1,1,2,1,3,1,1,2
21 | 1054590,7,3,2,10,5,10,5,4,4,4
22 | 1054593,10,5,5,3,6,7,7,10,1,4
23 | 1056784,3,1,1,1,2,1,2,1,1,2
24 | 1057013,8,4,5,1,2,?,7,3,1,4
25 | 1059552,1,1,1,1,2,1,3,1,1,2
26 | 1065726,5,2,3,4,2,7,3,6,1,4
27 | 1066373,3,2,1,1,1,1,2,1,1,2
28 | 1066979,5,1,1,1,2,1,2,1,1,2
29 | 1067444,2,1,1,1,2,1,2,1,1,2
30 | 1070935,1,1,3,1,2,1,1,1,1,2
31 | 1070935,3,1,1,1,1,1,2,1,1,2
32 | 1071760,2,1,1,1,2,1,3,1,1,2
33 | 1072179,10,7,7,3,8,5,7,4,3,4
34 | 1074610,2,1,1,2,2,1,3,1,1,2
35 | 1075123,3,1,2,1,2,1,2,1,1,2
36 | 1079304,2,1,1,1,2,1,2,1,1,2
37 | 1080185,10,10,10,8,6,1,8,9,1,4
38 | 1081791,6,2,1,1,1,1,7,1,1,2
39 | 1084584,5,4,4,9,2,10,5,6,1,4
40 | 1091262,2,5,3,3,6,7,7,5,1,4
41 | 1096800,6,6,6,9,6,?,7,8,1,2
42 | 1099510,10,4,3,1,3,3,6,5,2,4
43 | 1100524,6,10,10,2,8,10,7,3,3,4
44 | 1102573,5,6,5,6,10,1,3,1,1,4
45 | 1103608,10,10,10,4,8,1,8,10,1,4
46 | 1103722,1,1,1,1,2,1,2,1,2,2
47 | 1105257,3,7,7,4,4,9,4,8,1,4
48 | 1105524,1,1,1,1,2,1,2,1,1,2
49 | 1106095,4,1,1,3,2,1,3,1,1,2
50 | 1106829,7,8,7,2,4,8,3,8,2,4
51 | 1108370,9,5,8,1,2,3,2,1,5,4
52 | 1108449,5,3,3,4,2,4,3,4,1,4
53 | 1110102,10,3,6,2,3,5,4,10,2,4
54 | 1110503,5,5,5,8,10,8,7,3,7,4
55 | 1110524,10,5,5,6,8,8,7,1,1,4
56 | 1111249,10,6,6,3,4,5,3,6,1,4
57 | 1112209,8,10,10,1,3,6,3,9,1,4
58 | 1113038,8,2,4,1,5,1,5,4,4,4
59 | 1113483,5,2,3,1,6,10,5,1,1,4
60 | 1113906,9,5,5,2,2,2,5,1,1,4
61 | 1115282,5,3,5,5,3,3,4,10,1,4
62 | 1115293,1,1,1,1,2,2,2,1,1,2
63 | 1116116,9,10,10,1,10,8,3,3,1,4
64 | 1116132,6,3,4,1,5,2,3,9,1,4
65 | 1116192,1,1,1,1,2,1,2,1,1,2
66 | 1116998,10,4,2,1,3,2,4,3,10,4
67 | 1117152,4,1,1,1,2,1,3,1,1,2
68 | 1118039,5,3,4,1,8,10,4,9,1,4
69 | 1120559,8,3,8,3,4,9,8,9,8,4
70 | 1121732,1,1,1,1,2,1,3,2,1,2
71 | 1121919,5,1,3,1,2,1,2,1,1,2
72 | 1123061,6,10,2,8,10,2,7,8,10,4
73 | 1124651,1,3,3,2,2,1,7,2,1,2
74 | 1125035,9,4,5,10,6,10,4,8,1,4
75 | 1126417,10,6,4,1,3,4,3,2,3,4
76 | 1131294,1,1,2,1,2,2,4,2,1,2
77 | 1132347,1,1,4,1,2,1,2,1,1,2
78 | 1133041,5,3,1,2,2,1,2,1,1,2
79 | 1133136,3,1,1,1,2,3,3,1,1,2
80 | 1136142,2,1,1,1,3,1,2,1,1,2
81 | 1137156,2,2,2,1,1,1,7,1,1,2
82 | 1143978,4,1,1,2,2,1,2,1,1,2
83 | 1143978,5,2,1,1,2,1,3,1,1,2
84 | 1147044,3,1,1,1,2,2,7,1,1,2
85 | 1147699,3,5,7,8,8,9,7,10,7,4
86 | 1147748,5,10,6,1,10,4,4,10,10,4
87 | 1148278,3,3,6,4,5,8,4,4,1,4
88 | 1148873,3,6,6,6,5,10,6,8,3,4
89 | 1152331,4,1,1,1,2,1,3,1,1,2
90 | 1155546,2,1,1,2,3,1,2,1,1,2
91 | 1156272,1,1,1,1,2,1,3,1,1,2
92 | 1156948,3,1,1,2,2,1,1,1,1,2
93 | 1157734,4,1,1,1,2,1,3,1,1,2
94 | 1158247,1,1,1,1,2,1,2,1,1,2
95 | 1160476,2,1,1,1,2,1,3,1,1,2
96 | 1164066,1,1,1,1,2,1,3,1,1,2
97 | 1165297,2,1,1,2,2,1,1,1,1,2
98 | 1165790,5,1,1,1,2,1,3,1,1,2
99 | 1165926,9,6,9,2,10,6,2,9,10,4
100 | 1166630,7,5,6,10,5,10,7,9,4,4
101 | 1166654,10,3,5,1,10,5,3,10,2,4
102 | 1167439,2,3,4,4,2,5,2,5,1,4
103 | 1167471,4,1,2,1,2,1,3,1,1,2
104 | 1168359,8,2,3,1,6,3,7,1,1,4
105 | 1168736,10,10,10,10,10,1,8,8,8,4
106 | 1169049,7,3,4,4,3,3,3,2,7,4
107 | 1170419,10,10,10,8,2,10,4,1,1,4
108 | 1170420,1,6,8,10,8,10,5,7,1,4
109 | 1171710,1,1,1,1,2,1,2,3,1,2
110 | 1171710,6,5,4,4,3,9,7,8,3,4
111 | 1171795,1,3,1,2,2,2,5,3,2,2
112 | 1171845,8,6,4,3,5,9,3,1,1,4
113 | 1172152,10,3,3,10,2,10,7,3,3,4
114 | 1173216,10,10,10,3,10,8,8,1,1,4
115 | 1173235,3,3,2,1,2,3,3,1,1,2
116 | 1173347,1,1,1,1,2,5,1,1,1,2
117 | 1173347,8,3,3,1,2,2,3,2,1,2
118 | 1173509,4,5,5,10,4,10,7,5,8,4
119 | 1173514,1,1,1,1,4,3,1,1,1,2
120 | 1173681,3,2,1,1,2,2,3,1,1,2
121 | 1174057,1,1,2,2,2,1,3,1,1,2
122 | 1174057,4,2,1,1,2,2,3,1,1,2
123 | 1174131,10,10,10,2,10,10,5,3,3,4
124 | 1174428,5,3,5,1,8,10,5,3,1,4
125 | 1175937,5,4,6,7,9,7,8,10,1,4
126 | 1176406,1,1,1,1,2,1,2,1,1,2
127 | 1176881,7,5,3,7,4,10,7,5,5,4
128 | 1177027,3,1,1,1,2,1,3,1,1,2
129 | 1177399,8,3,5,4,5,10,1,6,2,4
130 | 1177512,1,1,1,1,10,1,1,1,1,2
131 | 1178580,5,1,3,1,2,1,2,1,1,2
132 | 1179818,2,1,1,1,2,1,3,1,1,2
133 | 1180194,5,10,8,10,8,10,3,6,3,4
134 | 1180523,3,1,1,1,2,1,2,2,1,2
135 | 1180831,3,1,1,1,3,1,2,1,1,2
136 | 1181356,5,1,1,1,2,2,3,3,1,2
137 | 1182404,4,1,1,1,2,1,2,1,1,2
138 | 1182410,3,1,1,1,2,1,1,1,1,2
139 | 1183240,4,1,2,1,2,1,2,1,1,2
140 | 1183246,1,1,1,1,1,?,2,1,1,2
141 | 1183516,3,1,1,1,2,1,1,1,1,2
142 | 1183911,2,1,1,1,2,1,1,1,1,2
143 | 1183983,9,5,5,4,4,5,4,3,3,4
144 | 1184184,1,1,1,1,2,5,1,1,1,2
145 | 1184241,2,1,1,1,2,1,2,1,1,2
146 | 1184840,1,1,3,1,2,?,2,1,1,2
147 | 1185609,3,4,5,2,6,8,4,1,1,4
148 | 1185610,1,1,1,1,3,2,2,1,1,2
149 | 1187457,3,1,1,3,8,1,5,8,1,2
150 | 1187805,8,8,7,4,10,10,7,8,7,4
151 | 1188472,1,1,1,1,1,1,3,1,1,2
152 | 1189266,7,2,4,1,6,10,5,4,3,4
153 | 1189286,10,10,8,6,4,5,8,10,1,4
154 | 1190394,4,1,1,1,2,3,1,1,1,2
155 | 1190485,1,1,1,1,2,1,1,1,1,2
156 | 1192325,5,5,5,6,3,10,3,1,1,4
157 | 1193091,1,2,2,1,2,1,2,1,1,2
158 | 1193210,2,1,1,1,2,1,3,1,1,2
159 | 1193683,1,1,2,1,3,?,1,1,1,2
160 | 1196295,9,9,10,3,6,10,7,10,6,4
161 | 1196915,10,7,7,4,5,10,5,7,2,4
162 | 1197080,4,1,1,1,2,1,3,2,1,2
163 | 1197270,3,1,1,1,2,1,3,1,1,2
164 | 1197440,1,1,1,2,1,3,1,1,7,2
165 | 1197510,5,1,1,1,2,?,3,1,1,2
166 | 1197979,4,1,1,1,2,2,3,2,1,2
167 | 1197993,5,6,7,8,8,10,3,10,3,4
168 | 1198128,10,8,10,10,6,1,3,1,10,4
169 | 1198641,3,1,1,1,2,1,3,1,1,2
170 | 1199219,1,1,1,2,1,1,1,1,1,2
171 | 1199731,3,1,1,1,2,1,1,1,1,2
172 | 1199983,1,1,1,1,2,1,3,1,1,2
173 | 1200772,1,1,1,1,2,1,2,1,1,2
174 | 1200847,6,10,10,10,8,10,10,10,7,4
175 | 1200892,8,6,5,4,3,10,6,1,1,4
176 | 1200952,5,8,7,7,10,10,5,7,1,4
177 | 1201834,2,1,1,1,2,1,3,1,1,2
178 | 1201936,5,10,10,3,8,1,5,10,3,4
179 | 1202125,4,1,1,1,2,1,3,1,1,2
180 | 1202812,5,3,3,3,6,10,3,1,1,4
181 | 1203096,1,1,1,1,1,1,3,1,1,2
182 | 1204242,1,1,1,1,2,1,1,1,1,2
183 | 1204898,6,1,1,1,2,1,3,1,1,2
184 | 1205138,5,8,8,8,5,10,7,8,1,4
185 | 1205579,8,7,6,4,4,10,5,1,1,4
186 | 1206089,2,1,1,1,1,1,3,1,1,2
187 | 1206695,1,5,8,6,5,8,7,10,1,4
188 | 1206841,10,5,6,10,6,10,7,7,10,4
189 | 1207986,5,8,4,10,5,8,9,10,1,4
190 | 1208301,1,2,3,1,2,1,3,1,1,2
191 | 1210963,10,10,10,8,6,8,7,10,1,4
192 | 1211202,7,5,10,10,10,10,4,10,3,4
193 | 1212232,5,1,1,1,2,1,2,1,1,2
194 | 1212251,1,1,1,1,2,1,3,1,1,2
195 | 1212422,3,1,1,1,2,1,3,1,1,2
196 | 1212422,4,1,1,1,2,1,3,1,1,2
197 | 1213375,8,4,4,5,4,7,7,8,2,2
198 | 1213383,5,1,1,4,2,1,3,1,1,2
199 | 1214092,1,1,1,1,2,1,1,1,1,2
200 | 1214556,3,1,1,1,2,1,2,1,1,2
201 | 1214966,9,7,7,5,5,10,7,8,3,4
202 | 1216694,10,8,8,4,10,10,8,1,1,4
203 | 1216947,1,1,1,1,2,1,3,1,1,2
204 | 1217051,5,1,1,1,2,1,3,1,1,2
205 | 1217264,1,1,1,1,2,1,3,1,1,2
206 | 1218105,5,10,10,9,6,10,7,10,5,4
207 | 1218741,10,10,9,3,7,5,3,5,1,4
208 | 1218860,1,1,1,1,1,1,3,1,1,2
209 | 1218860,1,1,1,1,1,1,3,1,1,2
210 | 1219406,5,1,1,1,1,1,3,1,1,2
211 | 1219525,8,10,10,10,5,10,8,10,6,4
212 | 1219859,8,10,8,8,4,8,7,7,1,4
213 | 1220330,1,1,1,1,2,1,3,1,1,2
214 | 1221863,10,10,10,10,7,10,7,10,4,4
215 | 1222047,10,10,10,10,3,10,10,6,1,4
216 | 1222936,8,7,8,7,5,5,5,10,2,4
217 | 1223282,1,1,1,1,2,1,2,1,1,2
218 | 1223426,1,1,1,1,2,1,3,1,1,2
219 | 1223793,6,10,7,7,6,4,8,10,2,4
220 | 1223967,6,1,3,1,2,1,3,1,1,2
221 | 1224329,1,1,1,2,2,1,3,1,1,2
222 | 1225799,10,6,4,3,10,10,9,10,1,4
223 | 1226012,4,1,1,3,1,5,2,1,1,4
224 | 1226612,7,5,6,3,3,8,7,4,1,4
225 | 1227210,10,5,5,6,3,10,7,9,2,4
226 | 1227244,1,1,1,1,2,1,2,1,1,2
227 | 1227481,10,5,7,4,4,10,8,9,1,4
228 | 1228152,8,9,9,5,3,5,7,7,1,4
229 | 1228311,1,1,1,1,1,1,3,1,1,2
230 | 1230175,10,10,10,3,10,10,9,10,1,4
231 | 1230688,7,4,7,4,3,7,7,6,1,4
232 | 1231387,6,8,7,5,6,8,8,9,2,4
233 | 1231706,8,4,6,3,3,1,4,3,1,2
234 | 1232225,10,4,5,5,5,10,4,1,1,4
235 | 1236043,3,3,2,1,3,1,3,6,1,2
236 | 1241232,3,1,4,1,2,?,3,1,1,2
237 | 1241559,10,8,8,2,8,10,4,8,10,4
238 | 1241679,9,8,8,5,6,2,4,10,4,4
239 | 1242364,8,10,10,8,6,9,3,10,10,4
240 | 1243256,10,4,3,2,3,10,5,3,2,4
241 | 1270479,5,1,3,3,2,2,2,3,1,2
242 | 1276091,3,1,1,3,1,1,3,1,1,2
243 | 1277018,2,1,1,1,2,1,3,1,1,2
244 | 128059,1,1,1,1,2,5,5,1,1,2
245 | 1285531,1,1,1,1,2,1,3,1,1,2
246 | 1287775,5,1,1,2,2,2,3,1,1,2
247 | 144888,8,10,10,8,5,10,7,8,1,4
248 | 145447,8,4,4,1,2,9,3,3,1,4
249 | 167528,4,1,1,1,2,1,3,6,1,2
250 | 169356,3,1,1,1,2,?,3,1,1,2
251 | 183913,1,2,2,1,2,1,1,1,1,2
252 | 191250,10,4,4,10,2,10,5,3,3,4
253 | 1017023,6,3,3,5,3,10,3,5,3,2
254 | 1100524,6,10,10,2,8,10,7,3,3,4
255 | 1116116,9,10,10,1,10,8,3,3,1,4
256 | 1168736,5,6,6,2,4,10,3,6,1,4
257 | 1182404,3,1,1,1,2,1,1,1,1,2
258 | 1182404,3,1,1,1,2,1,2,1,1,2
259 | 1198641,3,1,1,1,2,1,3,1,1,2
260 | 242970,5,7,7,1,5,8,3,4,1,2
261 | 255644,10,5,8,10,3,10,5,1,3,4
262 | 263538,5,10,10,6,10,10,10,6,5,4
263 | 274137,8,8,9,4,5,10,7,8,1,4
264 | 303213,10,4,4,10,6,10,5,5,1,4
265 | 314428,7,9,4,10,10,3,5,3,3,4
266 | 1182404,5,1,4,1,2,1,3,2,1,2
267 | 1198641,10,10,6,3,3,10,4,3,2,4
268 | 320675,3,3,5,2,3,10,7,1,1,4
269 | 324427,10,8,8,2,3,4,8,7,8,4
270 | 385103,1,1,1,1,2,1,3,1,1,2
271 | 390840,8,4,7,1,3,10,3,9,2,4
272 | 411453,5,1,1,1,2,1,3,1,1,2
273 | 320675,3,3,5,2,3,10,7,1,1,4
274 | 428903,7,2,4,1,3,4,3,3,1,4
275 | 431495,3,1,1,1,2,1,3,2,1,2
276 | 432809,3,1,3,1,2,?,2,1,1,2
277 | 434518,3,1,1,1,2,1,2,1,1,2
278 | 452264,1,1,1,1,2,1,2,1,1,2
279 | 456282,1,1,1,1,2,1,3,1,1,2
280 | 476903,10,5,7,3,3,7,3,3,8,4
281 | 486283,3,1,1,1,2,1,3,1,1,2
282 | 486662,2,1,1,2,2,1,3,1,1,2
283 | 488173,1,4,3,10,4,10,5,6,1,4
284 | 492268,10,4,6,1,2,10,5,3,1,4
285 | 508234,7,4,5,10,2,10,3,8,2,4
286 | 527363,8,10,10,10,8,10,10,7,3,4
287 | 529329,10,10,10,10,10,10,4,10,10,4
288 | 535331,3,1,1,1,3,1,2,1,1,2
289 | 543558,6,1,3,1,4,5,5,10,1,4
290 | 555977,5,6,6,8,6,10,4,10,4,4
291 | 560680,1,1,1,1,2,1,1,1,1,2
292 | 561477,1,1,1,1,2,1,3,1,1,2
293 | 563649,8,8,8,1,2,?,6,10,1,4
294 | 601265,10,4,4,6,2,10,2,3,1,4
295 | 606140,1,1,1,1,2,?,2,1,1,2
296 | 606722,5,5,7,8,6,10,7,4,1,4
297 | 616240,5,3,4,3,4,5,4,7,1,2
298 | 61634,5,4,3,1,2,?,2,3,1,2
299 | 625201,8,2,1,1,5,1,1,1,1,2
300 | 63375,9,1,2,6,4,10,7,7,2,4
301 | 635844,8,4,10,5,4,4,7,10,1,4
302 | 636130,1,1,1,1,2,1,3,1,1,2
303 | 640744,10,10,10,7,9,10,7,10,10,4
304 | 646904,1,1,1,1,2,1,3,1,1,2
305 | 653777,8,3,4,9,3,10,3,3,1,4
306 | 659642,10,8,4,4,4,10,3,10,4,4
307 | 666090,1,1,1,1,2,1,3,1,1,2
308 | 666942,1,1,1,1,2,1,3,1,1,2
309 | 667204,7,8,7,6,4,3,8,8,4,4
310 | 673637,3,1,1,1,2,5,5,1,1,2
311 | 684955,2,1,1,1,3,1,2,1,1,2
312 | 688033,1,1,1,1,2,1,1,1,1,2
313 | 691628,8,6,4,10,10,1,3,5,1,4
314 | 693702,1,1,1,1,2,1,1,1,1,2
315 | 704097,1,1,1,1,1,1,2,1,1,2
316 | 704168,4,6,5,6,7,?,4,9,1,2
317 | 706426,5,5,5,2,5,10,4,3,1,4
318 | 709287,6,8,7,8,6,8,8,9,1,4
319 | 718641,1,1,1,1,5,1,3,1,1,2
320 | 721482,4,4,4,4,6,5,7,3,1,2
321 | 730881,7,6,3,2,5,10,7,4,6,4
322 | 733639,3,1,1,1,2,?,3,1,1,2
323 | 733639,3,1,1,1,2,1,3,1,1,2
324 | 733823,5,4,6,10,2,10,4,1,1,4
325 | 740492,1,1,1,1,2,1,3,1,1,2
326 | 743348,3,2,2,1,2,1,2,3,1,2
327 | 752904,10,1,1,1,2,10,5,4,1,4
328 | 756136,1,1,1,1,2,1,2,1,1,2
329 | 760001,8,10,3,2,6,4,3,10,1,4
330 | 760239,10,4,6,4,5,10,7,1,1,4
331 | 76389,10,4,7,2,2,8,6,1,1,4
332 | 764974,5,1,1,1,2,1,3,1,2,2
333 | 770066,5,2,2,2,2,1,2,2,1,2
334 | 785208,5,4,6,6,4,10,4,3,1,4
335 | 785615,8,6,7,3,3,10,3,4,2,4
336 | 792744,1,1,1,1,2,1,1,1,1,2
337 | 797327,6,5,5,8,4,10,3,4,1,4
338 | 798429,1,1,1,1,2,1,3,1,1,2
339 | 704097,1,1,1,1,1,1,2,1,1,2
340 | 806423,8,5,5,5,2,10,4,3,1,4
341 | 809912,10,3,3,1,2,10,7,6,1,4
342 | 810104,1,1,1,1,2,1,3,1,1,2
343 | 814265,2,1,1,1,2,1,1,1,1,2
344 | 814911,1,1,1,1,2,1,1,1,1,2
345 | 822829,7,6,4,8,10,10,9,5,3,4
346 | 826923,1,1,1,1,2,1,1,1,1,2
347 | 830690,5,2,2,2,3,1,1,3,1,2
348 | 831268,1,1,1,1,1,1,1,3,1,2
349 | 832226,3,4,4,10,5,1,3,3,1,4
350 | 832567,4,2,3,5,3,8,7,6,1,4
351 | 836433,5,1,1,3,2,1,1,1,1,2
352 | 837082,2,1,1,1,2,1,3,1,1,2
353 | 846832,3,4,5,3,7,3,4,6,1,2
354 | 850831,2,7,10,10,7,10,4,9,4,4
355 | 855524,1,1,1,1,2,1,2,1,1,2
356 | 857774,4,1,1,1,3,1,2,2,1,2
357 | 859164,5,3,3,1,3,3,3,3,3,4
358 | 859350,8,10,10,7,10,10,7,3,8,4
359 | 866325,8,10,5,3,8,4,4,10,3,4
360 | 873549,10,3,5,4,3,7,3,5,3,4
361 | 877291,6,10,10,10,10,10,8,10,10,4
362 | 877943,3,10,3,10,6,10,5,1,4,4
363 | 888169,3,2,2,1,4,3,2,1,1,2
364 | 888523,4,4,4,2,2,3,2,1,1,2
365 | 896404,2,1,1,1,2,1,3,1,1,2
366 | 897172,2,1,1,1,2,1,2,1,1,2
367 | 95719,6,10,10,10,8,10,7,10,7,4
368 | 160296,5,8,8,10,5,10,8,10,3,4
369 | 342245,1,1,3,1,2,1,1,1,1,2
370 | 428598,1,1,3,1,1,1,2,1,1,2
371 | 492561,4,3,2,1,3,1,2,1,1,2
372 | 493452,1,1,3,1,2,1,1,1,1,2
373 | 493452,4,1,2,1,2,1,2,1,1,2
374 | 521441,5,1,1,2,2,1,2,1,1,2
375 | 560680,3,1,2,1,2,1,2,1,1,2
376 | 636437,1,1,1,1,2,1,1,1,1,2
377 | 640712,1,1,1,1,2,1,2,1,1,2
378 | 654244,1,1,1,1,1,1,2,1,1,2
379 | 657753,3,1,1,4,3,1,2,2,1,2
380 | 685977,5,3,4,1,4,1,3,1,1,2
381 | 805448,1,1,1,1,2,1,1,1,1,2
382 | 846423,10,6,3,6,4,10,7,8,4,4
383 | 1002504,3,2,2,2,2,1,3,2,1,2
384 | 1022257,2,1,1,1,2,1,1,1,1,2
385 | 1026122,2,1,1,1,2,1,1,1,1,2
386 | 1071084,3,3,2,2,3,1,1,2,3,2
387 | 1080233,7,6,6,3,2,10,7,1,1,4
388 | 1114570,5,3,3,2,3,1,3,1,1,2
389 | 1114570,2,1,1,1,2,1,2,2,1,2
390 | 1116715,5,1,1,1,3,2,2,2,1,2
391 | 1131411,1,1,1,2,2,1,2,1,1,2
392 | 1151734,10,8,7,4,3,10,7,9,1,4
393 | 1156017,3,1,1,1,2,1,2,1,1,2
394 | 1158247,1,1,1,1,1,1,1,1,1,2
395 | 1158405,1,2,3,1,2,1,2,1,1,2
396 | 1168278,3,1,1,1,2,1,2,1,1,2
397 | 1176187,3,1,1,1,2,1,3,1,1,2
398 | 1196263,4,1,1,1,2,1,1,1,1,2
399 | 1196475,3,2,1,1,2,1,2,2,1,2
400 | 1206314,1,2,3,1,2,1,1,1,1,2
401 | 1211265,3,10,8,7,6,9,9,3,8,4
402 | 1213784,3,1,1,1,2,1,1,1,1,2
403 | 1223003,5,3,3,1,2,1,2,1,1,2
404 | 1223306,3,1,1,1,2,4,1,1,1,2
405 | 1223543,1,2,1,3,2,1,1,2,1,2
406 | 1229929,1,1,1,1,2,1,2,1,1,2
407 | 1231853,4,2,2,1,2,1,2,1,1,2
408 | 1234554,1,1,1,1,2,1,2,1,1,2
409 | 1236837,2,3,2,2,2,2,3,1,1,2
410 | 1237674,3,1,2,1,2,1,2,1,1,2
411 | 1238021,1,1,1,1,2,1,2,1,1,2
412 | 1238464,1,1,1,1,1,?,2,1,1,2
413 | 1238633,10,10,10,6,8,4,8,5,1,4
414 | 1238915,5,1,2,1,2,1,3,1,1,2
415 | 1238948,8,5,6,2,3,10,6,6,1,4
416 | 1239232,3,3,2,6,3,3,3,5,1,2
417 | 1239347,8,7,8,5,10,10,7,2,1,4
418 | 1239967,1,1,1,1,2,1,2,1,1,2
419 | 1240337,5,2,2,2,2,2,3,2,2,2
420 | 1253505,2,3,1,1,5,1,1,1,1,2
421 | 1255384,3,2,2,3,2,3,3,1,1,2
422 | 1257200,10,10,10,7,10,10,8,2,1,4
423 | 1257648,4,3,3,1,2,1,3,3,1,2
424 | 1257815,5,1,3,1,2,1,2,1,1,2
425 | 1257938,3,1,1,1,2,1,1,1,1,2
426 | 1258549,9,10,10,10,10,10,10,10,1,4
427 | 1258556,5,3,6,1,2,1,1,1,1,2
428 | 1266154,8,7,8,2,4,2,5,10,1,4
429 | 1272039,1,1,1,1,2,1,2,1,1,2
430 | 1276091,2,1,1,1,2,1,2,1,1,2
431 | 1276091,1,3,1,1,2,1,2,2,1,2
432 | 1276091,5,1,1,3,4,1,3,2,1,2
433 | 1277629,5,1,1,1,2,1,2,2,1,2
434 | 1293439,3,2,2,3,2,1,1,1,1,2
435 | 1293439,6,9,7,5,5,8,4,2,1,2
436 | 1294562,10,8,10,1,3,10,5,1,1,4
437 | 1295186,10,10,10,1,6,1,2,8,1,4
438 | 527337,4,1,1,1,2,1,1,1,1,2
439 | 558538,4,1,3,3,2,1,1,1,1,2
440 | 566509,5,1,1,1,2,1,1,1,1,2
441 | 608157,10,4,3,10,4,10,10,1,1,4
442 | 677910,5,2,2,4,2,4,1,1,1,2
443 | 734111,1,1,1,3,2,3,1,1,1,2
444 | 734111,1,1,1,1,2,2,1,1,1,2
445 | 780555,5,1,1,6,3,1,2,1,1,2
446 | 827627,2,1,1,1,2,1,1,1,1,2
447 | 1049837,1,1,1,1,2,1,1,1,1,2
448 | 1058849,5,1,1,1,2,1,1,1,1,2
449 | 1182404,1,1,1,1,1,1,1,1,1,2
450 | 1193544,5,7,9,8,6,10,8,10,1,4
451 | 1201870,4,1,1,3,1,1,2,1,1,2
452 | 1202253,5,1,1,1,2,1,1,1,1,2
453 | 1227081,3,1,1,3,2,1,1,1,1,2
454 | 1230994,4,5,5,8,6,10,10,7,1,4
455 | 1238410,2,3,1,1,3,1,1,1,1,2
456 | 1246562,10,2,2,1,2,6,1,1,2,4
457 | 1257470,10,6,5,8,5,10,8,6,1,4
458 | 1259008,8,8,9,6,6,3,10,10,1,4
459 | 1266124,5,1,2,1,2,1,1,1,1,2
460 | 1267898,5,1,3,1,2,1,1,1,1,2
461 | 1268313,5,1,1,3,2,1,1,1,1,2
462 | 1268804,3,1,1,1,2,5,1,1,1,2
463 | 1276091,6,1,1,3,2,1,1,1,1,2
464 | 1280258,4,1,1,1,2,1,1,2,1,2
465 | 1293966,4,1,1,1,2,1,1,1,1,2
466 | 1296572,10,9,8,7,6,4,7,10,3,4
467 | 1298416,10,6,6,2,4,10,9,7,1,4
468 | 1299596,6,6,6,5,4,10,7,6,2,4
469 | 1105524,4,1,1,1,2,1,1,1,1,2
470 | 1181685,1,1,2,1,2,1,2,1,1,2
471 | 1211594,3,1,1,1,1,1,2,1,1,2
472 | 1238777,6,1,1,3,2,1,1,1,1,2
473 | 1257608,6,1,1,1,1,1,1,1,1,2
474 | 1269574,4,1,1,1,2,1,1,1,1,2
475 | 1277145,5,1,1,1,2,1,1,1,1,2
476 | 1287282,3,1,1,1,2,1,1,1,1,2
477 | 1296025,4,1,2,1,2,1,1,1,1,2
478 | 1296263,4,1,1,1,2,1,1,1,1,2
479 | 1296593,5,2,1,1,2,1,1,1,1,2
480 | 1299161,4,8,7,10,4,10,7,5,1,4
481 | 1301945,5,1,1,1,1,1,1,1,1,2
482 | 1302428,5,3,2,4,2,1,1,1,1,2
483 | 1318169,9,10,10,10,10,5,10,10,10,4
484 | 474162,8,7,8,5,5,10,9,10,1,4
485 | 787451,5,1,2,1,2,1,1,1,1,2
486 | 1002025,1,1,1,3,1,3,1,1,1,2
487 | 1070522,3,1,1,1,1,1,2,1,1,2
488 | 1073960,10,10,10,10,6,10,8,1,5,4
489 | 1076352,3,6,4,10,3,3,3,4,1,4
490 | 1084139,6,3,2,1,3,4,4,1,1,4
491 | 1115293,1,1,1,1,2,1,1,1,1,2
492 | 1119189,5,8,9,4,3,10,7,1,1,4
493 | 1133991,4,1,1,1,1,1,2,1,1,2
494 | 1142706,5,10,10,10,6,10,6,5,2,4
495 | 1155967,5,1,2,10,4,5,2,1,1,2
496 | 1170945,3,1,1,1,1,1,2,1,1,2
497 | 1181567,1,1,1,1,1,1,1,1,1,2
498 | 1182404,4,2,1,1,2,1,1,1,1,2
499 | 1204558,4,1,1,1,2,1,2,1,1,2
500 | 1217952,4,1,1,1,2,1,2,1,1,2
501 | 1224565,6,1,1,1,2,1,3,1,1,2
502 | 1238186,4,1,1,1,2,1,2,1,1,2
503 | 1253917,4,1,1,2,2,1,2,1,1,2
504 | 1265899,4,1,1,1,2,1,3,1,1,2
505 | 1268766,1,1,1,1,2,1,1,1,1,2
506 | 1277268,3,3,1,1,2,1,1,1,1,2
507 | 1286943,8,10,10,10,7,5,4,8,7,4
508 | 1295508,1,1,1,1,2,4,1,1,1,2
509 | 1297327,5,1,1,1,2,1,1,1,1,2
510 | 1297522,2,1,1,1,2,1,1,1,1,2
511 | 1298360,1,1,1,1,2,1,1,1,1,2
512 | 1299924,5,1,1,1,2,1,2,1,1,2
513 | 1299994,5,1,1,1,2,1,1,1,1,2
514 | 1304595,3,1,1,1,1,1,2,1,1,2
515 | 1306282,6,6,7,10,3,10,8,10,2,4
516 | 1313325,4,10,4,7,3,10,9,10,1,4
517 | 1320077,1,1,1,1,1,1,1,1,1,2
518 | 1320077,1,1,1,1,1,1,2,1,1,2
519 | 1320304,3,1,2,2,2,1,1,1,1,2
520 | 1330439,4,7,8,3,4,10,9,1,1,4
521 | 333093,1,1,1,1,3,1,1,1,1,2
522 | 369565,4,1,1,1,3,1,1,1,1,2
523 | 412300,10,4,5,4,3,5,7,3,1,4
524 | 672113,7,5,6,10,4,10,5,3,1,4
525 | 749653,3,1,1,1,2,1,2,1,1,2
526 | 769612,3,1,1,2,2,1,1,1,1,2
527 | 769612,4,1,1,1,2,1,1,1,1,2
528 | 798429,4,1,1,1,2,1,3,1,1,2
529 | 807657,6,1,3,2,2,1,1,1,1,2
530 | 8233704,4,1,1,1,1,1,2,1,1,2
531 | 837480,7,4,4,3,4,10,6,9,1,4
532 | 867392,4,2,2,1,2,1,2,1,1,2
533 | 869828,1,1,1,1,1,1,3,1,1,2
534 | 1043068,3,1,1,1,2,1,2,1,1,2
535 | 1056171,2,1,1,1,2,1,2,1,1,2
536 | 1061990,1,1,3,2,2,1,3,1,1,2
537 | 1113061,5,1,1,1,2,1,3,1,1,2
538 | 1116192,5,1,2,1,2,1,3,1,1,2
539 | 1135090,4,1,1,1,2,1,2,1,1,2
540 | 1145420,6,1,1,1,2,1,2,1,1,2
541 | 1158157,5,1,1,1,2,2,2,1,1,2
542 | 1171578,3,1,1,1,2,1,1,1,1,2
543 | 1174841,5,3,1,1,2,1,1,1,1,2
544 | 1184586,4,1,1,1,2,1,2,1,1,2
545 | 1186936,2,1,3,2,2,1,2,1,1,2
546 | 1197527,5,1,1,1,2,1,2,1,1,2
547 | 1222464,6,10,10,10,4,10,7,10,1,4
548 | 1240603,2,1,1,1,1,1,1,1,1,2
549 | 1240603,3,1,1,1,1,1,1,1,1,2
550 | 1241035,7,8,3,7,4,5,7,8,2,4
551 | 1287971,3,1,1,1,2,1,2,1,1,2
552 | 1289391,1,1,1,1,2,1,3,1,1,2
553 | 1299924,3,2,2,2,2,1,4,2,1,2
554 | 1306339,4,4,2,1,2,5,2,1,2,2
555 | 1313658,3,1,1,1,2,1,1,1,1,2
556 | 1313982,4,3,1,1,2,1,4,8,1,2
557 | 1321264,5,2,2,2,1,1,2,1,1,2
558 | 1321321,5,1,1,3,2,1,1,1,1,2
559 | 1321348,2,1,1,1,2,1,2,1,1,2
560 | 1321931,5,1,1,1,2,1,2,1,1,2
561 | 1321942,5,1,1,1,2,1,3,1,1,2
562 | 1321942,5,1,1,1,2,1,3,1,1,2
563 | 1328331,1,1,1,1,2,1,3,1,1,2
564 | 1328755,3,1,1,1,2,1,2,1,1,2
565 | 1331405,4,1,1,1,2,1,3,2,1,2
566 | 1331412,5,7,10,10,5,10,10,10,1,4
567 | 1333104,3,1,2,1,2,1,3,1,1,2
568 | 1334071,4,1,1,1,2,3,2,1,1,2
569 | 1343068,8,4,4,1,6,10,2,5,2,4
570 | 1343374,10,10,8,10,6,5,10,3,1,4
571 | 1344121,8,10,4,4,8,10,8,2,1,4
572 | 142932,7,6,10,5,3,10,9,10,2,4
573 | 183936,3,1,1,1,2,1,2,1,1,2
574 | 324382,1,1,1,1,2,1,2,1,1,2
575 | 378275,10,9,7,3,4,2,7,7,1,4
576 | 385103,5,1,2,1,2,1,3,1,1,2
577 | 690557,5,1,1,1,2,1,2,1,1,2
578 | 695091,1,1,1,1,2,1,2,1,1,2
579 | 695219,1,1,1,1,2,1,2,1,1,2
580 | 824249,1,1,1,1,2,1,3,1,1,2
581 | 871549,5,1,2,1,2,1,2,1,1,2
582 | 878358,5,7,10,6,5,10,7,5,1,4
583 | 1107684,6,10,5,5,4,10,6,10,1,4
584 | 1115762,3,1,1,1,2,1,1,1,1,2
585 | 1217717,5,1,1,6,3,1,1,1,1,2
586 | 1239420,1,1,1,1,2,1,1,1,1,2
587 | 1254538,8,10,10,10,6,10,10,10,1,4
588 | 1261751,5,1,1,1,2,1,2,2,1,2
589 | 1268275,9,8,8,9,6,3,4,1,1,4
590 | 1272166,5,1,1,1,2,1,1,1,1,2
591 | 1294261,4,10,8,5,4,1,10,1,1,4
592 | 1295529,2,5,7,6,4,10,7,6,1,4
593 | 1298484,10,3,4,5,3,10,4,1,1,4
594 | 1311875,5,1,2,1,2,1,1,1,1,2
595 | 1315506,4,8,6,3,4,10,7,1,1,4
596 | 1320141,5,1,1,1,2,1,2,1,1,2
597 | 1325309,4,1,2,1,2,1,2,1,1,2
598 | 1333063,5,1,3,1,2,1,3,1,1,2
599 | 1333495,3,1,1,1,2,1,2,1,1,2
600 | 1334659,5,2,4,1,1,1,1,1,1,2
601 | 1336798,3,1,1,1,2,1,2,1,1,2
602 | 1344449,1,1,1,1,1,1,2,1,1,2
603 | 1350568,4,1,1,1,2,1,2,1,1,2
604 | 1352663,5,4,6,8,4,1,8,10,1,4
605 | 188336,5,3,2,8,5,10,8,1,2,4
606 | 352431,10,5,10,3,5,8,7,8,3,4
607 | 353098,4,1,1,2,2,1,1,1,1,2
608 | 411453,1,1,1,1,2,1,1,1,1,2
609 | 557583,5,10,10,10,10,10,10,1,1,4
610 | 636375,5,1,1,1,2,1,1,1,1,2
611 | 736150,10,4,3,10,3,10,7,1,2,4
612 | 803531,5,10,10,10,5,2,8,5,1,4
613 | 822829,8,10,10,10,6,10,10,10,10,4
614 | 1016634,2,3,1,1,2,1,2,1,1,2
615 | 1031608,2,1,1,1,1,1,2,1,1,2
616 | 1041043,4,1,3,1,2,1,2,1,1,2
617 | 1042252,3,1,1,1,2,1,2,1,1,2
618 | 1057067,1,1,1,1,1,?,1,1,1,2
619 | 1061990,4,1,1,1,2,1,2,1,1,2
620 | 1073836,5,1,1,1,2,1,2,1,1,2
621 | 1083817,3,1,1,1,2,1,2,1,1,2
622 | 1096352,6,3,3,3,3,2,6,1,1,2
623 | 1140597,7,1,2,3,2,1,2,1,1,2
624 | 1149548,1,1,1,1,2,1,1,1,1,2
625 | 1174009,5,1,1,2,1,1,2,1,1,2
626 | 1183596,3,1,3,1,3,4,1,1,1,2
627 | 1190386,4,6,6,5,7,6,7,7,3,4
628 | 1190546,2,1,1,1,2,5,1,1,1,2
629 | 1213273,2,1,1,1,2,1,1,1,1,2
630 | 1218982,4,1,1,1,2,1,1,1,1,2
631 | 1225382,6,2,3,1,2,1,1,1,1,2
632 | 1235807,5,1,1,1,2,1,2,1,1,2
633 | 1238777,1,1,1,1,2,1,1,1,1,2
634 | 1253955,8,7,4,4,5,3,5,10,1,4
635 | 1257366,3,1,1,1,2,1,1,1,1,2
636 | 1260659,3,1,4,1,2,1,1,1,1,2
637 | 1268952,10,10,7,8,7,1,10,10,3,4
638 | 1275807,4,2,4,3,2,2,2,1,1,2
639 | 1277792,4,1,1,1,2,1,1,1,1,2
640 | 1277792,5,1,1,3,2,1,1,1,1,2
641 | 1285722,4,1,1,3,2,1,1,1,1,2
642 | 1288608,3,1,1,1,2,1,2,1,1,2
643 | 1290203,3,1,1,1,2,1,2,1,1,2
644 | 1294413,1,1,1,1,2,1,1,1,1,2
645 | 1299596,2,1,1,1,2,1,1,1,1,2
646 | 1303489,3,1,1,1,2,1,2,1,1,2
647 | 1311033,1,2,2,1,2,1,1,1,1,2
648 | 1311108,1,1,1,3,2,1,1,1,1,2
649 | 1315807,5,10,10,10,10,2,10,10,10,4
650 | 1318671,3,1,1,1,2,1,2,1,1,2
651 | 1319609,3,1,1,2,3,4,1,1,1,2
652 | 1323477,1,2,1,3,2,1,2,1,1,2
653 | 1324572,5,1,1,1,2,1,2,2,1,2
654 | 1324681,4,1,1,1,2,1,2,1,1,2
655 | 1325159,3,1,1,1,2,1,3,1,1,2
656 | 1326892,3,1,1,1,2,1,2,1,1,2
657 | 1330361,5,1,1,1,2,1,2,1,1,2
658 | 1333877,5,4,5,1,8,1,3,6,1,2
659 | 1334015,7,8,8,7,3,10,7,2,3,4
660 | 1334667,1,1,1,1,2,1,1,1,1,2
661 | 1339781,1,1,1,1,2,1,2,1,1,2
662 | 1339781,4,1,1,1,2,1,3,1,1,2
663 | 13454352,1,1,3,1,2,1,2,1,1,2
664 | 1345452,1,1,3,1,2,1,2,1,1,2
665 | 1345593,3,1,1,3,2,1,2,1,1,2
666 | 1347749,1,1,1,1,2,1,1,1,1,2
667 | 1347943,5,2,2,2,2,1,1,1,2,2
668 | 1348851,3,1,1,1,2,1,3,1,1,2
669 | 1350319,5,7,4,1,6,1,7,10,3,4
670 | 1350423,5,10,10,8,5,5,7,10,1,4
671 | 1352848,3,10,7,8,5,8,7,4,1,4
672 | 1353092,3,2,1,2,2,1,3,1,1,2
673 | 1354840,2,1,1,1,2,1,3,1,1,2
674 | 1354840,5,3,2,1,3,1,1,1,1,2
675 | 1355260,1,1,1,1,2,1,2,1,1,2
676 | 1365075,4,1,4,1,2,1,1,1,1,2
677 | 1365328,1,1,2,1,2,1,2,1,1,2
678 | 1368267,5,1,1,1,2,1,1,1,1,2
679 | 1368273,1,1,1,1,2,1,1,1,1,2
680 | 1368882,2,1,1,1,2,1,1,1,1,2
681 | 1369821,10,10,10,10,5,10,10,10,7,4
682 | 1371026,5,10,10,10,4,10,5,6,3,4
683 | 1371920,5,1,1,1,2,1,3,2,1,2
684 | 466906,1,1,1,1,2,1,1,1,1,2
685 | 466906,1,1,1,1,2,1,1,1,1,2
686 | 534555,1,1,1,1,2,1,1,1,1,2
687 | 536708,1,1,1,1,2,1,1,1,1,2
688 | 566346,3,1,1,1,2,1,2,3,1,2
689 | 603148,4,1,1,1,2,1,1,1,1,2
690 | 654546,1,1,1,1,2,1,1,1,8,2
691 | 654546,1,1,1,3,2,1,1,1,1,2
692 | 695091,5,10,10,5,4,5,4,4,1,4
693 | 714039,3,1,1,1,2,1,1,1,1,2
694 | 763235,3,1,1,1,2,1,2,1,2,2
695 | 776715,3,1,1,1,3,2,1,1,1,2
696 | 841769,2,1,1,1,2,1,1,1,1,2
697 | 888820,5,10,10,3,7,3,8,10,2,4
698 | 897471,4,8,6,4,3,4,10,6,1,4
699 | 897471,4,8,8,5,4,5,10,4,1,4
700 |
--------------------------------------------------------------------------------
/recommender/netflix-demo.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Netflix Movie Recommendation\n",
8 | "* Notebook: https://www.kaggle.com/laowingkin/netflix-movie-recommendation\n",
9 | "* Data: https://www.kaggle.com/netflix-inc/netflix-prize-data?select=qualifying.txt"
10 | ]
11 | },
12 | {
13 | "cell_type": "code",
14 | "execution_count": 1,
15 | "metadata": {},
16 | "outputs": [],
17 | "source": [
18 | "import pandas as pd\n",
19 | "import numpy as np\n",
20 | "import math\n",
21 | "import re\n",
22 | "from scipy.sparse import csr_matrix\n",
23 | "import matplotlib.pyplot as plt\n",
24 | "import seaborn as sns\n",
25 | "from surprise import Reader, Dataset, SVD\n",
26 | "\n",
27 | "'''\n",
28 | "According to the documentation, the evaluate() method \n",
29 | "was deprecated in version 1.0.5 (functionally replaced \n",
30 | "by model_selection.cross_validate()) and was removed in version 1.1.0, \n",
31 | "which is likely what you have installed.\n",
32 | "'''\n",
33 | "# from surprise import evaluate \n",
34 | "from surprise.model_selection.validation import cross_validate\n",
35 | "\n",
36 | "sns.set_style(\"darkgrid\")"
37 | ]
38 | },
39 | {
40 | "cell_type": "code",
41 | "execution_count": 2,
42 | "metadata": {},
43 | "outputs": [],
44 | "source": [
45 | "def readFile(file_path, rows=100000):\n",
46 | " data_dict = {'Cust_Id' : [], 'Movie_Id' : [], 'Rating' : [], 'Date' : []}\n",
47 | " f = open(file_path, \"r\")\n",
48 | " count = 0\n",
49 | " for line in f:\n",
50 | " count += 1\n",
51 | " if count > rows:\n",
52 | " break\n",
53 | " \n",
54 | " if ':' in line:\n",
55 | " movidId = line[:-2] # remove the last character ':'\n",
56 | " movieId = int(movidId)\n",
57 | " else:\n",
58 | " customerID, rating, date = line.split(',')\n",
59 | " data_dict['Cust_Id'].append(customerID)\n",
60 | " data_dict['Movie_Id'].append(movieId)\n",
61 | " data_dict['Rating'].append(rating)\n",
62 | " data_dict['Date'].append(date.rstrip(\"\\n\"))\n",
63 | " f.close()\n",
64 | " \n",
65 | " return pd.DataFrame(data_dict)"
66 | ]
67 | },
68 | {
69 | "cell_type": "code",
70 | "execution_count": 3,
71 | "metadata": {},
72 | "outputs": [],
73 | "source": [
74 | "df1 = readFile('./data/netflix/combined_data_1.txt', rows=100000)\n",
75 | "df2 = readFile('./data/netflix/combined_data_2.txt', rows=100000)\n",
76 | "df3 = readFile('./data/netflix/combined_data_3.txt', rows=100000)\n",
77 | "df4 = readFile('./data/netflix/combined_data_4.txt', rows=100000)"
78 | ]
79 | },
80 | {
81 | "cell_type": "code",
82 | "execution_count": 4,
83 | "metadata": {},
84 | "outputs": [
85 | {
86 | "data": {
87 | "text/html": [
88 | "\n",
89 | "\n",
102 | "
\n",
103 | " \n",
104 | " \n",
105 | " | \n",
106 | " Cust_Id | \n",
107 | " Movie_Id | \n",
108 | " Rating | \n",
109 | " Date | \n",
110 | "
\n",
111 | " \n",
112 | " \n",
113 | " \n",
114 | " | 0 | \n",
115 | " 1488844 | \n",
116 | " 1 | \n",
117 | " 3 | \n",
118 | " 2005-09-06 | \n",
119 | "
\n",
120 | " \n",
121 | " | 1 | \n",
122 | " 822109 | \n",
123 | " 1 | \n",
124 | " 5 | \n",
125 | " 2005-05-13 | \n",
126 | "
\n",
127 | " \n",
128 | " | 2 | \n",
129 | " 885013 | \n",
130 | " 1 | \n",
131 | " 4 | \n",
132 | " 2005-10-19 | \n",
133 | "
\n",
134 | " \n",
135 | " | 3 | \n",
136 | " 30878 | \n",
137 | " 1 | \n",
138 | " 4 | \n",
139 | " 2005-12-26 | \n",
140 | "
\n",
141 | " \n",
142 | " | 4 | \n",
143 | " 823519 | \n",
144 | " 1 | \n",
145 | " 3 | \n",
146 | " 2004-05-03 | \n",
147 | "
\n",
148 | " \n",
149 | "
\n",
150 | "
"
151 | ],
152 | "text/plain": [
153 | " Cust_Id Movie_Id Rating Date\n",
154 | "0 1488844 1 3 2005-09-06\n",
155 | "1 822109 1 5 2005-05-13\n",
156 | "2 885013 1 4 2005-10-19\n",
157 | "3 30878 1 4 2005-12-26\n",
158 | "4 823519 1 3 2004-05-03"
159 | ]
160 | },
161 | "execution_count": 4,
162 | "metadata": {},
163 | "output_type": "execute_result"
164 | }
165 | ],
166 | "source": [
167 | "df1.head()"
168 | ]
169 | },
170 | {
171 | "cell_type": "code",
172 | "execution_count": 5,
173 | "metadata": {},
174 | "outputs": [
175 | {
176 | "data": {
177 | "text/html": [
178 | "\n",
179 | "\n",
192 | "
\n",
193 | " \n",
194 | " \n",
195 | " | \n",
196 | " Cust_Id | \n",
197 | " Movie_Id | \n",
198 | " Rating | \n",
199 | " Date | \n",
200 | "
\n",
201 | " \n",
202 | " \n",
203 | " \n",
204 | " | 0 | \n",
205 | " 2532865 | \n",
206 | " 4500 | \n",
207 | " 4 | \n",
208 | " 2005-07-26 | \n",
209 | "
\n",
210 | " \n",
211 | " | 1 | \n",
212 | " 573364 | \n",
213 | " 4500 | \n",
214 | " 3 | \n",
215 | " 2005-06-20 | \n",
216 | "
\n",
217 | " \n",
218 | " | 2 | \n",
219 | " 1696725 | \n",
220 | " 4500 | \n",
221 | " 3 | \n",
222 | " 2004-02-27 | \n",
223 | "
\n",
224 | " \n",
225 | " | 3 | \n",
226 | " 1253431 | \n",
227 | " 4500 | \n",
228 | " 3 | \n",
229 | " 2004-03-31 | \n",
230 | "
\n",
231 | " \n",
232 | " | 4 | \n",
233 | " 1265574 | \n",
234 | " 4500 | \n",
235 | " 2 | \n",
236 | " 2003-09-01 | \n",
237 | "
\n",
238 | " \n",
239 | "
\n",
240 | "
"
241 | ],
242 | "text/plain": [
243 | " Cust_Id Movie_Id Rating Date\n",
244 | "0 2532865 4500 4 2005-07-26\n",
245 | "1 573364 4500 3 2005-06-20\n",
246 | "2 1696725 4500 3 2004-02-27\n",
247 | "3 1253431 4500 3 2004-03-31\n",
248 | "4 1265574 4500 2 2003-09-01"
249 | ]
250 | },
251 | "execution_count": 5,
252 | "metadata": {},
253 | "output_type": "execute_result"
254 | }
255 | ],
256 | "source": [
257 | "df2.head()"
258 | ]
259 | },
260 | {
261 | "cell_type": "code",
262 | "execution_count": 6,
263 | "metadata": {},
264 | "outputs": [
265 | {
266 | "data": {
267 | "text/html": [
268 | "\n",
269 | "\n",
282 | "
\n",
283 | " \n",
284 | " \n",
285 | " | \n",
286 | " Cust_Id | \n",
287 | " Movie_Id | \n",
288 | " Rating | \n",
289 | " Date | \n",
290 | "
\n",
291 | " \n",
292 | " \n",
293 | " \n",
294 | " | 0 | \n",
295 | " 1277134 | \n",
296 | " 9211 | \n",
297 | " 1 | \n",
298 | " 2003-12-02 | \n",
299 | "
\n",
300 | " \n",
301 | " | 1 | \n",
302 | " 2435457 | \n",
303 | " 9211 | \n",
304 | " 2 | \n",
305 | " 2005-06-01 | \n",
306 | "
\n",
307 | " \n",
308 | " | 2 | \n",
309 | " 2338545 | \n",
310 | " 9211 | \n",
311 | " 3 | \n",
312 | " 2001-02-17 | \n",
313 | "
\n",
314 | " \n",
315 | " | 3 | \n",
316 | " 2218269 | \n",
317 | " 9211 | \n",
318 | " 1 | \n",
319 | " 2002-12-27 | \n",
320 | "
\n",
321 | " \n",
322 | " | 4 | \n",
323 | " 441153 | \n",
324 | " 9211 | \n",
325 | " 4 | \n",
326 | " 2002-10-11 | \n",
327 | "
\n",
328 | " \n",
329 | "
\n",
330 | "
"
331 | ],
332 | "text/plain": [
333 | " Cust_Id Movie_Id Rating Date\n",
334 | "0 1277134 9211 1 2003-12-02\n",
335 | "1 2435457 9211 2 2005-06-01\n",
336 | "2 2338545 9211 3 2001-02-17\n",
337 | "3 2218269 9211 1 2002-12-27\n",
338 | "4 441153 9211 4 2002-10-11"
339 | ]
340 | },
341 | "execution_count": 6,
342 | "metadata": {},
343 | "output_type": "execute_result"
344 | }
345 | ],
346 | "source": [
347 | "df3.head()"
348 | ]
349 | },
350 | {
351 | "cell_type": "code",
352 | "execution_count": 7,
353 | "metadata": {},
354 | "outputs": [
355 | {
356 | "data": {
357 | "text/html": [
358 | "\n",
359 | "\n",
372 | "
\n",
373 | " \n",
374 | " \n",
375 | " | \n",
376 | " Cust_Id | \n",
377 | " Movie_Id | \n",
378 | " Rating | \n",
379 | " Date | \n",
380 | "
\n",
381 | " \n",
382 | " \n",
383 | " \n",
384 | " | 0 | \n",
385 | " 2385003 | \n",
386 | " 13368 | \n",
387 | " 4 | \n",
388 | " 2004-07-08 | \n",
389 | "
\n",
390 | " \n",
391 | " | 1 | \n",
392 | " 659432 | \n",
393 | " 13368 | \n",
394 | " 3 | \n",
395 | " 2005-03-16 | \n",
396 | "
\n",
397 | " \n",
398 | " | 2 | \n",
399 | " 751812 | \n",
400 | " 13368 | \n",
401 | " 2 | \n",
402 | " 2002-12-16 | \n",
403 | "
\n",
404 | " \n",
405 | " | 3 | \n",
406 | " 2625420 | \n",
407 | " 13368 | \n",
408 | " 2 | \n",
409 | " 2004-05-25 | \n",
410 | "
\n",
411 | " \n",
412 | " | 4 | \n",
413 | " 1650301 | \n",
414 | " 13368 | \n",
415 | " 1 | \n",
416 | " 2005-08-30 | \n",
417 | "
\n",
418 | " \n",
419 | "
\n",
420 | "
"
421 | ],
422 | "text/plain": [
423 | " Cust_Id Movie_Id Rating Date\n",
424 | "0 2385003 13368 4 2004-07-08\n",
425 | "1 659432 13368 3 2005-03-16\n",
426 | "2 751812 13368 2 2002-12-16\n",
427 | "3 2625420 13368 2 2004-05-25\n",
428 | "4 1650301 13368 1 2005-08-30"
429 | ]
430 | },
431 | "execution_count": 7,
432 | "metadata": {},
433 | "output_type": "execute_result"
434 | }
435 | ],
436 | "source": [
437 | "df4.head()"
438 | ]
439 | },
440 | {
441 | "cell_type": "code",
442 | "execution_count": 8,
443 | "metadata": {},
444 | "outputs": [],
445 | "source": [
446 | "df1['Rating'] = df1['Rating'].astype(float)\n",
447 | "df2['Rating'] = df2['Rating'].astype(float)\n",
448 | "df3['Rating'] = df3['Rating'].astype(float)\n",
449 | "df4['Rating'] = df4['Rating'].astype(float)"
450 | ]
451 | },
452 | {
453 | "cell_type": "code",
454 | "execution_count": 9,
455 | "metadata": {},
456 | "outputs": [
457 | {
458 | "data": {
459 | "text/plain": [
460 | "(399899, 4)"
461 | ]
462 | },
463 | "execution_count": 9,
464 | "metadata": {},
465 | "output_type": "execute_result"
466 | }
467 | ],
468 | "source": [
469 | "df = df1.copy()\n",
470 | "df = df.append(df2)\n",
471 | "df = df.append(df3)\n",
472 | "df = df.append(df4)\n",
473 | "\n",
474 | "df.index = np.arange(0,len(df))\n",
475 | "df.shape"
476 | ]
477 | },
478 | {
479 | "cell_type": "code",
480 | "execution_count": 10,
481 | "metadata": {},
482 | "outputs": [
483 | {
484 | "data": {
485 | "text/html": [
486 | "\n",
487 | "\n",
500 | "
\n",
501 | " \n",
502 | " \n",
503 | " | \n",
504 | " Cust_Id | \n",
505 | " Movie_Id | \n",
506 | " Rating | \n",
507 | " Date | \n",
508 | "
\n",
509 | " \n",
510 | " \n",
511 | " \n",
512 | " | 0 | \n",
513 | " 1488844 | \n",
514 | " 1 | \n",
515 | " 3.0 | \n",
516 | " 2005-09-06 | \n",
517 | "
\n",
518 | " \n",
519 | " | 1 | \n",
520 | " 822109 | \n",
521 | " 1 | \n",
522 | " 5.0 | \n",
523 | " 2005-05-13 | \n",
524 | "
\n",
525 | " \n",
526 | " | 2 | \n",
527 | " 885013 | \n",
528 | " 1 | \n",
529 | " 4.0 | \n",
530 | " 2005-10-19 | \n",
531 | "
\n",
532 | " \n",
533 | " | 3 | \n",
534 | " 30878 | \n",
535 | " 1 | \n",
536 | " 4.0 | \n",
537 | " 2005-12-26 | \n",
538 | "
\n",
539 | " \n",
540 | " | 4 | \n",
541 | " 823519 | \n",
542 | " 1 | \n",
543 | " 3.0 | \n",
544 | " 2004-05-03 | \n",
545 | "
\n",
546 | " \n",
547 | " | 5 | \n",
548 | " 893988 | \n",
549 | " 1 | \n",
550 | " 3.0 | \n",
551 | " 2005-11-17 | \n",
552 | "
\n",
553 | " \n",
554 | " | 6 | \n",
555 | " 124105 | \n",
556 | " 1 | \n",
557 | " 4.0 | \n",
558 | " 2004-08-05 | \n",
559 | "
\n",
560 | " \n",
561 | " | 7 | \n",
562 | " 1248029 | \n",
563 | " 1 | \n",
564 | " 3.0 | \n",
565 | " 2004-04-22 | \n",
566 | "
\n",
567 | " \n",
568 | " | 8 | \n",
569 | " 1842128 | \n",
570 | " 1 | \n",
571 | " 4.0 | \n",
572 | " 2004-05-09 | \n",
573 | "
\n",
574 | " \n",
575 | " | 9 | \n",
576 | " 2238063 | \n",
577 | " 1 | \n",
578 | " 3.0 | \n",
579 | " 2005-05-11 | \n",
580 | "
\n",
581 | " \n",
582 | "
\n",
583 | "
"
584 | ],
585 | "text/plain": [
586 | " Cust_Id Movie_Id Rating Date\n",
587 | "0 1488844 1 3.0 2005-09-06\n",
588 | "1 822109 1 5.0 2005-05-13\n",
589 | "2 885013 1 4.0 2005-10-19\n",
590 | "3 30878 1 4.0 2005-12-26\n",
591 | "4 823519 1 3.0 2004-05-03\n",
592 | "5 893988 1 3.0 2005-11-17\n",
593 | "6 124105 1 4.0 2004-08-05\n",
594 | "7 1248029 1 3.0 2004-04-22\n",
595 | "8 1842128 1 4.0 2004-05-09\n",
596 | "9 2238063 1 3.0 2005-05-11"
597 | ]
598 | },
599 | "execution_count": 10,
600 | "metadata": {},
601 | "output_type": "execute_result"
602 | }
603 | ],
604 | "source": [
605 | "df.head(10)"
606 | ]
607 | },
608 | {
609 | "cell_type": "code",
610 | "execution_count": 11,
611 | "metadata": {},
612 | "outputs": [
613 | {
614 | "data": {
615 | "text/plain": [
616 | "28 39752\n",
617 | "13384 37884\n",
618 | "4506 33731\n",
619 | "4520 26500\n",
620 | "9235 20214\n",
621 | " ... \n",
622 | "9221 105\n",
623 | "4502 104\n",
624 | "9 95\n",
625 | "7 93\n",
626 | "9227 88\n",
627 | "Name: Movie_Id, Length: 101, dtype: int64"
628 | ]
629 | },
630 | "execution_count": 11,
631 | "metadata": {},
632 | "output_type": "execute_result"
633 | }
634 | ],
635 | "source": [
636 | "df['Movie_Id'].value_counts()"
637 | ]
638 | },
639 | {
640 | "cell_type": "code",
641 | "execution_count": 18,
642 | "metadata": {},
643 | "outputs": [
644 | {
645 | "data": {
646 | "text/html": [
647 | "\n",
648 | "\n",
661 | "
\n",
662 | " \n",
663 | " \n",
664 | " | \n",
665 | " Movie_Id | \n",
666 | " Year | \n",
667 | " Name | \n",
668 | "
\n",
669 | " \n",
670 | " \n",
671 | " \n",
672 | " | 0 | \n",
673 | " 1 | \n",
674 | " 2003.0 | \n",
675 | " Dinosaur Planet | \n",
676 | "
\n",
677 | " \n",
678 | " | 1 | \n",
679 | " 2 | \n",
680 | " 2004.0 | \n",
681 | " Isle of Man TT 2004 Review | \n",
682 | "
\n",
683 | " \n",
684 | " | 2 | \n",
685 | " 3 | \n",
686 | " 1997.0 | \n",
687 | " Character | \n",
688 | "
\n",
689 | " \n",
690 | " | 3 | \n",
691 | " 4 | \n",
692 | " 1994.0 | \n",
693 | " Paula Abdul's Get Up & Dance | \n",
694 | "
\n",
695 | " \n",
696 | " | 4 | \n",
697 | " 5 | \n",
698 | " 2004.0 | \n",
699 | " The Rise and Fall of ECW | \n",
700 | "
\n",
701 | " \n",
702 | " | 5 | \n",
703 | " 6 | \n",
704 | " 1997.0 | \n",
705 | " Sick | \n",
706 | "
\n",
707 | " \n",
708 | " | 6 | \n",
709 | " 7 | \n",
710 | " 1992.0 | \n",
711 | " 8 Man | \n",
712 | "
\n",
713 | " \n",
714 | " | 7 | \n",
715 | " 8 | \n",
716 | " 2004.0 | \n",
717 | " What the #$*! Do We Know!? | \n",
718 | "
\n",
719 | " \n",
720 | " | 8 | \n",
721 | " 9 | \n",
722 | " 1991.0 | \n",
723 | " Class of Nuke 'Em High 2 | \n",
724 | "
\n",
725 | " \n",
726 | " | 9 | \n",
727 | " 10 | \n",
728 | " 2001.0 | \n",
729 | " Fighter | \n",
730 | "
\n",
731 | " \n",
732 | "
\n",
733 | "
"
734 | ],
735 | "text/plain": [
736 | " Movie_Id Year Name\n",
737 | "0 1 2003.0 Dinosaur Planet\n",
738 | "1 2 2004.0 Isle of Man TT 2004 Review\n",
739 | "2 3 1997.0 Character\n",
740 | "3 4 1994.0 Paula Abdul's Get Up & Dance\n",
741 | "4 5 2004.0 The Rise and Fall of ECW\n",
742 | "5 6 1997.0 Sick\n",
743 | "6 7 1992.0 8 Man\n",
744 | "7 8 2004.0 What the #$*! Do We Know!?\n",
745 | "8 9 1991.0 Class of Nuke 'Em High 2\n",
746 | "9 10 2001.0 Fighter"
747 | ]
748 | },
749 | "execution_count": 18,
750 | "metadata": {},
751 | "output_type": "execute_result"
752 | }
753 | ],
754 | "source": [
755 | "df_title = pd.read_csv('./data/netflix/movie_titles.csv', encoding = \"ISO-8859-1\", header = None, names = ['Movie_Id', 'Year', 'Name'])\n",
756 | "df_title.head(10)"
757 | ]
758 | },
759 | {
760 | "cell_type": "code",
761 | "execution_count": 13,
762 | "metadata": {},
763 | "outputs": [
764 | {
765 | "name": "stdout",
766 | "output_type": "stream",
767 | "text": [
768 | "Evaluating RMSE, MAE of algorithm SVD on 5 split(s).\n",
769 | "\n",
770 | " Fold 1 Fold 2 Fold 3 Fold 4 Fold 5 Mean Std \n",
771 | "RMSE (testset) 1.0186 1.0161 1.0157 1.0136 1.0190 1.0166 0.0020 \n",
772 | "MAE (testset) 0.8120 0.8077 0.8083 0.8058 0.8083 0.8084 0.0020 \n",
773 | "Fit time 16.85 15.99 15.30 15.41 15.17 15.74 0.62 \n",
774 | "Test time 0.66 0.67 0.65 0.67 0.65 0.66 0.01 \n"
775 | ]
776 | },
777 | {
778 | "data": {
779 | "text/plain": [
780 | "{'test_rmse': array([1.01858453, 1.01612624, 1.01568493, 1.0136429 , 1.01899016]),\n",
781 | " 'test_mae': array([0.81203629, 0.80771617, 0.80829617, 0.80582657, 0.80827487]),\n",
782 | " 'fit_time': (16.84959387779236,\n",
783 | " 15.994084119796753,\n",
784 | " 15.30280089378357,\n",
785 | " 15.407926082611084,\n",
786 | " 15.16874074935913),\n",
787 | " 'test_time': (0.657844066619873,\n",
788 | " 0.6682610511779785,\n",
789 | " 0.6464948654174805,\n",
790 | " 0.6709449291229248,\n",
791 | " 0.6467597484588623)}"
792 | ]
793 | },
794 | "execution_count": 13,
795 | "metadata": {},
796 | "output_type": "execute_result"
797 | }
798 | ],
799 | "source": [
800 | "reader = Reader()\n",
801 | "\n",
802 | "data = Dataset.load_from_df(df[['Cust_Id', 'Movie_Id', 'Rating']], reader)\n",
803 | "svd = SVD()\n",
804 | "# Run 5-fold cross-validation and print results\n",
805 | "cross_validate(svd, data, measures=['RMSE', 'MAE'], cv=5, verbose=True)"
806 | ]
807 | },
808 | {
809 | "cell_type": "code",
810 | "execution_count": 14,
811 | "metadata": {},
812 | "outputs": [
813 | {
814 | "data": {
815 | "text/plain": [
816 | "Movie_Id\n",
817 | "9236 The Witches\n",
818 | "13378 Kim Possible: A Sitch in Time\n",
819 | "Name: Name, dtype: object"
820 | ]
821 | },
822 | "execution_count": 14,
823 | "metadata": {},
824 | "output_type": "execute_result"
825 | }
826 | ],
827 | "source": [
828 | "df_785314 = df[(df['Cust_Id'] == '785314') & (df['Rating'] >= 5)]\n",
829 | "df_785314 = df_785314.set_index('Movie_Id')\n",
830 | "df_785314 = df_785314.join(df_title)['Name']\n",
831 | "df_785314.head(df_785314.shape[0])"
832 | ]
833 | },
834 | {
835 | "cell_type": "code",
836 | "execution_count": 15,
837 | "metadata": {},
838 | "outputs": [
839 | {
840 | "data": {
841 | "text/plain": [
842 | ""
843 | ]
844 | },
845 | "execution_count": 15,
846 | "metadata": {},
847 | "output_type": "execute_result"
848 | }
849 | ],
850 | "source": [
851 | "# getting full dataset\n",
852 | "# data = Dataset.load_from_df(df[['Cust_Id', 'Movie_Id', 'Rating']], reader)\n",
853 | "\n",
854 | "trainset = data.build_full_trainset()\n",
855 | "svd.fit(trainset)"
856 | ]
857 | },
858 | {
859 | "cell_type": "code",
860 | "execution_count": 16,
861 | "metadata": {},
862 | "outputs": [],
863 | "source": [
864 | "titles = df_title.copy()\n",
865 | "\n",
866 | "titles['Estimate_Score'] = titles['Movie_Id'].apply(lambda x: svd.predict(785314, x).est)\n",
867 | "titles = titles.sort_values(by=['Estimate_Score'], ascending=False)"
868 | ]
869 | },
870 | {
871 | "cell_type": "code",
872 | "execution_count": 17,
873 | "metadata": {},
874 | "outputs": [
875 | {
876 | "data": {
877 | "text/html": [
878 | "\n",
879 | "\n",
892 | "
\n",
893 | " \n",
894 | " \n",
895 | " | \n",
896 | " Movie_Id | \n",
897 | " Year | \n",
898 | " Name | \n",
899 | " Estimate_Score | \n",
900 | "
\n",
901 | " \n",
902 | " \n",
903 | " \n",
904 | " | 12 | \n",
905 | " 13 | \n",
906 | " 2003.0 | \n",
907 | " Lord of the Rings: The Return of the King: Ext... | \n",
908 | " 4.486798 | \n",
909 | "
\n",
910 | " \n",
911 | " | 9235 | \n",
912 | " 9236 | \n",
913 | " 1998.0 | \n",
914 | " South Park: Season 2 | \n",
915 | " 4.122711 | \n",
916 | "
\n",
917 | " \n",
918 | " | 4505 | \n",
919 | " 4506 | \n",
920 | " 1961.0 | \n",
921 | " Breakfast at Tiffany's | \n",
922 | " 4.044488 | \n",
923 | "
\n",
924 | " \n",
925 | " | 24 | \n",
926 | " 25 | \n",
927 | " 1997.0 | \n",
928 | " Inspector Morse 31: Death Is Now My Neighbour | \n",
929 | " 4.008793 | \n",
930 | "
\n",
931 | " \n",
932 | " | 13379 | \n",
933 | " 13380 | \n",
934 | " 1949.0 | \n",
935 | " Stray Dog | \n",
936 | " 3.990185 | \n",
937 | "
\n",
938 | " \n",
939 | " | 4508 | \n",
940 | " 4509 | \n",
941 | " 1977.0 | \n",
942 | " Little House on the Prairie: Season 4 | \n",
943 | " 3.989363 | \n",
944 | "
\n",
945 | " \n",
946 | " | 4520 | \n",
947 | " 4521 | \n",
948 | " 2002.0 | \n",
949 | " Wire in the Blood: Justice Painted Blind | \n",
950 | " 3.982499 | \n",
951 | "
\n",
952 | " \n",
953 | " | 13374 | \n",
954 | " 13375 | \n",
955 | " 1963.0 | \n",
956 | " Andy Griffith Show: Classic Favorites | \n",
957 | " 3.953485 | \n",
958 | "
\n",
959 | " \n",
960 | " | 13376 | \n",
961 | " 13377 | \n",
962 | " 1963.0 | \n",
963 | " Winter Light | \n",
964 | " 3.918503 | \n",
965 | "
\n",
966 | " \n",
967 | " | 4 | \n",
968 | " 5 | \n",
969 | " 2004.0 | \n",
970 | " The Rise and Fall of ECW | \n",
971 | " 3.916570 | \n",
972 | "
\n",
973 | " \n",
974 | "
\n",
975 | "
"
976 | ],
977 | "text/plain": [
978 | " Movie_Id Year Name \\\n",
979 | "12 13 2003.0 Lord of the Rings: The Return of the King: Ext... \n",
980 | "9235 9236 1998.0 South Park: Season 2 \n",
981 | "4505 4506 1961.0 Breakfast at Tiffany's \n",
982 | "24 25 1997.0 Inspector Morse 31: Death Is Now My Neighbour \n",
983 | "13379 13380 1949.0 Stray Dog \n",
984 | "4508 4509 1977.0 Little House on the Prairie: Season 4 \n",
985 | "4520 4521 2002.0 Wire in the Blood: Justice Painted Blind \n",
986 | "13374 13375 1963.0 Andy Griffith Show: Classic Favorites \n",
987 | "13376 13377 1963.0 Winter Light \n",
988 | "4 5 2004.0 The Rise and Fall of ECW \n",
989 | "\n",
990 | " Estimate_Score \n",
991 | "12 4.486798 \n",
992 | "9235 4.122711 \n",
993 | "4505 4.044488 \n",
994 | "24 4.008793 \n",
995 | "13379 3.990185 \n",
996 | "4508 3.989363 \n",
997 | "4520 3.982499 \n",
998 | "13374 3.953485 \n",
999 | "13376 3.918503 \n",
1000 | "4 3.916570 "
1001 | ]
1002 | },
1003 | "execution_count": 17,
1004 | "metadata": {},
1005 | "output_type": "execute_result"
1006 | }
1007 | ],
1008 | "source": [
1009 | "titles.head(10)"
1010 | ]
1011 | }
1012 | ],
1013 | "metadata": {
1014 | "kernelspec": {
1015 | "display_name": "Python 3",
1016 | "language": "python",
1017 | "name": "python3"
1018 | },
1019 | "language_info": {
1020 | "codemirror_mode": {
1021 | "name": "ipython",
1022 | "version": 3
1023 | },
1024 | "file_extension": ".py",
1025 | "mimetype": "text/x-python",
1026 | "name": "python",
1027 | "nbconvert_exporter": "python",
1028 | "pygments_lexer": "ipython3",
1029 | "version": "3.7.4"
1030 | }
1031 | },
1032 | "nbformat": 4,
1033 | "nbformat_minor": 2
1034 | }
1035 |
--------------------------------------------------------------------------------