Sergey I rather like your curve fitting charts - in fact I think the whole Charts product is really well done - so thanks for a lot of great work.
One use I have been making of your trendlines is to simply fit curves to data points with the intention of then using the results inside a new piece of javascript that makes use of the equation. Typically the coefficients one generates are not nice round numbers so its really helpful if one can just cut and paste them into one's javascript to avoid transcription errors. In fact being able to cut and paste an expression which included the coefficients that was in javascript would be really useful - its so easy to make a minor error and its quite hard to check. So I think I'm saying an array of coefficients would be really helpful but also some sort of standard output which one could have appear in the chart on screen which could be scraped off the screen and pasted into some code would work for me. What would be REALLY awesome would be the ability to do multiple non-linear regression and then have the coefficients of the model in a form where they could be assigned to javascript variables. That way it would be possible to build something that got a better and better fit as more data were fed its way instead of doing the analysis off-line and updating things from time to time. Sorry - thats not what you asked - but hey, I just thought I would mention it. Cheers, Bryan On Tuesday, October 28, 2014 6:33:35 PM UTC, Sergey wrote: > > Dearest Google Charts users, > > > We have been working hard on improving charts, and now need your input. We > are considering adding a few methods to our corecharts to help you get data > about your trendlines, such as the r^2 value. However, we're not quite sure > how you’ll want to use them. We know that we want a method to get the > trendline r^2 value, and we think that getting an evaluator function for a > trendline would be useful as well; but we also want to give you the ability > to pull out the trendline expression. Here's where things get a bit blurry. > > > We could do the simple thing, and simply create a method that returns the > plaintext equation. This would allow you to show the equation elsewhere on > the page. You might also parse it, but parsing can be hard, so we’ll > provide some utilities to help with that. Some alternatives to mitigate > this issue would be: > > - > > to return a JSON form an abstract syntax tree > <http://en.wikipedia.org/wiki/Abstract_syntax_tree> of the equation, > an example might be: > - > > y = 2x + 1: {operation: '=', operands: ['y', {operation: '+', > operands: [{operation: '*', operands: [2, 'x']}, 1]}]} > - > > to return a Lisp/Scheme-like abstract syntax tree, using arrays and > prefix notation. An example of that might be: > - > > y = 2x + 1: ['=', 'y', ['+', [2, 'x'], 1]] > - > > to return an array of coefficients, possibly with the type of the > trendline: > - > > 2x + 1: {type: 'linear', coefficients: [2, 1]} > - > > exp(5x + 3): {type: 'exponential', coefficients: [5, 3]} > > > We can also return an abstract syntax tree as well as a plaintext form, > though that is getting a bit redundant. So, what are your thoughts here? > Your opinions are most welcome. > > > Happy Coding, > > Sergey and the rest of the Google Charts Team > > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
