Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [],
- "source": [
- "x = sorted(plwordprobs['aws'].items(), key=operator.itemgetter(1) ,reverse=True)[:15]\n",
- "y = sorted(plwordprobs['watson'].items(), key=operator.itemgetter(1) ,reverse=True)[:15]\n",
- "z = sorted(plwordprobs['azure'].items(), key=operator.itemgetter(1) ,reverse=True)[:15]"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "aws watson azure\n",
- "('data', 0.024794) ('df', 0.018522) ('import', 0.013169)\n",
- "('import', 0.016117) ('tf', 0.013373) ('data', 0.01199)\n",
- "('train', 0.015771) ('import', 0.012989) ('tf', 0.011484)\n",
- "('name', 0.011901) ('data', 0.011951) ('plt', 0.00994)\n",
- "('test', 0.011627) ('train', 0.011183) ('print', 0.009603)\n",
- "('sagemaker', 0.010771) ('test', 0.009492) ('model', 0.009603)\n",
- "('the', 0.010474) ('print', 0.009377) ('the', 0.008817)\n",
- "('print', 0.009296) ('the', 0.008185) ('test', 0.008592)\n",
- "('endpoint', 0.008938) ('in', 0.007724) ('name', 0.008564)\n",
- "('to', 0.008195) ('for', 0.007321) ('from', 0.008255)\n",
- "('s3', 0.007869) ('plt', 0.006898) ('in', 0.007834)\n",
- "('training', 0.007841) ('model', 0.006802) ('img', 0.007048)\n",
- "('in', 0.007327) ('as', 0.006514) ('for', 0.006964)\n",
- "('from', 0.007174) ('from', 0.006341) ('image', 0.006964)\n",
- "('for', 0.007122) ('to', 0.005995) ('as', 0.005953)\n"
- ]
- }
- ],
- "source": [
- "print('aws'.ljust(30), 'watson'.ljust(30), 'azure')\n",
- "for i in range(15):\n",
- " print(str(x[i]).ljust(30), str(y[i]).ljust(30), str(z[i]))"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.4"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Add Comment
Please, Sign In to add comment