Skip to content

Commit

Permalink
adds KNeighborRegressor
Browse files Browse the repository at this point in the history
  • Loading branch information
lacava committed Oct 6, 2016
1 parent 8e24952 commit 3720b89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion few/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"""

__version__ = '0.0.2'
__version__ = '0.0.3'
8 changes: 5 additions & 3 deletions few/few.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sklearn.svm import SVR, LinearSVR, SVC, LinearSVC
from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
from sklearn.cross_validation import train_test_split
from sklearn.metrics import r2_score, accuracy_score
from sklearn.preprocessing import Imputer
Expand Down Expand Up @@ -124,7 +124,8 @@ def __init__(self, population_size=100, generations=100,
type(DecisionTreeClassifier()): 'gini',
type(DecisionTreeRegressor()): 'gini',
type(DistanceClassifier()): 'silhouette',
type(KNeighborsClassifier()): 'silhouette'
type(KNeighborsClassifier()): 'silhouette',
type(KNeighborsRegressor()): 'mse',
}
if not self.fit_choice:
self.fit_choice = default_fitchoice[type(self.ml)]
Expand Down Expand Up @@ -590,7 +591,8 @@ def float_range(value):
'dtc': DecisionTreeClassifier(),
'dtr': DecisionTreeRegressor(),
'dc': DistanceClassifier(),
'knn': KNeighborsClassifier(),
'knc': KNeighborsClassifier(),
'knr': KNeighborsRegressor(),
None: None
# 'dist': DistanceClassifier(),
}
Expand Down

0 comments on commit 3720b89

Please sign in to comment.