• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

?Solve this question in eclipse or spark-shell command prompt using Scala?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a sample data set of water level in the format given below. I have to predict the future water level by analyzing this data set.

Date,POONDI,CHOLAVARAM,REDHILLS,CHEMBARAMBAKKAM
01-03-2019,477,48,520,22
02-03-2019,478,48,513,21
03-03-2019,475,48,506,20
04-03-2019,472,48,499,19
05-03-2019,469,48,492,18
06-03-2019,466,47,485,18
07-03-2019,462,47,477,18
08-03-2019,458,47,470,18
09-03-2019,453,47,463,17
10-03-2019,448,47,456,17
11-03-2019,443,47,449,17
12-03-2019,439,47,442,17
13-03-2019,433,47,435,16
14-03-2019,429,47,428,16
15-03-2019,424,47,420,15
16-03-2019,420,47,413,15
17-03-2019,415,47,406,15
18-03-2019,411,47,399,14
19-03-2019,406,47,392,14
20-03-2019,406,47,392,14
21-03-2019,396,47,377,13
22-03-2019,391,47,370,13
23-03-2019,386,47,363,13
The output should be like the user should pass the date (date in future) as input and the system should give the water level during that date..This should be solved in spark-shell or eclipse using scala. Please help me
 
Marshal
Posts: 74341
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

We don't give out complete answers; please show us what you have got so far, and explain how you are going to solve this problem.
 
Bartender
Posts: 4667
183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you familiar with linear regression? I woud start by doing a linear regression between the left column and the following column, since the waterlevels (if that is what the second column is) are clearly dependent on the date. Now, either you look for a library that can handle such regressions (I know that Apache has a dedicated library), search the internet for appropriate formulas, or you can use my Matrix class, that has an in-built linear regression. Matrix.java
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic