Skip to content

Commit

Permalink
Create abae.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 7, 2024
1 parent af8b63b commit 8907e17
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ai/abae/abae.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

class ABAE:
def __init__(self):
self.model = RandomForestClassifier()

def train(self, data):
X, y = data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
self.model.fit(X_train, y_train)

def predict(self, data):
return self.model.predict(data)

0 comments on commit 8907e17

Please sign in to comment.