Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi


elif isinstance(self.model, RandomForestRegressor)



Download 45,83 Kb.
bet10/40
Sana14.04.2022
Hajmi45,83 Kb.
#551350
1   ...   6   7   8   9   10   11   12   13   ...   40
Bog'liq
sregono

elif isinstance(self.model, RandomForestRegressor):
self.model.fit(X_train, y_train)
predictions = self.model.predict(ownership['inputs'])
for q in [1, 0.5, 0.3, 0.25, 0.2, 0.1, 0.05, 0.02]:
selected_q = number_labels * q
if verify(
ownership['labels'],
predictions,
number_labels=selected_q,
bounds=ownership['bounds'],
metric=self.metric)['is_stolen']:

break

return selected_q

else:
raise NotImplementedError()

def __is_prediction_dawn(self, item):
""" Verify if prediction should be
correct as in the DAWN paper.

Args:
item (array): Single query

Returns:
(bool): Should the input be correctly classified ?

"""
bound = floor((2 ** self.args.precision_dawn)
* self.args.probability_dawn)
hashed = hmac.new(
self.args.key_dawn.encode("utf-8"),
item.tobytes(),
hashlib.sha256).hexdigest()
bits = bitstring.BitArray(hex=hashed).bin
if int(bits[:self.args.precision_dawn], 2) <= bound:
return False
else:
return True

def predict(self, X_test):
"""Predict method.

Args:
X_test (array): Test dataset

Returns:
predictions (array): Predictions

"""
# Verify if watermark is DAWN
if self.args.trigger_technique == 'dawn':
true_results = self.model.predict(X_test)
returned_results = []
# Loop on all queries
for x_item, x_true in zip(X_test, true_results):
if self.__is_prediction_dawn(x_item):
returned_results.append(x_true)

Download 45,83 Kb.

Do'stlaringiz bilan baham:
1   ...   6   7   8   9   10   11   12   13   ...   40




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish