Skip to content

Commit

Permalink
feat: Explain how text ML models are trained (#343)
Browse files Browse the repository at this point in the history
This PR adds an interactive visualization of a neural network, 
customized based on the characteristics of a student's 
project.

For more details, see https://dalelane.co.uk/blog/?p=4182

Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>
  • Loading branch information
dalelane authored Nov 1, 2020
1 parent 1cfb9fa commit b62ec10
Show file tree
Hide file tree
Showing 46 changed files with 7,737 additions and 296 deletions.
1 change: 1 addition & 0 deletions custom_typings/compromise/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'compromise';
1 change: 1 addition & 0 deletions custom_typings/emoticon/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'emoticon';
1,614 changes: 1,340 additions & 274 deletions package-lock.json

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
"@types/jsonwebtoken": "8.5.0",
"@types/jszip": "3.4.1",
"@types/jwt-decode": "2.2.1",
"@types/lodash": "4.14.162",
"@types/lodash": "4.14.164",
"@types/mocha": "8.0.3",
"@types/multer": "1.4.4",
"@types/mustache": "4.0.1",
"@types/natural": "^2.1.0",
"@types/node": "12.x",
"@types/nodemailer": "6.4.0",
"@types/pg": "7.14.5",
Expand All @@ -40,14 +41,15 @@
"@types/sharp": "0.26.0",
"@types/sinon-express-mock": "1.3.9",
"@types/supertest": "2.0.10",
"@types/syllable": "^4.1.0",
"@types/tmp": "0.2.0",
"@types/unzip": "0.1.1",
"@types/unzipper": "0.10.3",
"@types/uuid": "8.3.0",
"autoprefixer": "9.8.6",
"clone": "2.1.2",
"del": "6.0.0",
"eslint": "7.11.0",
"eslint": "7.12.1",
"eslint-plugin-node": "11.1.0",
"filecompare": "1.0.4",
"grunt": "1.3.0",
Expand Down Expand Up @@ -80,12 +82,12 @@
"nyc": "15.1.0",
"postcss": "8.1.2",
"proxyquire": "2.1.3",
"sinon": "9.2.0",
"sinon": "9.2.1",
"sinon-express-mock": "2.2.1",
"supertest": "5.0.0",
"tslint": "6.1.3",
"tslint-eslint-rules": "5.4.0",
"typescript": "4.0.3",
"typescript": "4.0.5",
"typescript-require": "0.3.0",
"unzipper": "0.10.11"
},
Expand All @@ -98,32 +100,37 @@
"bunyan-slack": "0.0.10",
"cfenv": "1.2.3",
"compression": "1.7.4",
"compromise": "13.7.0",
"compromise-numbers": "1.0.0",
"connect-query": "1.0.0",
"content-range": "1.1.0",
"emoticon": "3.2.0",
"express": "4.17.1",
"express-jwt": "6.0.0",
"file-type": "16.0.0",
"filesize": "6.1.0",
"helmet": "4.1.1",
"http-range-parse": "1.0.0",
"http-status": "1.4.2",
"ibm-cos-sdk": "1.7.0",
"ibm-cos-sdk": "1.8.0",
"jsonwebtoken": "8.5.1",
"jszip": "3.5.0",
"jwks-rsa": "1.10.1",
"jwks-rsa": "1.11.0",
"jwt-decode": "3.0.0",
"lodash": "4.17.20",
"lru": "3.1.0",
"multer": "1.4.2",
"mustache": "4.0.1",
"natural": "2.1.5",
"nodemailer": "6.4.14",
"pg": "8.4.1",
"pg": "8.4.2",
"probe-image-size": "5.0.0",
"randomstring": "1.1.5",
"read-chunk": "3.2.0",
"request": "2.88.2",
"request-promise": "4.2.6",
"sharp": "0.26.2",
"syllable": "^4.1.0",
"tmp": "0.2.1",
"uuid": "8.3.1"
}
Expand Down
9 changes: 9 additions & 0 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@
VERSION : <%= VERSION %>
}
})
.state('mlproject_text_model_describe', {
url: '/mlproject/:userId/:projectId/models/text/:modelId',
controller: 'ModelTextDescribeController',
templateUrl: 'static/components-<%= VERSION %>/describetextmodel/describemodel.html',
controllerAs: 'vm',
params: {
VERSION : <%= VERSION %>
}
})
.state('mlproject_makes', {
url: '/mlproject/:userId/:projectId/makes',
controller: 'MakesController',
Expand Down
4 changes: 2 additions & 2 deletions public/components/describemodel/describemodel.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

ModelDescribeController.$inject = [
'authService', 'projectsService', 'trainingService', 'loggerService',
'$stateParams', '$scope', '$timeout', '$interval', '$document', 'loggerService'
'$stateParams', '$scope', '$timeout', '$interval', '$document'
];

function ModelDescribeController(authService, projectsService, trainingService, loggerService, $stateParams, $scope, $timeout, $interval, $document, loggerService) {
function ModelDescribeController(authService, projectsService, trainingService, loggerService, $stateParams, $scope, $timeout, $interval, $document) {
var vm = this;
vm.authService = authService;

Expand Down
1 change: 0 additions & 1 deletion public/components/describemodel/describemodel.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h2 class="text-center" translate="DESCRIBEMODEL.TITLE"></h2>
ng-click="vm.dismissAlert('errors', $index)"
id="errors{{error.alertid}}">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Sorry! This is a new page and I still have some bits left to fix...</strong><br/><br/>
<strong translate="APP.ERROR"></strong> {{ error.message }}<br/>
<em ng-if="error.status >= 500"><span translate="ERRORS.IFPERSISTENT"></span> <a ui-sref="help" translate="ERRORS.LETMEKNOW"></a></em>
</div>
Expand Down
Loading

0 comments on commit b62ec10

Please sign in to comment.