Skip to content

Commit

Permalink
Merge pull request #86 from KOSASIH/deepsource-transform-7c2ba528
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
KOSASIH authored May 10, 2024
2 parents 68a231e + 9bfc887 commit a338d8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions machine_learning/machine_learning.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import pandas as pd
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression


class MachineLearning:
def __init__(self):
pass

def train_model(self, data):
X = data[['feature1', 'feature2']]
y = data['target']
X = data[["feature1", "feature2"]]
y = data["target"]
model = LinearRegression()
model.fit(X, y)
return model

def predict(self, model, data):
X = data[['feature1', 'feature2']]
X = data[["feature1", "feature2"]]
y = model.predict(X)
return y

0 comments on commit a338d8d

Please sign in to comment.