@@ -21,7 +21,6 @@ headgear
21
21
*/
22
22
23
23
function getRandomColor ( type , category , gender ) {
24
- console . log ( "type " + type + "category " + category + "gender" + gender ) ;
25
24
return _ . sample ( _ . toArray ( svgs_ ) . filter ( s => s . gender === gender ) . filter ( s => s . category === category ) . filter ( s => s . type === type ) ) . name ;
26
25
}
27
26
@@ -35,7 +34,6 @@ function predictType(gender, targetWeather, rawType) {
35
34
return p ;
36
35
} , { diff : Infinity , svg : '' } ) ;
37
36
}
38
- console . log ( targetWeather ) ;
39
37
return function pc ( category ) {
40
38
const genderPieces = _ . toArray ( svgs_ ) . filter ( s => s . gender === gender ) ;
41
39
const categoryPieces = genderPieces . filter ( s => s . category === category . name ) ;
@@ -76,12 +74,7 @@ function quantisize(min, max, resolution) {
76
74
maxs ,
77
75
( min_ , max_ ) => ( { from : min_ , to : max_ , avg : ( min_ + max_ ) / 2 } ) ,
78
76
) ;
79
- console . log ( 'quants' ) ;
80
- console . log ( { min, max } ) ;
81
- console . log ( quants ) ;
82
77
return ( point ) => {
83
- console . log ( 'quantizising' ) ;
84
- console . log ( point ) ;
85
78
const fittingQuants = quants . filter ( q => q . from <= point . apparentTemperature && q . to >= point . apparentTemperature ) ;
86
79
if ( fittingQuants . length >= 1 )
87
80
return fittingQuants [ 0 ] . avg ;
@@ -111,10 +104,6 @@ function processWeather(weather, timestart, timestop, resolution, tempstart, tem
111
104
{ avg : null , coll : [ ] } ,
112
105
) ;
113
106
114
- console . log ( "target degrees" ) ;
115
- console . log ( target ) ;
116
- console . log ( tempstart + "-" + tempstop ) ;
117
-
118
107
const squish = percent => Math . max ( 0 , Math . min ( percent , 100 ) ) ;
119
108
const getPercent = w => w * 100 ;
120
109
const calcPercent = w => 1.0 - ( ( w - tempstart ) / ( tempstop - tempstart ) ) ;
@@ -246,13 +235,6 @@ export function predict(param) {
246
235
omit : false ,
247
236
} ) ;
248
237
249
- console . log ( 'fullbody' ) ;
250
- console . log ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) ) ;
251
- console . log ( fullbody ) ;
252
- console . log ( _ . map ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) , p => _ . toArray ( svgs_ ) . filter ( s => s . name === p ) [ 0 ] . percentage ) ) ;
253
- console . log ( _ . mean ( _ . map ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) , p => _ . toArray ( svgs_ ) . filter ( s => s . name === p ) [ 0 ] . percentage ) ) ) ;
254
- console . log ( _ . toArray ( svgs_ ) . filter ( s => s . name === fullbody . fullbody ) [ 0 ] . percentage ) ;
255
-
256
238
if ( Math . abs ( _ . mean ( _ . map ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) , p => _ . toArray ( svgs_ ) . filter ( s => s . name === p ) [ 0 ] . percentage ) ) - weather . target ) < Math . abs ( _ . toArray ( svgs_ ) . filter ( s => s . name === fullbody . fullbody ) [ 0 ] . percentage - weather . target ) ) {
257
239
return _ . reduce ( _ . flatten ( [ pieces , [ { type : 'seperate' } ] , nPieces , [ { fullbody : '' } ] ] ) , _ . extend ) ;
258
240
}
@@ -286,9 +268,6 @@ export function predictDay(param) {
286
268
omit : false ,
287
269
} ) ;
288
270
289
- console . log ( fullbody ) ;
290
- console . log ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) ) ;
291
-
292
271
if ( Math . abs ( _ . mean ( _ . map ( _ . map ( nPieces , x => x [ _ . keys ( x ) [ 0 ] ] ) . filter ( x => x !== '' ) , p => _ . toArray ( svgs_ ) . filter ( s => s . type === p ) [ 0 ] . percentage ) ) - weather . target ) < Math . abs ( _ . toArray ( svgs_ ) . filter ( s => s . type === fullbody . fullbody ) [ 0 ] . percentage - weather . target ) ) {
293
272
return _ . reduce ( _ . flatten ( [ pieces , nPieces , [ { fullbody : '' } ] ] ) , _ . extend ) ;
294
273
}
0 commit comments