interface between the Quandl financial database and Octave - octave

I'm using Octave 4.2.1 and trying to import financial data into Octave. Following these instructions from Quandl site:
https://github.com/tradingjunkie/OctaveQuandlInterface
addpath('/path/to/OctaveQuandlInterface') --Ok
and I start by defining an Octave structure
Quandl.auth = token;--NOK
I got this message: "error: 'token' undefined near line 1 column 15"
Some help please.
Regards
Matt

Related

Loading XGBoost Model: ModuleNotFoundError: No module named 'sklearn.preprocessing._label'

I'm having issues loading a pretrained xgboost model using the following code:
xgb_model = pickle.load(open('churnfinalunscaled.pickle.dat', 'rb'))
And when I do that, I get the following error:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-29-31e7f426e19e> in <module>()
----> 1 xgb_model = pickle.load(open('churnfinalunscaled.pickle.dat', 'rb'))
ModuleNotFoundError: No module named 'sklearn.preprocessing._label'
I haven't seen anything online so any help would be much appreciated.
I was able to solve my issue. Simply update scikit-learn from 0.21.3 to 0.22.0 seems to solve the issue. Along the way I have to update my pandas version to 0.25.2 as well.
The cue is provided in this link: https://www.gitmemory.com/vruusmann, where it states:
During Scikit-Learn version upgrade from 0.21.X to 0.22.X many modules were renamed (typically, by prepending an underscore character to the module name). For example, sklearn.preprocessing.label.LabelEncoder became sklearn.preprocessing._label.LabelEncoder.

Fixing GNU Octave without science repo in openSUSE

I am a user of openSUSE 13.2. While updating the openSUSE, the system stopped working properly (for example, unable to open firefox, or software management in yast2. Snapper does not work to fix that). So I used DVD openSUSE 13.2 to upgrade (update) and it managed to fix it. However, some applications such as GNU Octave is not working. I am able to open it and run it but it gives me errors with compiling example code. Errors such as missing libraries etc. I do not want to jump to openSUSE 15 with so much hassle with it. I just want to fix Octave for now. However, science repository for openSUSE 13.2 is no longer active. I have GNU Octave v. 3.8 and if possible I would like to update octave to latest version with all the octave packages available. How I do it without science repository available for openSUSE 13.2. Is it okay to use repo of other openSUSE version say SLE?
Below is a sample code:
x = -10:0.1:10;
c=pi
d=exp(0)
f1 = sin(x);
f2 = c.^(1/4)* x.*exp((-1/2)*x.^2);
plot(x,f1,'-r',x,f2,'-b')
title ("psi(x) at n=0 and n=1 for x = -10:0.1:10");
xlabel ("x");
ylabel ("psi(x)");
text (0.6, 1.2, "psi at n=0");
text (-0.6, -0.8, "psi at n=1");
legend ('psi-0(x)','psi-1(x)');
and the GNU Octave output is
error: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/PKG_ADD: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/__init_fltk__.oct: failed to load: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/__init_fltk__.oct: undefined symbol: _ZN9Fl_Window6cursorE9Fl_Cursor
error: called from:
error: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/PKG_ADD at line 6, column 1
GNU Octave, version 3.8.2
Copyright (C) 2014 John W. Eaton and others.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-suse-linux-gnu".
For information about changes from previous versions, type 'news'.
warning: function /home/adam/OctaveExamples/waitbar.m shadows a core library function
warning: function /home/adam/OctaveExamples/plot3.m shadows a core library function
plot1
c = 3.1416
d = 1
error: default graphics toolkit 'fltk' is not available!
error: base_graphics_toolkit::initialize: invalid graphics toolkit
error: called from:
error: /usr/share/octave/3.8.2/m/plot/util/figure.m at line 94, column 9
error: /usr/share/octave/3.8.2/m/plot/util/gcf.m at line 63, column 9
error: /usr/share/octave/3.8.2/m/plot/util/newplot.m at line 113, column 8
error: /usr/share/octave/3.8.2/m/plot/draw/plot.m at line 219, column 9
error: /home/adam/OctaveExamples/plot1.m at line 6, column 1
the code was working before the openSUSE mulfunctioned. After the fix, octave seems to be broken.

Error on Reading in a json file with Spark R

I am trying to follow a tutorial in SparkR. I follow the setup as required. But as soon as I try the function "read.json(path)" I get the following error:
"Error in invokeJava(isStatic = FALSE, objId$id, methodName, ...) :
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)..."
I am running R 3.3.2 and Java JDK 1.8 as requested in the tutorial.
I attach images of the code and the results:
Is my Java being found, is it the right version?
The image is in R studio showing the code on the left and the console result on the right:
Solution:
The spark-submit or sparkR instance is there.
Using the hdfs//...path put the json file on the Hadoop hdfs:
hadoop-2.0.2\bin> hadoop fs -put "/example/../people.json" "/user/../people.json"
Then use
people <- read.df (sqlContext, "/user/../people.json","json")
to read the json and create dataframe 'people'.
Above steps worked for me after I made necessary changes in the example dataframe.R.

mxGetProperty function in octave

I'm trying to adopt some C-coded matlab module to octave. mkoctave returns batch of warning, but no errors and generates mex file. However octave cannot load this file and returns an error:
error: JustKmodel.m: /home/simulations/exampls/RetinalMap-master/stepFastGlobal.mex:
failed to load: /home/simulations/exampls/RetinalMap-master/stepFastGlobal.mex: undefined symbol: mxGetProperty
As far as I can understand there is no such function GetProperty or library isn't available.
I'll appreciate any ideas how to work around this problem

Flood analysis using Arcgis

Hi every one I am using HEC-GeoRAS 10.1 for ArcGIS 10.1 and HEC-RAS 4.1.0, after performing the HEC-GeoRAS basic tutorial I successfully exported the GIS layer for HEC-RAS now when i import this layer in HEC-RAS it shows an error 'Runtime error 9, subscript out of range'.
Can any one help me in this issue?
Try uninstalling ApFramework.
Read this (last post):
http://forums.esri.com/Thread.asp?c=93&f=1149&t=249290