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
This is the first time I've looked into machine learning but I have a use case I'd like to test with it.
To get started I've created a simple example from the house pricing scenario which somewhat closely matches my use case but the results I'm getting are not at all close to what I expected. The data I'm providing is simply linear in terms of just the SqftLiving input parameter to the Price where Price = SqftLiving * 100. The SqftLot is held constant for training and prediction so it should be a non-factor.
I'm just trying to predict the Price when the SqftLiving is 1500 which with the linear model created by the provided data should make it about $150,000.
However, the results I get vary wildly from the negative to the postive 10's of millions every time I run the program which is unexpected. Could someone look into this simple example and let me know what if anything I'm doing is causing these poor results?
Hello Tyler.
Let me point on the fact what you have only 3 data points, and our algorithms expected to be worked on millions of data points, with huge feature vector. For you as a person. it's obvious what formula states behind this 3 points, but from machine point of view, 3 points is not enough.
I've made following change in your code:
Random random = new Random();
StringBuilder sb = new StringBuilder();
for ( int i = 0; i < n; i++)
{
var sqft = random.NextDouble();
sb.AppendLine(string.Format("{0},{1},8000", sqft*10, sqft ));
}
File.WriteAllText(filePath, sb.ToString());
And I played with different values for n.
n=100 gives me prediction for your example around 141 000 which is about 6% error.
n=1000 gives me prediction 14910 which 0.6% error
n=100000 gives me 14992 which is 0.06% error
So the more data you give to algorithm, the better it performs.
You can also play with different learning models. For example if I modify my generating code to make var sqft = random.NextDouble() *10_000;
to reflect real values for square foots I can use FastTreeRegressor, and it will give me reasonable prediction (2% error) even with 100 examples.
@Ivanidzo4ka Thanks for the insight and the follow up with more data point results. I look forward to playing with this some more where I'll have a much larger data set.
Activity
Ivanidzo4ka commentedon May 7, 2018
Hello Tyler.
Let me point on the fact what you have only 3 data points, and our algorithms expected to be worked on millions of data points, with huge feature vector. For you as a person. it's obvious what formula states behind this 3 points, but from machine point of view, 3 points is not enough.
I've made following change in your code:
And I played with different values for n.
n=100 gives me prediction for your example around 141 000 which is about 6% error.
n=1000 gives me prediction 14910 which 0.6% error
n=100000 gives me 14992 which is 0.06% error
So the more data you give to algorithm, the better it performs.
You can also play with different learning models. For example if I modify my generating code to make
var sqft = random.NextDouble() *10_000;to reflect real values for square foots I can use FastTreeRegressor, and it will give me reasonable prediction (2% error) even with 100 examples.
TylerBrinkley commentedon May 7, 2018
@Ivanidzo4ka Thanks for the insight and the follow up with more data point results. I look forward to playing with this some more where I'll have a much larger data set.
Revert "Set Nullable Auto params to null values" (dotnet#53)
code migration from machinelearning-automl to machinelearning repo fe…
Revert "Set Nullable Auto params to null values" (dotnet#53)
Added onnx export functionality for LpNormNormalizingTransformer (#4161)
Added Onnx export functionality to PCATransformer (#4188)