File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ Turns into
47
47
#### javascript
48
48
49
49
``` js
50
- import { LinearRegression } from ' scikitjs'
50
+ import * as tf from ' @tensorflow/tfjs'
51
+ import { LinearRegression , setBackend } from ' scikitjs'
52
+ setBackend (tf)
51
53
52
54
let X = [[1 ], [2 ]]
53
55
let y = [10 , 20 ]
@@ -77,7 +79,9 @@ Turns into
77
79
#### javascript
78
80
79
81
``` js
80
- import { LinearRegression } from ' scikitjs'
82
+ import * as tf from ' @tensorflow/tfjs'
83
+ import { LinearRegression , setBackend } from ' scikitjs'
84
+ setBackend (tf)
81
85
82
86
let X = [[1 ], [2 ]]
83
87
let y = [10 , 20 ]
@@ -112,7 +116,9 @@ Turns into
112
116
#### javascript
113
117
114
118
``` js
115
- import { LogisticRegression } from ' scikitjs'
119
+ import * as tf from ' @tensorflow/tfjs'
120
+ import { LogisticRegression , setBackend } from ' scikitjs'
121
+ setBackend (tf)
116
122
117
123
let X = [[1 ], [- 1 ]]
118
124
let y = [1 , 0 ]
You can’t perform that action at this time.
0 commit comments