Update main.py
This commit is contained in:
parent
db6c2041ec
commit
de955657c7
3
main.py
3
main.py
@ -32,7 +32,8 @@ if __name__ == '__main__':
|
|||||||
train['Y'] = train.apply(lambda x: (float(x.Beginning) + float(x.End))/2, axis=1)
|
train['Y'] = train.apply(lambda x: (float(x.Beginning) + float(x.End))/2, axis=1)
|
||||||
train = train.drop(columns=['Beginning', 'End', 'Title', 'Source'])
|
train = train.drop(columns=['Beginning', 'End', 'Title', 'Source'])
|
||||||
|
|
||||||
model = Pipeline([TfidfVectorizer(), LinearRegression()])
|
estimators = [('tfidf', TfidfVectorizer()), ('linearRegression', LinearRegression())]
|
||||||
|
model = Pipeline(estimators)
|
||||||
model.fit(train.X, train.Y)
|
model.fit(train.X, train.Y)
|
||||||
|
|
||||||
# dev-0
|
# dev-0
|
||||||
|
Loading…
Reference in New Issue
Block a user