You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Returns the best degree of polynomial formatted as a string"""
190
-
return (
191
-
"\n "
192
-
+f"The best polynomial to describe the given sets' behaviour is the {self.get_full_degree()} degree polynomial"
193
-
ifself.__list_return[5] =="polynomial"
194
-
else"The best regression model to describe the given sets' behaviour is the exponential"
195
-
ifself.__list_return[5] =="expon"
196
-
else"The best regression model to describe the given sets' behaviour is the logarithmic"
197
-
ifself.__list_return[5] =="logarithm"
198
-
else"The best regression model to describe the given sets' behaviour is the sinusoidal"
199
-
ifself.__list_return[5] =="sinusoidal"
200
-
else"The best regression model to describe the given sets' behaviour is the logistic"
201
-
)
190
+
returnf"\n The best polynomial to describe the given sets' behaviour is the {self.get_full_degree()} degree polynomial"ifself.__list_return[5] =="polynomial"elsef"The best regression model to describe the given sets' behaviour is the {'exponential'ifself.__list_return[5] =='expon'elseself.__list_return[5]}"
191
+
192
+
202
193
203
194
defcoefficient_of_determination(self) ->str:
204
195
"""Returns the coefficient of determination (R²) formatted as a string"""
205
-
return"\n"+f"It has a coefficient of determination of {self.get_r2():.4f}"
196
+
returnf"\n It has a coefficient of determination of {self.get_r2():.4f}"
206
197
207
198
def__r2_interpretation(self) ->str:
208
199
"""Returns the coefficient of determination interpretation if needed"""
209
200
ifself.get_r2() <0.45:
210
-
return (
211
-
"\n"
212
-
+f"This index being low, represents it is not possible to find any reliably predictable behaviour given the previous datasets, therefore the actual accuracy for the predictions will be low and highly dependent on chance"
213
-
)
201
+
return"\nThis index being low, represents it is not possible to find any reliably predictable behaviour given the previous datasets, therefore the actual accuracy for the predictions will be low and highly dependent on chance"
202
+
214
203
ifself.get_r2() <0.6:
215
-
return (
216
-
"\n"
217
-
+f"This index represents the predictions will not have optimal accuracy when making predictions since the given datasets don't set up an ideal predictable behaviour"
218
-
)
204
+
return"\nThis index represents the predictions will not have optimal accuracy when making predictions since the given datasets don't set up an ideal predictable behaviour"
205
+
219
206
return""
220
207
221
208
defequation_text(self) ->str:
222
209
"""Returns the polinomial equation formatted as a string"""
223
-
return (
224
-
"\n "
225
-
+f"The equation can be written as {self.equation_string()}"
226
-
+"\n and makes predictions via the get_prediction function\n"
227
-
)
210
+
returnf"\nThe equation can be written as {self.equation_string()}\n and makes predictions via the get_prediction function\n"
228
211
229
212
defcorrelation(self) ->float:
230
213
"""returns the correlation between the two datasets"""
Copy file name to clipboardExpand all lines: setup.py
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
# This call to setup() does all the work
11
11
setup(
12
12
name="polynomial_regression_model",
13
-
version="3.1.4",
13
+
version="3.1.5",
14
14
description="Python package that analyses the given datasets and comes up with the best regression representation with either the smallest polynomial degree possible, to be the most reliable without overfitting or other models such as exponentials and logarithms",
0 commit comments