File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -134,18 +134,18 @@ export function createMovingRegressor (bandwith) {
134134 function expectedX ( position = 0 ) {
135135 const solutions = projectY ( position , quadraticTheilSenRegressor . Y . get ( position ) )
136136 switch ( true ) {
137- case ( solutions . length === 0 ) :
138- return quadraticTheilSenRegressor . X . get ( position )
139- case ( solutions . length === 1 ) :
140- return solutions [ 0 ]
141- case ( solutions . length === 2 ) :
142- if ( Math . abs ( solutions [ 0 ] - quadraticTheilSenRegressor . X . get ( position ) ) < Math . abs ( solutions [ 1 ] - quadraticTheilSenRegressor . X . get ( position ) ) ) {
143- return solutions [ 0 ]
144- } else {
145- return solutions [ 1 ]
146- }
147- default :
148- return quadraticTheilSenRegressor . X . get ( position )
137+ case ( solutions . length === 0 ) :
138+ return quadraticTheilSenRegressor . X . get ( position )
139+ case ( solutions . length === 1 ) :
140+ return solutions [ 0 ]
141+ case ( solutions . length === 2 ) :
142+ if ( Math . abs ( solutions [ 0 ] - quadraticTheilSenRegressor . X . get ( position ) ) < Math . abs ( solutions [ 1 ] - quadraticTheilSenRegressor . X . get ( position ) ) ) {
143+ return solutions [ 0 ]
144+ } else {
145+ return solutions [ 1 ]
146+ }
147+ default :
148+ return quadraticTheilSenRegressor . X . get ( position )
149149 }
150150 }
151151
You can’t perform that action at this time.
0 commit comments