Message Boards Message Boards

0
|
12115 Views
|
8 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

How can I perform exponential regression analysis on an uploaded data set?

Posted 9 years ago

I have two columns, ten rows. Column A contains x values; column B contains y values. These are in a CSV file, which uploads fine. I want to use "exponential fit" against this data.

To be clear, I can upload the CSV file. Conversely I can manually input the data and use "exponential fit" in the command line with that data. I want to combine these two steps: I want to use "exponential fit" against a large CSV.

Thanks for any suggestions.

Bruce

POSTED BY: Bruce Rhodewalt
8 Replies

may be you can look at NonlinearModelFit ? Something like

model = NonlinearModelFit[myData, a*Exp[b*x], {a,b}, x];
model["BestFitParameters"]

see https://reference.wolfram.com/language/ref/NonlinearModelFit.html for more examples

POSTED BY: Nasser M. Abbasi

Thank you. Your suggestion is probably good, but I'm looking for commands I can enter into the Wolfram command line, or some other way to run "exponential fit" against my uploaded data.

POSTED BY: Bruce Rhodewalt

When you say "Wolfram Command Line", do you mean "Wolfram Alpha"?

POSTED BY: Sean Clarke

Yes. Sorry for the ambiguity. I mean the search field (with the equal-sign submit button) at wolframalpha.com.

POSTED BY: Bruce Rhodewalt

Here is a list of examples of what kinds of things Wolfram|Alpha does with uploaded data:

http://www.wolframalpha.com/examples/DataInput.html

In particular it looks like this is an example of a nonlinear regression:

http://www.wolframalpha.com/input/?i=timeseries+statistics&examplefile=1&lk=3&datasetfile=DataInput/dates-numbers

Wolfram|Alpha is really kinda loose and does exploratory stuff for you. If you have something specific in mind, I would use Mathematica Online and the code provided above.

POSTED BY: Sean Clarke

Thank you. That helps, although I can't see what my options are for the words following the uploaded data. (My original question was about syntax and available commands/expressions/functions.) I'll look for "time series" and see what related options I might have.

I'm a high school teacher, and I don't want to spend too much time teaching a programming language to the students. I want to take the data and process it, with a little more power than Desmos, a little more availability than the commands on a TI graphing calculator. I hope that makes sense.

POSTED BY: Bruce Rhodewalt

Obviously, I haven't made myself clear. I'll try again.

I can do this: http://www.wolframalpha.com/input/?i=exponential+fit+%7B%280%2C185%29%2C%281%2C170%29%2C%282%2C160%29%2C%283%2C152%29%2C%284%2C145%29%2C%285%2C140%29%2C%286%2C135%29%2C%287%2C130%29%2C%288%2C126%29%7D

At www.wolframalpha.com, I can click a File Upload icon and upload a CSV with two columns (containing the data shown in the link above). The search field now contains an icon representing my uploaded file. I want to type "exponential fit" after this file icon and get the results shown in the link above.

If I do type "exponential fit" and click the Equal Sign icon, I get this error message: Using closest Wolfram|Alpha interpretation: exponential

Thanks for your help.

Bruce

Attachments:
POSTED BY: Bruce Rhodewalt

Here are some examples where you enter the data directly into the bar:


exponential fit of {1,2,4,7,17}

http://www.wolframalpha.com/input/?i=exponential%20fit%20of%20%7B1%2C2%2C4%2C7%2C17%7D

exponential fit of {{0,1},{2,2},{4,4},{6,7},{8,17}}

http://www.wolframalpha.com/input/?i=exponential%20fit%20of%20%7B1%2C2%2C4%2C7%2C17%7D


There are no examples showing how this can be done with a dataset. I am not aware of any. It's very possible that the Wolfram|Alpha doesn't recognize that query yet for datasets. If a query doesn't work that you expect to, you can contact the Wolfram|Alpha team and leave them a suggestion at the bottom of the results page. This helps them know where to focus the future developement of Wolfram|Alpha.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract