I did forecasting using Random Forest. But the "pred" values after fitting the model are
coming out to be the same. I have tried my best to fix it but couldn't. Please go through my
code and comment.
# Reading the file
import pandas as pd
import numpy as np
import datetime
import warnings
warnings.filterwarnings('ignore')
df=pd.read_csv(r'C:\Users\Krish Ghosh\Desktop\BSE Sensex.csv', usecols=[1])
df.head()
# Defining Lags
df['Close Lag1']=df['Close'].shift(+1)
df['Close Lag2']=df['Close'].shift(+2)
df['Close Lag3']=df['Close'].shift(+3)
df
# To drop the NaN values
df=df.dropna()
df
# To concatenate
import numpy as np
X1,X2,X3,Y=df['Close Lag1'],df['Close Lag2'],df['Close Lag3'],df['Close']
X1,X2,X3,Y=np.array(X1),np.array(X2),np.array(X3),np.array(Y)
X1,X2,X3,Y=X1.reshape(-1,1),X2.reshape(-1,1),X3.reshape(-1,1),Y.reshape(-1,1)
X =np.concatenate((X3,X2,X1),axis=1)
print(X)
# To split into Training and Testing
trainX = X[:-70]
testX = X[-70:]
trainY = Y[:-70]
testY = Y[-70:]
# Random Forest Regressor
from sklearn.ensemble import RandomForestRegressor
model=RandomForestRegressor(n_estimators=100,max_features=3, random_state=1)
# To fit the model and to predict
model.fit(trainX,trainY)
predX = model.predict(testX)
# To print
print(predX)
55697.0029 55697.0029 55639.2479 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029 55697.0029 55697.0029
55697.0029 55697.0029 55697.0029 55697.0029
As you can see all the values are same (which is absurd). Please let me know where I am wrong.
Thanks in advance.
Related
I have created a node.js application to create a SOAP Request BODY from a JSON object. I have the following code
var convert = require('xml-js');
var xml = `<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/" xmlns:tel="http://schemas.datacontract.org"
xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soapenv:Header/>
<soapenv:Body>
<tem:MyRequest>
<tem:request>
<tel:MyTag1>null</tel:MyTag1>
<tel:MyTag2>12</tel:MyTag2>
<tel:MyTag3>MyValue1</tel:MyTag3>
<tel:MyTag4><arr:int>1000</arr:int>
<arr:int>1001</arr:int><arr:int>1002</arr:int>
</tel:MyTag4>
</tem:request>
</tem:MyRequest>
</soapenv:Body>
</soapenv:Envelope>`;
var options = { ignoreComment: false, alwaysChildren: true };
var result1 = convert.xml2js(xml, options);
console.log("json = ",JSON.stringify(result1));
var options2 = {compact: true, ignoreComment: true, spaces: 4};
var result2 = convert.json2xml(result1, options2);
console.log("xml ==> ",result2);
I got output like this
json = {"elements":[{"type":"element","name":"soapenv:Envelope","attributes":{"xmlns:soapenv":"http://schemas.xmlsoap.org/soap/envelope/","xmlns:tem":"http://tempuri.org/","xmlns:tel":"http://schemas.datacontract.org","xmlns:arr":"http://schemas.microsoft.com/2003/10/Serialization/Arrays"},"elements":[{"type":"element","name":"soapenv:Header","elements":[]},{"type":"element","name":"soapenv:Body","elements":[{"type":"element","name":"tem:MyRequest","elements":[{"type":"element","name":"tem:request","elements":[{"type":"element","name":"tel:MyTag1","elements":[{"type":"text","text":"null"}]},{"type":"element","name":"tel:MyTag2","elements":[{"type":"text","text":"12"}]},{"type":"element","name":"tel:MyTag3","elements":[{"type":"text","text":"MyValue1"}]},{"type":"element","name":"tel:MyTag4","elements":[{"type":"element","name":"arr:int","elements":[{"type":"text","text":"1000"}]},{"type":"element","name":"arr:int","elements":[{"type":"text","text":"1001"}]},{"type":"element","name":"arr:int","elements":[{"type":"text","text":"1002"}]}]}]}]}]}]}]}
xml ==> <elements>
<type>element</type>
<name>soapenv:Envelope</name>
<attributes>
<xmlns:soapenv>http://schemas.xmlsoap.org/soap/envelope/</xmlns:soapenv>
<xmlns:tem>http://tempuri.org/</xmlns:tem>
<xmlns:tel>http://schemas.datacontract.org</xmlns:tel>
<xmlns:arr>http://schemas.microsoft.com/2003/10/Serialization/Arrays</xmlns:arr>
</attributes>
<elements>
<type>element</type>
<name>soapenv:Header</name>
</elements>
<elements>
<type>element</type>
<name>soapenv:Body</name>
<elements>
<type>element</type>
<name>tem:MyRequest</name>
<elements>
<type>element</type>
<name>tem:request</name>
<elements>
<type>element</type>
<name>tel:MyTag1</name>
<elements>
<type>text</type>
<text>null</text>
</elements>
</elements>
<elements>
<type>element</type>
<name>tel:MyTag2</name>
<elements>
<type>text</type>
<text>12</text>
</elements>
</elements>
<elements>
<type>element</type>
<name>tel:MyTag3</name>
<elements>
<type>text</type>
<text>MyValue1</text>
</elements>
</elements>
<elements>
<type>element</type>
<name>tel:MyTag4</name>
<elements>
<type>element</type>
<name>arr:int</name>
<elements>
<type>text</type>
<text>1000</text>
</elements>
</elements>
<elements>
<type>element</type>
<name>arr:int</name>
<elements>
<type>text</type>
<text>1001</text>
</elements>
</elements>
<elements>
<type>element</type>
<name>arr:int</name>
<elements>
<type>text</type>
<text>1002</text>
</elements>
</elements>
</elements>
</elements>
</elements>
</elements>
</elements>
There is a mismatch from input xml and final xml. why this?
I would like to render a watch in SVG. I have the circles and now I would like to render the index for the hours and minutes.
svg {
width: 100vmin;
height: 100vmin;
overflow: hidden;
}
line, circle {
stroke: black;
stroke-width: 0.3px;
}
circle {
fill: none;
}
circle.filled {
stroke: none;
fill: black;
}
<svg viewBox="0 0 100 100">
<!-- center dot -->
<circle cx="50" cy="50" r="1" class="filled" />
<!-- hour circle -->
<circle cx="50" cy="50" r="35" />
<line x1="50" y1="17" x2="50" y2="15" />
<!-- minute circle -->
<circle cx="50" cy="50" r="40" />
<line x1="50" y1="10" x2="50" y2="8" />
</svg>
I know that I can use the transform attribute to rotate the lines around the center. But how to express the loop in SVG to do it 59 times for the minutes and 11 times for the hours? Do I have to use JavaScript for this, or is it possible to draw the lines directly in SVG without writing 72 line elements? Something less verbose than this:
<line x1='50' y1='17' x2='50' y2='15' id='h0' />
<use href='#h0' transform='rotate ( 30, 50, 50)' />
<use href='#h0' transform='rotate ( 60, 50, 50)' />
<use href='#h0' transform='rotate ( 90, 50, 50)' />
<use href='#h0' transform='rotate (120, 50, 50)' />
<use href='#h0' transform='rotate (150, 50, 50)' />
<use href='#h0' transform='rotate (180, 50, 50)' />
<use href='#h0' transform='rotate (210, 50, 50)' />
<use href='#h0' transform='rotate (240, 50, 50)' />
<use href='#h0' transform='rotate (270, 50, 50)' />
<use href='#h0' transform='rotate (300, 50, 50)' />
<use href='#h0' transform='rotate (330, 50, 50)' />
and this
<line x1='50' y1='10' x2='50' y2='8' id='m0' />
<use href='#h0' transform='rotate ( 30, 50, 50)' />
<use href='#m0' transform='rotate ( 6, 50, 50)' />
<use href='#m0' transform='rotate ( 12, 50, 50)' />
<use href='#m0' transform='rotate ( 18, 50, 50)' />
<use href='#m0' transform='rotate ( 24, 50, 50)' />
<use href='#m0' transform='rotate ( 30, 50, 50)' />
<use href='#m0' transform='rotate ( 36, 50, 50)' />
<use href='#m0' transform='rotate ( 42, 50, 50)' />
<use href='#m0' transform='rotate ( 48, 50, 50)' />
<use href='#m0' transform='rotate ( 54, 50, 50)' />
<use href='#m0' transform='rotate ( 60, 50, 50)' />
<use href='#m0' transform='rotate ( 66, 50, 50)' />
<use href='#m0' transform='rotate ( 72, 50, 50)' />
<use href='#m0' transform='rotate ( 78, 50, 50)' />
<use href='#m0' transform='rotate ( 84, 50, 50)' />
<use href='#m0' transform='rotate ( 90, 50, 50)' />
<use href='#m0' transform='rotate ( 96, 50, 50)' />
<use href='#m0' transform='rotate (102, 50, 50)' />
<use href='#m0' transform='rotate (108, 50, 50)' />
<use href='#m0' transform='rotate (114, 50, 50)' />
<use href='#m0' transform='rotate (120, 50, 50)' />
<use href='#m0' transform='rotate (126, 50, 50)' />
<use href='#m0' transform='rotate (132, 50, 50)' />
<use href='#m0' transform='rotate (138, 50, 50)' />
<use href='#m0' transform='rotate (144, 50, 50)' />
<use href='#m0' transform='rotate (150, 50, 50)' />
<use href='#m0' transform='rotate (156, 50, 50)' />
<use href='#m0' transform='rotate (162, 50, 50)' />
<use href='#m0' transform='rotate (168, 50, 50)' />
<use href='#m0' transform='rotate (174, 50, 50)' />
<use href='#m0' transform='rotate (180, 50, 50)' />
<use href='#m0' transform='rotate (186, 50, 50)' />
<use href='#m0' transform='rotate (192, 50, 50)' />
<use href='#m0' transform='rotate (198, 50, 50)' />
<use href='#m0' transform='rotate (204, 50, 50)' />
<use href='#m0' transform='rotate (210, 50, 50)' />
<use href='#m0' transform='rotate (216, 50, 50)' />
<use href='#m0' transform='rotate (222, 50, 50)' />
<use href='#m0' transform='rotate (228, 50, 50)' />
<use href='#m0' transform='rotate (234, 50, 50)' />
<use href='#m0' transform='rotate (240, 50, 50)' />
<use href='#m0' transform='rotate (246, 50, 50)' />
<use href='#m0' transform='rotate (252, 50, 50)' />
<use href='#m0' transform='rotate (258, 50, 50)' />
<use href='#m0' transform='rotate (264, 50, 50)' />
<use href='#m0' transform='rotate (270, 50, 50)' />
<use href='#m0' transform='rotate (276, 50, 50)' />
<use href='#m0' transform='rotate (282, 50, 50)' />
<use href='#m0' transform='rotate (288, 50, 50)' />
<use href='#m0' transform='rotate (294, 50, 50)' />
<use href='#m0' transform='rotate (300, 50, 50)' />
<use href='#m0' transform='rotate (306, 50, 50)' />
<use href='#m0' transform='rotate (312, 50, 50)' />
<use href='#m0' transform='rotate (318, 50, 50)' />
<use href='#m0' transform='rotate (324, 50, 50)' />
<use href='#m0' transform='rotate (330, 50, 50)' />
<use href='#m0' transform='rotate (336, 50, 50)' />
<use href='#m0' transform='rotate (342, 50, 50)' />
<use href='#m0' transform='rotate (348, 50, 50)' />
<use href='#m0' transform='rotate (354, 50, 50)' />
You can nest use blocks, which might save you some lines, e.g.
circle {
fill: none;
stroke: black;
}
line {
stroke: black;
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<!-- center dot -->
<circle cx="50" cy="50" r="1" class="filled" />
<!-- hour circle -->
<circle cx="50" cy="50" r="35" />
<!-- minute circle -->
<circle cx="50" cy="50" r="40" />
<g id='five-block'>
<line x1="50" y1="17" x2="50" y2="15" />
<line id="minute" x1="50" y1="10" x2="50" y2="8" />
<use href='#minute' transform='rotate (6, 50, 50)' />
<use href='#minute' transform='rotate (12, 50, 50)' />
<use href='#minute' transform='rotate (18, 50, 50)' />
<use href='#minute' transform='rotate (24, 50, 50)' />
</g>
<g id="quarter-block">
<use href='#five-block' transform='rotate (30, 50, 50)' />
<use href='#five-block' transform='rotate (60, 50, 50)' />
<use href='#five-block' transform='rotate (90, 50, 50)' />
</g>
<use href='#quarter-block' transform='rotate (90, 50, 50)' />
<use href='#quarter-block' transform='rotate (180, 50, 50)' />
<use href='#quarter-block' transform='rotate (270, 50, 50)' />
</svg>
You could nest the use blocks even more if you wanted to make it slightly less verbose.
Or you could use Javascript to create the elements.
Since the javascript option hasn't been written out, here is an implementation:
var svg = document.querySelector("svg");
var xmlns = "http://www.w3.org/2000/svg";
var scales = [{ref: 'h0', ticks: 12}, {ref: 'm0', ticks: 60}];
scales.forEach(function(scale){
var ticks = scale.ticks;
var degrees = 360/ticks;
while (ticks) {
var use = document.createElementNS(xmlns, "use");
use.setAttribute("href", "#" + scale.ref);
use.setAttribute("transform", "rotate(" + degrees*ticks + ", 50, 50)")
svg.appendChild(use);
ticks--;
}
});
You can see it in action here: https://jsfiddle.net/dhd8g3tg/
My testng.xml is as given below:
<suite name="Automation Suite" allow-return-values="true" verbose="1" parallel="tests" thread-count="2">
<test name="Login Test cases 01">
<parameter name="Operating_System" value="Windows 8"/>
<parameter name="Browser_Name" value="Internet Explorer"/>
<parameter name="Browser_Version" value="11"/>
<parameter name="Base_URL" value="https://www.google.com"/>
<classes>
<class name="com.automation.tool.Automation_01"/>
<class name="com.automation.tool.Automation_02"/>
</classes>
</test>
<test name="Login Test cases 02">
<parameter name="Operating_System" value="Windows XP"/>
<parameter name="Browser_Name" value="Mozilla Firefox"/>
<parameter name="Browser_Version" value="27"/>
<parameter name="Base_URL" value="https://www.google.com"/>
<classes>
<class name="com.automation.tool.Automation_01"/>
<class name="com.automation.tool.Automation_02"/>
</classes>
</test>
</suite>
Currently the tests are getting executed in parallel. But I wish to execute the classes also in parallel as below:
Thread 01 : Test 01 Class 01
Thread 02 : Test 01 Class 02
Thread 03 : Test 02 Class 01
Thread 04 : Test 02 Class 02
Please let me know, how to configure this setup.
Got it now...
<suite name="Automation Suite" allow-return-values="true" verbose="1" parallel="tests" thread-count="2">
<test name="Login Test cases 01" parallel="classes" thread-count="2">
<parameter name="Operating_System" value="Windows 8"/>
<parameter name="Browser_Name" value="Internet Explorer"/>
<parameter name="Browser_Version" value="11"/>
<parameter name="Base_URL" value="https://www.google.com"/>
<classes>
<class name="com.automation.tool.Automation_01"/>
<class name="com.automation.tool.Automation_02"/>
</classes>
</test>
<test name="Login Test cases 02" parallel="classes" thread-count="2">
<parameter name="Operating_System" value="Windows XP"/>
<parameter name="Browser_Name" value="Mozilla Firefox"/>
<parameter name="Browser_Version" value="27"/>
<parameter name="Base_URL" value="https://www.google.com"/>
<classes>
<class name="com.automation.tool.Automation_01"/>
<class name="com.automation.tool.Automation_02"/>
</classes>
</test>
</suite>
In suite tag change the "parallel" attribute value from "tests" to "classes" for example:
If you wish to execute
tests in parallel then use = parallel="tests"
classes in parallel then use = parallel="classes"
Methods in parallel then use = parallel="methods"
After allocation of USRP, by inserting the appropriate code in the waveform xml file, I connect dataShort_out of USRP to DataConverter input port, such as DataShort but monitoring this port we can find nothing althought the allocation seems work fine. from monitor port panel appears: Call/s = about 30; MB/s = 0; Element/s = 0; Average queue dept = 2% Time=0;
Appended find the sad.xml of my waveform:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE softwareassembly PUBLIC "-//JTRS//DTD SCA V2.2.2 SAD//EN" "softwareassembly.dtd">
<softwareassembly id="DCE:c679e5d8-3193-4a96-9cdb-9f28135f63c9" name="usrp_test_waveform">
<componentfiles>
<componentfile id="DataConverter_6b5c2ee8-0e91-4ed0-af3b-2677f27c21ed" type="SPD">
<localfile name="/components/DataConverter/DataConverter.spd.xml"/>
</componentfile>
<componentfile id="TuneFilterDecimate_4552fe55-6bd9-4fd2-b0ce-ba184199263e" type="SPD">
<localfile name="/components/TuneFilterDecimate/TuneFilterDecimate.spd.xml"/>
</componentfile>
<componentfile id="AmFmPmBasebandDemod_16af112f-1335-424c-a4d6-972c63f1bd43" type="SPD">
<localfile name="/components/AmFmPmBasebandDemod/AmFmPmBasebandDemod.spd.xml"/>
</componentfile>
<componentfile id="multiply_const_ff_abfee3c0-41de-42a3-b3ae-b2ba1a2fca50" type="SPD">
<localfile name="/components/gnuhawk/gr/multiply_const_ff/current/multiply_const_ff.spd.xml"/>
</componentfile>
<componentfile id="AudioSink_2e8025e4-743f-4387-b129-bb15a4e1992b" type="SPD">
<localfile name="/components/AudioSink/AudioSink.spd.xml"/>
</componentfile>
</componentfiles>
<partitioning>
<componentplacement>
<componentfileref refid="DataConverter_6b5c2ee8-0e91-4ed0-af3b-2677f27c21ed"/>
<componentinstantiation id="DataConverter_1" startorder="4">
<usagename>DataConverter_1</usagename>
<findcomponent>
<namingservice name="DataConverter_1"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="TuneFilterDecimate_4552fe55-6bd9-4fd2-b0ce-ba184199263e"/>
<componentinstantiation id="TuneFilterDecimate_1" startorder="5">
<usagename>TuneFilterDecimate_1</usagename>
<findcomponent>
<namingservice name="TuneFilterDecimate_1"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="AmFmPmBasebandDemod_16af112f-1335-424c-a4d6-972c63f1bd43"/>
<componentinstantiation id="AmFmPmBasebandDemod_1" startorder="1">
<usagename>AmFmPmBasebandDemod_1</usagename>
<findcomponent>
<namingservice name="AmFmPmBasebandDemod_1"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="TuneFilterDecimate_4552fe55-6bd9-4fd2-b0ce-ba184199263e"/>
<componentinstantiation id="TuneFilterDecimate_2" startorder="2">
<usagename>TuneFilterDecimate_2</usagename>
<findcomponent>
<namingservice name="TuneFilterDecimate_2"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="multiply_const_ff_abfee3c0-41de-42a3-b3ae-b2ba1a2fca50"/>
<componentinstantiation id="multiply_const_ff_1" startorder="3">
<usagename>multiply_const_ff_1</usagename>
<findcomponent>
<namingservice name="multiply_const_ff_1"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="DataConverter_6b5c2ee8-0e91-4ed0-af3b-2677f27c21ed"/>
<componentinstantiation id="DataConverter_2" startorder="0">
<usagename>DataConverter_2</usagename>
<findcomponent>
<namingservice name="DataConverter_2"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
<componentplacement>
<componentfileref refid="AudioSink_2e8025e4-743f-4387-b129-bb15a4e1992b"/>
<componentinstantiation id="AudioSink_1" startorder="6">
<usagename>AudioSink_1</usagename>
<findcomponent>
<namingservice name="AudioSink_1"/>
</findcomponent>
</componentinstantiation>
</componentplacement>
</partitioning>
<assemblycontroller>
<componentinstantiationref refid="DataConverter_2"/>
</assemblycontroller>
<connections>
<connectinterface id="usrpAllocation">
<usesport>
<usesidentifier>dataShort_out</usesidentifier>
<deviceusedbyapplication usesrefid="DCE:18964b3d-392e-4b98-a90d-0569b5d46ffe"/>
</usesport>
<providesport>
<providesidentifier>dataShort</providesidentifier>
<componentinstantiationref refid="DataConverter_2"/>
</providesport>
</connectinterface>
<connectinterface id="connection_1">
<usesport>
<usesidentifier>dataFloat_Out</usesidentifier>
<componentinstantiationref refid="TuneFilterDecimate_1"/>
</usesport>
<providesport>
<providesidentifier>dataFloat_In</providesidentifier>
<componentinstantiationref refid="AmFmPmBasebandDemod_1"/>
</providesport>
</connectinterface>
<connectinterface id="connection_2">
<usesport>
<usesidentifier>fm_dataFloat_out</usesidentifier>
<componentinstantiationref refid="AmFmPmBasebandDemod_1"/>
</usesport>
<providesport>
<providesidentifier>dataFloat_In</providesidentifier>
<componentinstantiationref refid="TuneFilterDecimate_2"/>
</providesport>
</connectinterface>
<connectinterface id="connection_3">
<usesport>
<usesidentifier>float_out</usesidentifier>
<componentinstantiationref refid="multiply_const_ff_1"/>
</usesport>
<providesport>
<providesidentifier>dataFloat</providesidentifier>
<componentinstantiationref refid="DataConverter_1"/>
</providesport>
</connectinterface>
<connectinterface id="connection_4">
<usesport>
<usesidentifier>dataFloat_Out</usesidentifier>
<componentinstantiationref refid="TuneFilterDecimate_2"/>
</usesport>
<providesport>
<providesidentifier>float_in</providesidentifier>
<componentinstantiationref refid="multiply_const_ff_1"/>
</providesport>
</connectinterface>
<connectinterface id="connection_5">
<usesport>
<usesidentifier>dataFloat_out</usesidentifier>
<componentinstantiationref refid="DataConverter_2"/>
</usesport>
<providesport>
<providesidentifier>dataFloat_In</providesidentifier>
<componentinstantiationref refid="TuneFilterDecimate_1"/>
</providesport>
</connectinterface>
<connectinterface id="connection_6">
<usesport>
<usesidentifier>dataShort_out</usesidentifier>
<componentinstantiationref refid="DataConverter_1"/>
</usesport>
<providesport>
<providesidentifier>audio_in</providesidentifier>
<componentinstantiationref refid="AudioSink_1"/>
</providesport>
</connectinterface>
</connections>
<usesdevicedependencies>
<usesdevice id="DCE:18964b3d-392e-4b98-a90d-0569b5d46ffe" type="usesUSRP">
<propertyref refid="DCE:cdc5ee18-7ceb-4ae6-bf4c-31f983179b4d" value="FRONTEND"/>
<propertyref refid="DCE:0f99b2e4-9903-4631-9846-ff349d18ecfb" value="USRP"/>
<structref refid="FRONTEND::tuner_allocation">
<simpleref refid="FRONTEND::tuner_allocation::tuner_type" value="RX_DIGITIZER"/>
<simpleref refid="FRONTEND::tuner_allocation::allocation_id" value="usrpAllocation"/>
<simpleref refid="FRONTEND::tuner_allocation::center_frequency" value="102500000"/>
<simpleref refid="FRONTEND::tuner_allocation::bandwidth" value="320000"/>
<simpleref refid="FRONTEND::tuner_allocation::sample_rate" value="250000"/>
<simpleref refid="FRONTEND::tuner_allocation::group_id" value=""/>
<simpleref refid="FRONTEND::tuner_allocation::rf_flow_id" value=""/>
</structref>
</usesdevice>
</usesdevicedependencies>
</softwareassembly>
I tried to reproduce the issue in REDHAWK 1.9 without any luck. I simplified your waveform by removing all connections and components from the waveform except the first DataConverter component. I also kept the USRP_UHD allocation and the connection between the USRP_UHD and the DataConverter. This focuses on the USRP_UHD device without introducing potential issues from the components that were removed. In my testing, data flows from the USRP_UHD device through the DataConverter as expected. Monitoring the USRP_UHD's dataShort_out port yields the following:
Calls/s: 0.9
MB/s: 0.9
Elements/s: 460,000
Average Queue depth: 0%
Time: 0
Which port did you monitor? These values are reasonable considering the sample rate chosen is 250 kHz and each sample is composed of two short int Elements.
I suggest you simplify your waveform as I have done and see if the issues continue. Make sure you are starting the waveform after it's been launched. Monitor the USRP_UHD's dataShort_out port and compare the results with what I've posted above. If the values are similar, the issue you're having is likely a result of one of the components you've removed.
Some additional information about your environment may also help identify the problem. What versions are you using (OS, Redhawk, FrontendInterfaces, USRP_UHD, etc.). What model of USRP are you using?
Using the default CRM 2011 Opportunities by Sales Stage Funnel Chart, how can you get it to show all of the stages in the legend even if there isn't data for each stage? This seems like a simple problem but I'm stumped.
The Chart only presents data retrieved by the Fetch and the Fetch won't necessarily have at least one record for each stage. Additionally the Funnel chart cannot have more than one series.
This is what I came up with but it does not work as a Funnel chart. Swapping to a radar chart at least does something by the layout is worthless for this type of data.
<visualization>
<visualizationid>{BA88CAC2-637F-E011-8E24-00155D840900}</visualizationid>
<name>Opportunities by Sales Stage</name>
<primaryentitytypecode>opportunity</primaryentitytypecode>
<datadescription>
<datadefinition>
<fetchcollection>
<fetch mapping="logical" aggregate="true">
<entity name="opportunity">
<attribute alias="aggregate_column_1" name="opportunityid" aggregate="count" />
<attribute groupby="true" alias="groupby_column" name="salesstagecode">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="1" />
</filter>
</attribute>
<attribute alias="aggregate_column_2" name="opportunityid" aggregate="count">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="200000" />
</filter>
</attribute>
<attribute alias="aggregate_column_3" name="opportunityid" aggregate="count">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="200001" />
</filter>
</attribute>
<attribute alias="aggregate_column_4" name="opportunityid" aggregate="count" >
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="200002" />
</filter>
</attribute>
<attribute alias="aggregate_column_5" name="opportunityid" aggregate="count">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="100000000" />
</filter>
</attribute>
<attribute alias="aggregate_column_6" name="opportunityid" aggregate="count">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="100000001" />
</filter>
</attribute>
<attribute alias="aggregate_column_7" name="opportunityid" aggregate="count" >
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="100000002" />
</filter>
</attribute>
<attribute alias="aggregate_column_8" name="opportunityid" aggregate="count">
<filter type="or">
<condition attribute="salesstagecode" operator="eq" value="100000003" />
</filter>
</attribute>
</entity>
</fetch>
</fetchcollection>
<categorycollection>
<category>
<measurecollection>
<measure alias="aggregate_column_1" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_2" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_3" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_4" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_5" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_6" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_7" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column_8" />
</measurecollection>
</category>
</categorycollection>
</datadefinition>
</datadescription>
<presentationdescription>
<Chart Palette="None" PaletteCustomColors="55,118,193; 197,56,52; 149,189,66; 117,82,160; 49,171,204; 255,136,35; 97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83">
<Series>
<Series ChartType="Funnel" Name="o:salesstagecode,1" Color="55,118,193" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,200000" Color="197,56,52" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,200001" Color="149,189,66" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,200002" Color="117,82,160" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,100000000" Color="49,171,204" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,100000001" Color="255,136,35" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,100000002" Color="97,142,206" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
<Series ChartType="Funnel" Name="o:salesstagecode,100000003" Color="209,98,96" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
<SmartLabelStyle Enabled="True" />
</Series>
</Series>
<ChartAreas>
<ChartArea>
<Area3DStyle Enable3D="True" />
</ChartArea>
</ChartAreas>
<Legends>
<Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
</Legends>
<Titles>
<Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="0, 0, 0"></Title>
</Titles>
</Chart>
</presentationdescription>
<isdefault>false</isdefault>
</visualization>
Does anyone have a better way to do this?
Your approach won't work because, as you mention, the Funnel chart unfortunately doesn't allow multiple series.
If it did, you would also need to add tags around each attribute and filter in order for the filter to work.
I'm assuming your funnel chart shows the sum for each stage, so you could add a dummy record for each of them and make sure those are included in your View. On the dummy record the values are 0, so they won't contribute to the sum. You just need to be a little creative with your Advanced Find when incl. them.
You can see a more advanced approach to adding dummy records here http://crmchartguy.wordpress.com/2013/01/23/include-records-with-no-value-in-charts/
The approach you were taking with your xml would work if you had a stacked column chart instead, although you would need to add the above mentioned tags. You can see an example of that here http://crmchartguy.wordpress.com/2013/03/10/aggregate-total-on-top-of-stacked-column-charts-or-bar-charts-in-ms-crm-2011/