@@ -269,37 +269,40 @@ define([
269269 'ridge' : {
270270 name : 'Ridge' ,
271271 import : 'from sklearn.linear_model import Ridge' ,
272- code : 'Ridge(${etc})' ,
272+ code : 'Ridge(${alpha}${ etc})' ,
273273 options : [
274- //TODO:
274+ { name : 'alpha' , component : [ 'input_number' ] , default : 1.0 , usePair : true }
275275 ]
276276 } ,
277277 'lasso' : {
278278 name : 'Lasso' ,
279279 import : 'from sklearn.linear_model import Lasso' ,
280- code : 'Lasso(${etc})' ,
280+ code : 'Lasso(${alpha}${ etc})' ,
281281 options : [
282- //TODO:
282+ { name : 'alpha' , component : [ 'input_number' ] , default : 1.0 , usePair : true }
283283 ]
284284 } ,
285285 'elasticnet' : {
286286 name : 'ElasticNet' ,
287287 import : 'from sklearn.linear_model import ElasticNet' ,
288- code : 'ElasticNet(${etc})' ,
288+ code : 'ElasticNet(${alpha}${l1_ratio}${ etc})' ,
289289 options : [
290- //TODO:
290+ { name : 'alpha' , component : [ 'input_number' ] , default : 1.0 , usePair : true } ,
291+ { name : 'l1_ratio' , component : [ 'input_number' ] , default : 0.5 , usePair : true }
291292 ]
292293 } ,
293294 'sv-rgs' : {
294295 name : 'SVR' ,
295296 import : 'from sklearn.svm import SVR' ,
296- code : 'SVR(${C}${kernel}${gamma}${random_state}${etc})' ,
297+ code : 'SVR(${C}${kernel}${degree}${ gamma}${coef0 }${random_state}${etc})' ,
297298 options : [
298299 { name : 'C' , component : [ 'input_number' ] , placeholder : '1.0' , usePair : true } ,
299- { name : 'kernel' , component : [ 'option_select' ] , type : 'text' , default : 'rbf' , type :'text' , usePair : true ,
300- options : [ 'linear' , 'poly' , 'rbf' , 'sigmoid' , 'precomputed' ] } ,
301- { name : 'gamma' , component : [ 'option_suggest' ] , default : 'scale' , type :'text' , usePair : true ,
302- options : [ 'scale' , 'auto' ] } ,
300+ { name : 'kernel' , component : [ 'option_select' ] , type : 'text' , usePair : true ,
301+ options : [ 'linear' , 'poly' , 'rbf' , 'sigmoid' , 'precomputed' ] , default : 'rbf' } ,
302+ { name : 'degree' , component : [ 'input_number' ] , placeholder : '3' , usePair : true } ,
303+ { name : 'gamma' , component : [ 'option_suggest' ] , usePair : true ,
304+ options : [ "'scale'" , "'auto'" ] , default : "'scale'" } ,
305+ { name : 'coef0' , component : [ 'input_number' ] , placeholder : '0.0' , usePair : true } ,
303306 { name : 'random_state' , component : [ 'input_number' ] , placeholder : '123' , usePair : true }
304307 ]
305308 } ,
@@ -422,15 +425,17 @@ define([
422425 ]
423426 } ,
424427 'sv-clf' : {
425- name : 'SupportVectorClassifier ' ,
428+ name : 'SVC ' ,
426429 import : 'from sklearn.svm import SVC' ,
427- code : 'SVC(${C}${kernel}${gamma}${random_state}${etc})' ,
430+ code : 'SVC(${C}${kernel}${degree}${ gamma}${coef0 }${random_state}${etc})' ,
428431 options : [
429432 { name : 'C' , component : [ 'input_number' ] , placeholder : '1.0' , usePair : true } ,
430433 { name : 'kernel' , component : [ 'option_select' ] , type : 'text' , usePair : true ,
431434 options : [ 'linear' , 'poly' , 'rbf' , 'sigmoid' , 'precomputed' ] , default : 'rbf' } ,
432- { name : 'gamma' , component : [ 'option_suggest' ] , usePair : true ,
433- options : [ 'scale' , 'auto' ] , default : 'scale' } ,
435+ { name : 'degree' , component : [ 'input_number' ] , placeholder : '3' , usePair : true } ,
436+ { name : 'gamma' , component : [ 'option_suggest' ] , usePair : true ,
437+ options : [ "'scale'" , "'auto'" ] , default : "'scale'" } ,
438+ { name : 'coef0' , component : [ 'input_number' ] , placeholder : '0.0' , usePair : true } ,
434439 { name : 'random_state' , component : [ 'input_number' ] , placeholder : '123' , usePair : true }
435440 ]
436441 } ,
0 commit comments