mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
analysis.py v 1.1.11.004
This commit is contained in:
parent
1717cc17a1
commit
0ba3a56ea7
@ -7,10 +7,12 @@
|
|||||||
# current benchmark of optimization: 1.33 times faster
|
# current benchmark of optimization: 1.33 times faster
|
||||||
# setup:
|
# setup:
|
||||||
|
|
||||||
__version__ = "1.1.11.003"
|
__version__ = "1.1.11.004"
|
||||||
|
|
||||||
# changelog should be viewed using print(analysis.__changelog__)
|
# changelog should be viewed using print(analysis.__changelog__)
|
||||||
__changelog__ = """changelog:
|
__changelog__ = """changelog:
|
||||||
|
1.1.11.004:
|
||||||
|
- bug fixes
|
||||||
1.1.11.003:
|
1.1.11.003:
|
||||||
- bug fixes
|
- bug fixes
|
||||||
1.1.11.002:
|
1.1.11.002:
|
||||||
@ -378,7 +380,6 @@ def trueskill(teams_data, observations):#teams_data is array of array of tuples
|
|||||||
|
|
||||||
return Trueskill.rate(teams_data, observations)
|
return Trueskill.rate(teams_data, observations)
|
||||||
|
|
||||||
@jit(forceobj=True)
|
|
||||||
class RegressionMetrics():
|
class RegressionMetrics():
|
||||||
|
|
||||||
def __new__(self, predictions, targets):
|
def __new__(self, predictions, targets):
|
||||||
@ -397,7 +398,6 @@ class RegressionMetrics():
|
|||||||
|
|
||||||
return math.sqrt(sklearn.metrics.mean_squared_error(targets, predictions))
|
return math.sqrt(sklearn.metrics.mean_squared_error(targets, predictions))
|
||||||
|
|
||||||
@jit(forceobj=True)
|
|
||||||
class ClassificationMetrics():
|
class ClassificationMetrics():
|
||||||
|
|
||||||
def __new__(self, predictions, targets):
|
def __new__(self, predictions, targets):
|
||||||
@ -479,8 +479,6 @@ def knn_regressor(data, outputs, test_size, n_neighbors = 5, weights = "uniform"
|
|||||||
|
|
||||||
return model, RegressionMetrics(predictions, outputs_test)
|
return model, RegressionMetrics(predictions, outputs_test)
|
||||||
|
|
||||||
|
|
||||||
@jit(forceobj=True)
|
|
||||||
class NaiveBayes:
|
class NaiveBayes:
|
||||||
|
|
||||||
def guassian(self, data, labels, test_size = 0.3, priors = None, var_smoothing = 1e-09):
|
def guassian(self, data, labels, test_size = 0.3, priors = None, var_smoothing = 1e-09):
|
||||||
@ -519,7 +517,6 @@ class NaiveBayes:
|
|||||||
|
|
||||||
return model, ClassificationMetrics(predictions, labels_test)
|
return model, ClassificationMetrics(predictions, labels_test)
|
||||||
|
|
||||||
@jit(forceobj=True)
|
|
||||||
class SVM:
|
class SVM:
|
||||||
|
|
||||||
class CustomKernel:
|
class CustomKernel:
|
||||||
|
Loading…
Reference in New Issue
Block a user