Spaces:
Runtime error
Runtime error
File size: 306 Bytes
ef4248d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import numpy as np
from sklearn.ensemble import IsolationForest
class AIThreatAnalyzer:
def __init__(self):
self.model = IsolationForest(contamination=0.01)
def train(self, data):
self.model.fit(data)
def predict(self, new_data):
return self.model.predict(new_data)
|