Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Code showing no reults
#1
Fraud = df[df['Class'] == 1]
Valid = df[df['Class'] == 0]

outlier_fraction = len(Fraud)/ float(len(Valid))

print(outlier_fraction)
print('Fraud Cases ()'.format(len(Fraud)))
print('Valid Cases()'.format(len(Valid)))
Output i m getting:
0.0017234102419808666
Fraud Cases ()
Valid Cases()
not getting results for fraud cases and valid cases.
Quote
#2
you need to use curly braces
print('Fraud Cases {}'.format(len(Fraud)))
print('Valid Cases {}'.format(len(Valid)))
for more info https://docs.python.org/3/library/string...ing-syntax
ayaz786amd likes this post
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)