One Class SVM Classification

Classifies data as financially efficient or inefficient given training data of only efficient nonprofits.

It defines a boundary based on the training data and classifies the data as positive(efficient) or negative(inefficient).


In [1]:
import pandas as pd


df1=pd.read_csv('team_out_1.csv')
df2=pd.read_csv('team_out_a2.csv')
df3=pd.read_csv('team_out_a3.csv')
df4=pd.read_csv('team_out_Yash.csv')
df5=pd.read_csv('team_out_Yash_part1.csv')


df=df1.append(df2)
df=df.append(df3)
df=df.append(df4)
df=df.append(df5)


df.dropna(inplace=True)
df.reset_index(inplace=True,drop=True)
df=df[df.Total_Expenses>0]
df


Out[1]:
Filename EIN Program_Exp Liabilities_To_Asset Working_Capital Surplus_Margin Total_Expenses
0 201523229349300327.xml 510311790.0 0.989619 0.091802 1.574677 -0.078663 464318.0
1 201543089349301829.xml 261460932.0 0.965378 0.000000 3.910347 -0.042674 27439.0
2 201533179349306298.xml 270609504.0 0.942276 0.049206 0.655152 0.088597 384828.0
3 201533209349304768.xml 521548962.0 0.384526 0.000814 30.392756 0.633126 50912.0
4 201533179349307343.xml 731653383.0 0.620560 0.029487 1.083739 0.105901 28123.0
5 201533189349300608.xml 237324566.0 0.758902 0.736982 -0.176215 -0.003914 608126.0
6 201523069349301367.xml 43259150.0 0.736312 0.181998 0.378592 0.057534 212968.0
7 201533069349300963.xml 621273871.0 0.644822 0.234247 14.413163 0.496122 1426413.0
8 201523099349300542.xml 541897455.0 0.845659 0.138531 0.414986 -0.016769 461512.0
9 201533099349301033.xml 251869168.0 0.762357 0.000000 8.673984 0.122244 102044.0
10 201523169349304367.xml 376046335.0 0.745386 0.000000 16.463976 0.252579 37170.0
11 201533099349301803.xml 50454409.0 0.915261 0.000000 1.158768 0.062649 557347.0
12 201523069349300142.xml 272364809.0 0.920307 0.003606 0.240597 -0.029663 302061.0
13 201543039349301204.xml 463812139.0 0.664088 0.648413 0.045823 0.088812 139974.0
14 201523089349301462.xml 561797737.0 0.704623 0.432671 0.000000 -0.050384 214773.0
15 201533069349300788.xml 590638867.0 0.000000 0.000000 0.360157 -0.055883 762522.0
16 201533079349300238.xml 273314429.0 1.000000 0.000000 0.000000 0.107584 26171.0
17 201523209349314257.xml 710801566.0 1.000000 0.000000 0.000000 -8.212337 1145333.0
18 201523209349311332.xml 752204594.0 0.896895 0.069715 0.535678 -0.064100 3889691.0
19 201533179349302173.xml 251374594.0 0.000000 0.313630 0.337537 0.014809 423512.0
20 201533179349307048.xml 450448773.0 0.991205 0.051348 0.414930 0.161552 185894.0
21 201533209349302633.xml 363789851.0 0.000000 0.232011 0.521133 -0.128997 7329143.0
22 201533099349301113.xml 411712804.0 0.477697 0.009887 0.751388 -0.014507 814720.0
23 201523039349300127.xml 381557861.0 0.832159 0.063834 2.988120 0.170911 1369609.0
24 201523079349301652.xml 273741627.0 0.945120 0.000000 0.863663 0.094985 1234798.0
25 201533039349300813.xml 411495321.0 0.668161 0.040796 144.508488 -0.139777 1108143.0
26 201533139349300208.xml 60666277.0 0.000000 0.644904 0.654848 -0.296143 19649432.0
27 201533069349301413.xml 42616064.0 0.951218 0.338683 0.178517 0.041123 33254203.0
28 201533079349300003.xml 581651220.0 0.910347 0.026832 0.945357 -0.020293 324797.0
29 201523069349300957.xml 341496171.0 0.850617 0.068838 1.125712 0.212899 672775.0
... ... ... ... ... ... ... ...
75744 201542929349301039.xml 205158717.0 0.490545 0.000000 0.496350 0.000000 52195.0
75745 201542929349301104.xml 440296401.0 0.000000 0.001255 2.673444 -0.075404 3921954.0
75746 201542929349301204.xml 131084330.0 0.000000 0.949950 0.043382 -0.079563 49480300.0
75747 201503109349302210.xml 30228267.0 0.726896 0.048491 0.484947 0.059259 1275474.0
75748 201503109349302270.xml 741718905.0 0.000000 0.444349 0.536678 -0.021724 700826.0
75749 201522549349300117.xml 150249365.0 0.000000 0.000000 2.604291 1.828035 54487.0
75750 201522549349300127.xml 942763918.0 0.000000 0.126873 6.226369 -0.160318 61868.0
75751 201522549349300142.xml 453774366.0 0.000000 0.006878 1.221741 0.337512 387277.0
75752 201522549349300202.xml 860507921.0 0.751038 0.256169 1.011925 -0.045928 3732567.0
75753 201522549349300217.xml 236390816.0 0.000000 0.128085 19.697597 -2.047494 227081.0
75754 201522549349300247.xml 940689854.0 1.000000 0.562191 0.151220 -0.047202 291609.0
75755 201522549349300317.xml 830164620.0 0.000000 0.009078 5.486683 0.127495 188778.0
75756 201522549349300322.xml 274726130.0 0.991514 0.003792 1.651461 0.392873 1796484.0
75757 201503139349301280.xml 810677279.0 0.564601 0.016695 4.338949 0.529888 85951.0
75758 201503139349301285.xml 232090256.0 0.767743 1.176003 -0.257737 -0.065425 16050928.0
75759 201503139349301295.xml 202902396.0 0.009901 0.004141 1704.089109 0.979933 808.0
75760 201503139349301300.xml 222471909.0 0.940847 1.457766 -1.793719 0.013922 469665.0
75761 201503139349301315.xml 50359008.0 0.634199 0.006712 3.553722 0.199138 179469.0
75762 201503139349301335.xml 20530732.0 0.796464 0.874227 0.345519 -0.024264 691125.0
75763 201503139349301400.xml 60668594.0 0.858908 0.183348 0.809719 -0.114802 28331141.0
75764 201503139349301405.xml 570884504.0 0.960711 0.202614 4.412177 -0.360560 57650.0
75765 201513159349303976.xml 911075950.0 0.912792 0.112852 6.978676 0.023383 1188586.0
75766 201513159349303991.xml 450537391.0 0.882861 1.000000 0.000000 0.000000 33214334.0
75767 201513159349304006.xml 630985623.0 1.000000 0.164163 1.350470 0.070756 201749.0
75768 201513159349304021.xml 930854620.0 0.221201 0.000121 14.605622 0.075426 62260.0
75769 201513159349304046.xml 263218152.0 0.661838 0.163034 0.730298 -0.017285 508851.0
75770 201513159349304051.xml 520887806.0 0.819248 0.417553 0.537307 0.028730 5894235.0
75771 201513159349304061.xml 942608741.0 0.893704 0.009907 1.638578 0.044649 243668.0
75772 201513159349304071.xml 330841281.0 0.807812 0.342269 0.836017 0.297505 25594615.0
75773 201513159349304076.xml 570751500.0 0.887786 0.415570 8.571501 0.063448 1610096.0

75279 rows × 7 columns


In [634]:
df[df.Program_Exp>1]


Out[634]:
Filename EIN Program_Exp Liabilities_To_Asset Working_Capital Surplus_Margin Total_Expenses
1545 201502579349301175.xml 200141248.0 1.142607 0.770354 0.553360 -5.089240 1276722.0
5627 201512949349301306.xml 542014609.0 1.013164 1.069741 -0.011601 -0.276276 1574232.0
7960 201503359349300815.xml 273294817.0 1.010240 0.020753 0.857745 0.424186 5355301.0
9800 201620279349300617.xml 550576920.0 1.006403 0.434611 0.073114 0.013669 1822040.0
13111 201600949349300200.xml 10367116.0 1.003634 0.028478 1.075774 -0.117847 1179223.0
16056 201620629349300447.xml 542014609.0 1.013164 1.069741 -0.011601 -0.276276 1574232.0
16692 201620419349300712.xml 311238139.0 1.053781 0.153538 34.644571 -6.766196 2024744.0
20638 201503169349304480.xml 363414823.0 9.982122 0.962854 0.224504 -3.008420 2118845.0

In [2]:
small_df=df[df.Total_Expenses<1000000]

med_df=df[df.Total_Expenses>1000000]
med_df=med_df[df.Total_Expenses<10000000]

large_df=df[df.Total_Expenses<50000000]
large_df=large_df[df.Total_Expenses>10000000]

national_df=df[df.Total_Expenses>50000000]


/Users/araeyusvakil/anaconda/lib/python3.5/site-packages/ipykernel/__main__.py:4: UserWarning: Boolean Series key will be reindexed to match DataFrame index.
/Users/araeyusvakil/anaconda/lib/python3.5/site-packages/ipykernel/__main__.py:7: UserWarning: Boolean Series key will be reindexed to match DataFrame index.

In [28]:
print(len(large_df))

pos_med=large_df[large_df.Program_Exp>.75]
# pos_med=pos_med[pos_med.Working_Capital>.01]
pos_med=pos_med[pos_med.Liabilities_To_Asset<1]
# pos_med=pos_med[pos_med.Surplus_Margin>.01]

lst_temp=list(pos_med['EIN'])
print("%:",len(lst_temp)/len(large_df))
print("NUMBER OF POSITIVE: ",len(lst_temp))


6054
%: 0.7381896266930955
NUMBER OF POSITIVE:  4469

In [3]:
print("NUMBER OF MED: ",len(med_df))

pos_med=med_df[med_df.Program_Exp>.75]
pos_med=pos_med[pos_med.Working_Capital>.01]
pos_med=pos_med[pos_med.Liabilities_To_Asset<1]
pos_med=pos_med[pos_med.Surplus_Margin>.01]
# 

lst_temp=list(pos_med['EIN'])
print("%:",len(lst_temp)/len(med_df))
print("NUMBER OF POSITIVE: ",len(lst_temp))


NUMBER OF MED:  23589
%: 0.3620755436856162
NUMBER OF POSITIVE:  8541

In [36]:
eff_nat_df=national_df[national_df.Program_Exp>.8]
# eff_nat_df=eff_nat_df[eff_nat_df.Working_Capital>.1]
eff_nat_df=eff_nat_df[eff_nat_df.Liabilities_To_Asset<1]
# eff_nat_df=eff_nat_df[eff_nat_df.Surplus_Margin>.1]

print(len(national_df))
lst_temp=list(eff_nat_df['EIN'])
print("%:",len(lst_temp)/len(national_df))
print(len(lst_temp))


2203
%: 0.7330912392192465
1615

In [18]:
print("NUMBER OF SMALL: ",len(small_df))

pos_small=small_df[small_df.Program_Exp>.5]
# pos_small=pos_small[pos_small.Working_Capital>.5]
pos_small=pos_small[pos_small.Liabilities_To_Asset<.5]
# pos_small=pos_small[pos_small.Surplus_Margin>.2]
lst_temp=list(pos_small['EIN'])

print("%:",len(lst_temp)/len(small_df))
print("NUMBER OF POSITIVE: ",len(lst_temp))


NUMBER OF SMALL:  43433
%: 0.6999516496673036
NUMBER OF POSITIVE:  30401

In [37]:
df=national_df #CHANGE THIS TO REQUIRED SIZE AND RUN REST OF THE CODE AS IS

In [38]:
df.reset_index(drop=True,inplace=True)
norm_df=df.copy()

norm_df=norm_df[['Program_Exp','Liabilities_To_Asset','Working_Capital','Surplus_Margin','Total_Expenses']]

from sklearn import preprocessing

x = norm_df.values #returns a numpy array
min_max_scaler = preprocessing.MinMaxScaler()
x_scaled = min_max_scaler.fit_transform(x)
norm_df = pd.DataFrame(x_scaled)
norm_df["Filename"]=df['Filename']

norm_df["EIN"]=df['EIN']
norm_df.columns=['Program_Exp','Liabilities_To_Asset','Working_Capital','Surplus_Margin','Total_Expenses','Filename','EIN']
norm_df.set_index('EIN',inplace=True)
norm_df


Out[38]:
Program_Exp Liabilities_To_Asset Working_Capital Surplus_Margin Total_Expenses Filename
EIN
620497990.0 0.711697 0.285976 0.121912 0.207680 0.000182 201533179349305948.xml
621674308.0 0.876123 0.285762 0.095081 0.207096 0.002472 201533179349300543.xml
440579850.0 0.853395 0.287135 0.095332 0.199572 0.014706 201523209349310187.xml
112625096.0 0.825931 0.286435 0.084335 0.205599 0.072800 201543149349303884.xml
510216589.0 0.701615 0.287647 0.092581 0.194394 0.160460 201523209349313822.xml
660258919.0 0.907194 0.286644 0.095035 0.206751 0.000918 201523209349311307.xml
953766170.0 0.729660 0.286531 0.092281 0.206288 0.002804 201523209349311657.xml
411404075.0 0.865371 0.285468 0.125450 0.209051 0.021943 201533089349300748.xml
314390844.0 0.859851 0.285564 0.186793 0.212797 0.001308 201533179349301758.xml
370635502.0 0.862693 0.286192 0.102220 0.212947 0.018294 201533179349302053.xml
941156621.0 0.902687 0.286926 0.093936 0.213529 0.165744 201533089349301428.xml
941080917.0 0.844000 0.286724 0.091394 0.206827 0.056671 201513089349301681.xml
741287016.0 0.852722 0.285299 0.648553 0.246949 0.001583 201513079349301421.xml
131628168.0 0.705233 0.285666 0.229296 0.216343 0.001423 201503089349300305.xml
381359218.0 0.909901 0.285911 0.091507 0.206401 0.000569 201503039349300645.xml
582155150.0 0.857106 0.286543 0.095117 0.199266 0.003023 201503039349300205.xml
620636239.0 0.967490 0.285982 0.093331 0.203199 0.013353 201513099349300131.xml
462134675.0 0.748392 0.285638 0.095488 0.216700 0.000467 201503039349300965.xml
382776791.0 0.847499 0.286168 0.096974 0.192845 0.016498 201503039349301010.xml
990109908.0 0.885965 0.286060 0.132521 0.161909 0.000196 201543149349301234.xml
344428218.0 0.778457 0.286749 0.112824 0.198790 0.016734 201533169349301178.xml
900532831.0 0.866060 0.288567 0.077672 0.205485 0.011010 201503069349300100.xml
381359083.0 0.904910 0.285675 0.136528 0.203697 0.002179 201503079349301720.xml
530240474.0 0.000000 0.286898 0.114032 0.190601 0.000289 201503099349301210.xml
133783732.0 0.973119 0.287039 0.081489 0.206471 0.396097 201523149349303117.xml
840772672.0 0.959278 0.285566 0.087844 0.204481 0.003671 201523169349304487.xml
161533232.0 0.891779 0.287347 0.086287 0.202910 0.104674 201523169349304557.xml
521209124.0 0.000000 0.288096 0.075535 0.189720 0.000026 201513089349300006.xml
160968914.0 0.836507 0.287277 0.082881 0.198903 0.001402 201533159349302003.xml
203238867.0 0.936855 0.287854 0.078382 0.205098 0.008632 201513079349300746.xml
... ... ... ... ... ... ...
131921358.0 0.784374 0.285912 0.149928 0.215100 0.000855 201503169349302405.xml
131740122.0 0.809940 0.286692 0.097239 0.211635 0.028923 201522949349300642.xml
470662290.0 0.933724 0.286321 0.128206 0.215504 0.010230 201503109349301775.xml
237315673.0 0.874673 0.285289 0.780224 0.231497 0.004367 201513139349303256.xml
590594631.0 0.847908 0.285439 0.129852 0.214101 0.005300 201513139349303411.xml
860098923.0 0.846156 0.286235 0.108920 0.207430 0.022347 201513159349303116.xml
60646813.0 0.000000 0.287123 0.078338 0.218787 0.064180 201542939349300119.xml
420698265.0 0.870026 0.286141 0.112828 0.211466 0.016394 201503169349303520.xml
610523304.0 0.835605 0.286091 0.112672 0.208184 0.000074 201512589349300416.xml
680480736.0 0.959980 0.287758 0.078976 0.205279 0.017427 201512599349300816.xml
640723407.0 0.990448 0.287734 0.093831 0.207808 0.000400 201503169349305790.xml
350867958.0 0.832801 0.286500 0.103267 0.214674 0.026676 201513169349301926.xml
250965270.0 0.788830 0.287869 0.078629 0.202115 0.002136 201513139349302081.xml
461056754.0 0.000000 0.287357 0.137552 0.219247 0.021543 201513149349301616.xml
540853898.0 0.822107 0.285474 0.114367 0.202819 0.016090 201503159349301525.xml
311551316.0 0.000000 0.288268 0.071456 0.206548 0.003117 201513209349310951.xml
237385560.0 0.000000 0.285797 0.102417 0.216995 0.081787 201523209349303667.xml
950743320.0 0.000000 0.285266 0.250977 0.220568 0.001429 201523209349306452.xml
221750190.0 0.803019 0.286426 0.112178 0.206673 0.019195 201542929349301029.xml
112458584.0 0.885544 0.287441 0.083550 0.203641 0.001476 201502939349301250.xml
363992031.0 0.000000 0.287881 0.078338 0.205098 0.009181 201503149349302640.xml
953797687.0 0.905737 0.285464 0.167191 0.228175 0.013651 201513159349303306.xml
251469002.0 0.924633 0.285670 0.143026 0.202755 0.000475 201503169349305045.xml
111672777.0 0.787968 0.287301 0.093674 0.213840 0.000704 201513149349302391.xml
941606519.0 0.942571 0.286195 0.087211 0.204167 0.005626 201503139349301485.xml
396084300.0 0.000000 0.285237 0.225581 0.211553 0.004633 201503169349303705.xml
231857015.0 0.909018 0.287627 0.077821 0.193543 0.015721 201513159349300131.xml
410698301.0 0.881789 0.286325 0.109058 0.209535 0.005620 201503159349302510.xml
310929576.0 0.722580 0.286166 0.106384 0.211853 0.007642 201513109349301611.xml
350868085.0 0.823389 0.286823 0.095199 0.204861 0.067859 201513109349300736.xml

2203 rows × 6 columns


In [39]:
Y_class_df = pd.DataFrame()
X_class_df=norm_df.loc[lst_temp]
X_class_df['Efficiency'] = 1


Y_class_df['Efficiency'] = X_class_df['Efficiency'] 
X_class_df.drop('Efficiency', axis=1, inplace=True)


new_df=norm_df[['Program_Exp','Liabilities_To_Asset','Working_Capital','Surplus_Margin']]
X_class_df=X_class_df[['Program_Exp','Liabilities_To_Asset','Working_Capital','Surplus_Margin']]
# X_class_df=X_class_df.drop(X_class_df.index[2])   #OUTLIER REMOVER
X_class_df.reset_index(inplace=True,drop=True)

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.font_manager
from sklearn import svm
from scipy import stats
from mpl_toolkits.mplot3d import Axes3D

from sklearn.decomposition import TruncatedSVD

svd = TruncatedSVD(n_components=2, n_iter=7)
reduced_df = svd.fit_transform(new_df)

#svd2 = TruncatedSVD(n_components=2, n_iter=7)
X_classtrain_df = svd.fit_transform(X_class_df)


'''outliers_fraction = 0.25'''
#colors = ['m', 'g', 'b']
clf = svm.OneClassSVM(nu=0.1, kernel="linear", gamma=.01,coef0=1.5)
clf.fit(X_classtrain_df)
#y_pred_test = clf.predict(normalized_df)
#print(y_pred_test)
Z1 = clf.predict(reduced_df)
res_matrix=Z1
print(res_matrix)
#print(reduced_df.shape)

if Z1.shape[0]%2==1:
    Z1=Z1[:-1]
temp_Z1=Z1
Z1 = Z1.reshape((-1,2))
print(Z1.shape)
xx1 = []
yy1= []
for i in reduced_df:
    xx1.append(i[0])
    yy1.append(i[1])
x1 = np.asarray(xx1)
y1 = np.asarray(yy1)
temp_y1=y1
temp_x1=x1
if len(x1)%2==1: #IS ODD:
    x1=x1[:-1]
if len(y1)%2==1:
    y1=y1[:-1]
x1 = x1.reshape((-1,2))
y1 = y1.reshape((-1,2))
print(x1.shape,y1.shape)

# plt.figure(0)
# plt.contourf(reduced_df[0:Z1.shape[0]], reduced_df[Z1.shape[0]:len(res_matrix)-1], Z1,cmap=plt.cm.coolwarm)
# plt.figure(1)
# plt.contourf(x1, y1, Z1)

# fig = plt.figure()
# ax = fig.add_subplot(111, projection='3d')
# ax.contourf(x1,y1,Z1)

# fig = plt.figure()
# ax = fig.add_subplot(111, projection='3d')
# ax.contour(reduced_df[0:Z1.shape[0]], reduced_df[Z1.shape[0]:len(res_matrix)-1], Z1,cmap=plt.cm.coolwarm)

# fig = plt.figure()
# ax = fig.add_subplot(111, projection='3d')
# ax.plot_trisurf(temp_x1,temp_y1, temp_Z1,cmap=plt.cm.coolwarm)
# # #plt.scatter(X_class_df.as_matrix()[:, 0], X_class_df.as_matrix()[:, 1], color='black')


[-1.  1.  1. ...,  1. -1.  1.]
(1101, 2)
(1101, 2) (1101, 2)
/Users/araeyusvakil/anaconda/lib/python3.5/site-packages/ipykernel/__main__.py:3: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  app.launch_new_instance()
/Users/araeyusvakil/anaconda/lib/python3.5/site-packages/ipykernel/__main__.py:7: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

In [40]:
new_df=norm_df.copy()
new_df.reset_index(inplace=True)

temp_list=[]

count=0
for i in range(len(res_matrix)):
    if res_matrix[i]==-1.0:
        temp_list.append(pd.DataFrame(df.loc[i]).transpose())
        count+=1
print(count)
print(count/len(norm_df))
ineff_nat_df=pd.concat(temp_list)
ineff_nat_df.reset_index(inplace=True,drop=True)
ineff_nat_df


623
0.28279618701770315
Out[40]:
Filename EIN Program_Exp Liabilities_To_Asset Working_Capital Surplus_Margin Total_Expenses
0 201533179349305948.xml 6.20498e+08 0.718528 0.286403 1.05705 0.0290296 5.19174e+07
1 201523209349313822.xml 5.10217e+08 0.708349 0.912501 0.345514 -0.120347 1.71046e+09
2 201523209349311657.xml 9.53766e+08 0.736663 0.494316 0.338249 0.0133821 7.90507e+07
3 201503089349300305.xml 1.31628e+08 0.712002 0.170064 3.66207 0.126429 6.4757e+07
4 201503039349300965.xml 4.62135e+08 0.755575 0.159723 0.416034 0.130444 5.48697e+07
5 201533169349301178.xml 3.44428e+08 0.785929 0.575837 0.836588 -0.0709181 2.23198e+08
6 201503099349301210.xml 5.3024e+08 0 0.631953 0.865902 -0.162997 5.30245e+07
7 201513089349300006.xml 5.21209e+08 0 1.0808 -0.0679868 -0.172903 5.03023e+07
8 201503099349300710.xml 3.11668e+08 0.720145 0.384355 0.701484 0.057791 2.10115e+08
9 201513099349301401.xml 2.22325e+08 0.754058 0.384388 0.943859 -0.138272 1.78473e+08
10 201503079349301165.xml 5.30215e+08 0 0.211201 1.33458 0.177553 1.51622e+08
11 201523209349309137.xml 5.91093e+08 0.725863 0.252772 1.40097 -0.00895469 1.01897e+08
12 201533169349302458.xml 7.1025e+08 0.809637 0.35022 0.774675 0.0432484 1.43938e+08
13 201533169349301973.xml 9.30603e+08 0.754009 0.392576 0.815902 0.0945209 6.09807e+08
14 201533169349304798.xml 3.8149e+08 0.769776 0.611598 0.265935 -0.0114639 5.74491e+07
15 201523149349301217.xml 5.36e+08 0 1.5614 -0.262408 -0.104865 6.15463e+07
16 201532579349301178.xml 9.10567e+08 0.709724 0.483338 0.328049 -0.0133592 4.01986e+08
17 201512879349300501.xml 1.3174e+08 0.762818 0.864261 0.140138 -0.416101 7.25797e+07
18 201532579349300048.xml 3.70661e+08 0.813327 0 0 -0.218477 6.60125e+07
19 201512999349300926.xml 4.11294e+08 0.717965 0.755306 0.154674 -0.113958 1.06079e+08
20 201522879349300742.xml 7.41031e+08 0.776701 0.41779 3.76126 0.359146 6.6327e+07
21 201512869349301651.xml 9.51644e+08 0.754632 0.0450512 3.57331 0.184016 7.30474e+07
22 201513029349301001.xml 3.40754e+08 0 0.175973 1.08541 -0.0214025 6.6673e+07
23 201503019349300920.xml 5.302e+08 0 0.600912 0.0957989 0.0866492 2.65447e+08
24 201513029349301666.xml 5.70752e+08 0.914972 -106.882 -0.308261 -0.0189246 1.21089e+08
25 201542999349301319.xml 5.91378e+08 0 0 3.55804 -0.125547 6.12861e+07
26 201532879349300843.xml 5.22001e+08 0.661161 1.30181 -1.14255 -0.137308 6.65748e+07
27 201532759349300858.xml 6.10582e+07 0 0.622961 0.170884 -0.0234945 5.50081e+07
28 201502759349300960.xml 8.40399e+08 0.790303 0.0723272 1.81102 0.0923665 9.13628e+07
29 201502549349300340.xml 2.0233e+08 0.71991 0.458081 0.148249 -0.017762 5.85896e+07
... ... ... ... ... ... ... ...
593 201533209349302483.xml 2.26106e+08 0.814969 0.429315 0.678336 0.00955411 8.51476e+07
594 201533209349302408.xml 7.50055e+08 0 0.797782 0.0947192 0.00844842 1.20344e+08
595 201533209349302513.xml 3.40715e+08 0.820203 0.219401 0.511917 -0.0535056 4.48244e+08
596 201543179349304149.xml 1.31628e+08 0 0.368225 0.402565 0.105538 1.41531e+09
597 201523209349302112.xml 1.31624e+08 0.715179 0.372468 0.402557 0.0501937 1.85365e+08
598 201523209349302152.xml 6.11649e+08 0.813336 0.102526 1.03773 0.108744 3.5946e+09
599 201513209349313236.xml 9.42736e+08 0.789357 0.741644 2.06452 -0.102984 7.83482e+07
600 201523179349306007.xml 2.51494e+08 0.781912 0.585004 0.469064 -0.0627935 6.3717e+07
601 201523209349302462.xml 5.60928e+08 0.813337 0.053122 1.01091 0.0587995 1.06149e+09
602 201513209349311296.xml 9.11915e+08 0.795897 0.35823 0.429839 -0.0198883 2.59222e+08
603 201523179349303937.xml 1.3174e+08 0.78755 0.989647 0.00417253 0.00412562 2.15966e+08
604 201522939349300957.xml 8.50313e+08 0.686283 0.6969 0.150211 -0.0509705 5.50494e+07
605 201512959349300826.xml 3.91028e+08 0.812847 0.520239 0.555575 -0.0204222 2.02017e+08
606 201523209349300522.xml 5.21572e+08 0.791724 0.252599 0.604276 -0.0712481 1.01498e+08
607 201523179349303117.xml 7.52679e+08 0.810856 -0.102514 0.812838 0.176805 1.97308e+08
608 201503109349302150.xml 3.51968e+08 0.818064 0.467783 0.692742 0.204341 5.2751e+07
609 201503109349301980.xml 2.50818e+08 0 0.912927 0.150872 0.161203 3.97704e+08
610 201503169349302405.xml 1.31921e+08 0.791903 0.262411 1.73669 0.112463 5.88801e+07
611 201522949349300642.xml 1.3174e+08 0.817714 0.554476 0.458523 0.0734968 3.49322e+08
612 201542939349300119.xml 6.06468e+07 0 0.716109 0 0.153907 7.14162e+08
613 201513139349302081.xml 2.50965e+08 0.796401 0.995783 0.00705749 -0.0335374 7.21422e+07
614 201513149349301616.xml 4.61057e+08 0 0.803781 1.43646 0.159081 2.72957e+08
615 201513209349310951.xml 3.11551e+08 0 1.14522 -0.166949 0.016306 8.22896e+07
616 201523209349303667.xml 2.37386e+08 0 0.219072 0.584131 0.13376 8.96363e+08
617 201523209349306452.xml 9.50743e+08 0 0.0200564 4.18802 0.173939 6.48187e+07
618 201542929349301029.xml 2.2175e+08 0.810727 0.454894 0.820908 0.0177089 2.48663e+08
619 201503149349302640.xml 3.63992e+08 0 1 0 0 1.4504e+08
620 201513149349302391.xml 1.11673e+08 0.79553 0.782778 0.372043 0.0982956 5.73239e+07
621 201503169349303705.xml 3.96084e+08 0 0.00941891 3.57195 0.0725725 9.79746e+07
622 201513109349301611.xml 3.1093e+08 0.729515 0.357613 0.680361 0.0759516 1.29112e+08

623 rows × 7 columns

Results

OneClassSVM determined these 623 National Sized Nonprofits as being financially inefficient, they are failing at one of the metrics, either their liabilities to assets ratio is too high or their program expenses ratio, working captial ratio or surplus margin is too low.