diff --git a/Python/rough-sanket.py b/Python/rough-sanket.py index 80900d6..6860b55 100644 --- a/Python/rough-sanket.py +++ b/Python/rough-sanket.py @@ -78,4 +78,15 @@ def plotCorrMatrix(data,title='Continuous Feature Correlation Figure 1'): original_pca = pd.read_csv('data/pca_data.csv') -exp_variance = list(pca.explained_variance_ratio_) \ No newline at end of file +exp_variance = list(pca.explained_variance_ratio_) + +# Try random forest and other classification techniques like SVM +from sklearn.ensemble import RandomForestClassifier +from sklearn.model_selection import cross_val_score +import pandas as pd +import numpy as np + +training_data = pd.read_csv('../data/pca_data.csv') +rf = RandomForestClassifier(n_estimators = 10, n_jobs=-1) +scores = cross_val_score(rf, training_data.iloc[:,:-1], training_data.iloc[:,-1], cv = 10) +print scores \ No newline at end of file