Weight support, fixing CV/test indexing bug, and refactoring#701
Weight support, fixing CV/test indexing bug, and refactoring#701
Conversation
...ispatcher/test/model/supervised/classifier/auto_active_learning/AppAutoActiveLearner.test.ts
Show resolved
Hide resolved
daveta
left a comment
There was a problem hiding this comment.
Per comments comments, in future might adopt dict instead of long arg lists for fns...
| @@ -267,6 +323,7 @@ export class EntityAnnotatedCorpusData extends Data { | |||
| existingData as EntityAnnotatedCorpusData, | |||
| // ---- NOTE-NO-NEED-FOR-EntityAnnotatedCorpusData ---- labelColumnIndex, | |||
There was a problem hiding this comment.
not sure why these comments are needed?
| } | ||
|
|
||
| public retrieveLuUtterances(luLuisJsonStructure: any): any[] { // ---- NOTE: a shallow copy | ||
| public retrieveLuisLuUtterances(luLuisJsonStructure: any): any[] { // ---- NOTE: a shallow copy |
There was a problem hiding this comment.
why we need a method for this?
| "weight": number }> { | ||
| const weight: number = 1; | ||
| const utterancesArray: any[] = | ||
| this.retrieveLuisLuUtterances(luLuisJsonStructure); |
There was a problem hiding this comment.
shouldn't this simply be:
const utterancesArray: any[] = luLuisJsonStructure.utterances;
| }>, | ||
| "intent": string, | ||
| "text": string, | ||
| "weight": number }> { |
There was a problem hiding this comment.
who sets the weight or where the weight come from?
| partOfSpeechTags, | ||
| intent, | ||
| text, | ||
| weight, |
There was a problem hiding this comment.
not sure where "weight" comes from?
| let numberMatches: number = 0; | ||
| for (let i = 0; i < numberInstances; i++) { | ||
| const label: string = scoreDataStructure.labels[i]; | ||
| // const text: string = scoreDataStructure.texts[i]; |
There was a problem hiding this comment.
are the commented lines are ever going to be used? otherwise, can we get rid of unused code?
| required: false, | ||
| }, | ||
| ); | ||
| parser.addArgument( |
There was a problem hiding this comment.
seen this one before, i feel like there should be one place where arguments for parser are constructed...
Weight support, fixing CV/test indexing bug, and refactoring