You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
371 B
17 lines
371 B
from sklearn.svm import LinearSVC
|
|
from sklearn.datasets import make_classification
|
|
import numpy as np
|
|
from pprint import pprint as prt
|
|
|
|
x2 = np.random.rand(100)
|
|
|
|
X, y = make_classification(n_features = 5, random_state = 0)
|
|
|
|
print(X.shape)
|
|
prt(X)
|
|
print('\n')
|
|
print(len(y))
|
|
|
|
|
|
LSVCClf = LinearSVC(dual = False, random_state = 0, penalty = 'l1',tol = 1e-5)
|
|
LSVCClf.fit(X, y)
|
|
|