I created an lhs object using the function as follows:
am321.lhs <- lxy.lhs(am321.lxy.every4th, k=24, s=0.07, kmin=12, save.hulls=TRUE)
However, when I try to create isopleths by the following call I get an error. I have pasted the console output below:
am321.lhs <- lhs.iso.add(am321.lhs)
Using nearest-neighbor selection mode: Fixed-k
Constructing hulls and hull metrics...
am321.pts26934.k24.s0.07.kmin12
Found a suitable set of nearest neighbors
Identifying the boundary points for each parent point
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100%
Converting boundary points into polygons
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100%
Calculating area and perimeter...Done.
Calculating the time span of each hull...Done.
Identifying enclosed points...Done.
Computing density isopleths
Error in get("hulls2iso.rgeos", 1) : object 'hulls2iso.rgeos' not found
I would be grateful for any help on this.
Thank you
Karpa
I encountered the same error recently and got the following advice from Andy Lyons:
You've encountered a bug in the package. Please update the package to version 1.40 (or later), and it should work.
Check package version
packageVersion("tlocoh")
Update package (if the package is already loaded, you may need to detach it or restart R to update)
update.packages(oldPkgs="tlocoh", repos="http://R-Forge.R-project.org")
Related
I am just getting started with the tutorials of OpenMDAO, I was trying out the Sellar - A Two-Discipline Problem with a Nonlinear Solver tutorial and soon ran into an error. There are three ways included in the website to promote and connect input-output variables, the third method titled "Variable Promotion and Connect Statements" has the class named SellarMDAPromoteConnect. When I try to run the optimization setup, the code throws a runtime error
<model> <class SellarMDAPromoteConnect>: Output not found for response 'obj'
I ran the following in the console:
!openmdao check -c all <_file name_>.py
which shows the first error:
File "D:\softwares\anaconda\anaconda3\lib\site-packages\openmdao\core\system.py", line 3250, in get_responses
key = in_abs = prom2abs_in[name][0]
KeyError: 'obj'
Can anyone kindly explain why this error pops up and how to fix it while using the same class SellarMDAPromoteConnect? I cannot come up with any convincing reason(s) to explain this error. Every line of the code I used is same as given in the website (link attached here), I have attached a screenshot of the code snippet used to run the optimization problem setup, just incase you want to have a look at it
Optimization setup code snippet
Your run script has a namespace detail incorrect. The example you pulled from used a mixture of promotion and connection to be illustrative. The obj variable is computed and owned by the obj_cmp ExecComp. Only two of the inputs (x and z) were promoted. The other two inputs (y1 and y2) were not and neither was the output objective (obj).
To add the objective you would do the following:
# prob.model.add_objective('obj') # wrong scope
prob.model.add_objective('obj_cmp.obj') # correct scope
There are a few ways to easily determine the correct names for variables:
Use the list_outputs method on a group that owns the variables in question.
prob.model.list_outputs(prom_name=True)
gives:
varname val prom_name
-------- ---- -------------
cycle
d1
y1 [1.] d1.y1
d2
y2 [1.] d2.y2
obj_cmp
obj [1.] obj_cmp.obj
con_cmp1
con1 [1.] con_cmp1.con1
con_cmp2
con2 [1.] con_cmp2.con2
If you prefer a more visual layout, the N2 also has the information you want:
I've been trying to run a proc logistic stepwise regression model using an ordinal outcome. Because I am trying to account for the assumption of proportional odds, several of my variables have uneven slopes. So, in my code, I am indicating both equalslopes and unequalslopes, however I continue to get this syntax error.
ERROR 22-322: Syntax error, expecting one of the following: ;, ABSFCONV, AGGREGATE, ALPHA, BACKWARD, BEST, BINWIDTH, BUILDRULE, CL,
CLODDS, CLPARM, CODING, CONVERGE, CORRB, COVB, CT, CTABLE, DETAILS, DSCALE, EXPB, FAST, FCONV, FIRTH, GCONV,
HIERARCHY, INCLUDE, INFLUENCE, IPLOTS, ITPRINT, L, LACKFIT, LINK, MAXITER, MAXSTEP, NOCHECK, NODUMMYPRINT, NOFIT,
NOINT, NOLOGSCALE, OFFSET, OUTROC, PARMLABEL, PCORR, PEVENT, PL, PLCL, PLCONV, PLRL, PPROB, PSCALE, RIDGING,
RISKLIMITS, ROCEPS, RSQUARE, SCALE, SELECTION, SEQUENTIAL, SINGULAR, SLE, SLENTRY, SLS, SLSTAY, START, STB, STEPWISE,
STOP, STOPRES, TECHNIQUE, UNEQUALSLOPES, WALDCL, WALDRL, XCONV.
ERROR 76-322: Syntax error, statement will be ignored.
I am sure I am putting in my code correct, even when I do not state any specific variables for either the equalslopes option and the unequalslopes option, I continue to receive the same message. Here is my code below.
proc logistic data=upper_limit;
class Profitrank dealer_state_id dlr_zip RUCA2 area_description/ param = ref;
model profitrank = num_booked num_approved num_apps bk_conversion_rt appr_rt num_new num_used Percentage_of_New Average_Vehicle_Age average_dti
average_pti average_revolving_balance average_revolving_balance_rate average_public_records average_inquiries average_inquiry_6_months
average_open_rev_trades average_term average_major_derog average_minor_derog average_open_install average_scorecard average_fico_score average_app_risk_score
average_LTV average_consumer_rate average_truist_rate Dealer_state_ID RUCA2/link=clogit selection=stepwise SLE=0.10 SLE=0.10 EQUALSLOPES=(appr_rt average_pti average_public_records
average_open_rev_trades average_major_derog average_minor_derog average_open_install average_fico_score average_app_risk_score RUCA2) unequalslopes details maxiter=500;
run;```
Any help with this would be greatly appreciated!
You need to use options that work with the version of SAS you are using. The EQUALSLOPES option was added in SAS/STAT 14.1 which is SAS 9.4m3 released in 2015.
Note that SAS is a subscription license. Which means you have already paid for the right to use the newest version. Get someone at your company to install the newest version of SAS. You might also need to use a newer version of Enterprise Guide to take advantage of the new features.
I am trying to perform a basic merge operation to add nonexistent nodes and relationships to my graph by going through a csv file row by row. I'm using py2neo v4, and because there is basically no documentation or examples of how to use py2neo, I can't figure out how to actually get it done. This isn't my real code (it's very complicated to handle many different cases) but its structure is basically like this:
import py2neo as pn
graph = pn.Graph("bolt://localhost:###/", user="neo4j", password="py2neoSux")
matcher = pn.NodeMatcher(graph)
tx = graph.begin()
if (matcher.match("Prefecture", name="foo").first()) == None):
previousNode = pn.Node("Type1", name="fo0", yc=1)
else:
previousNode = matcher.match("Prefecture", name="foo").first())
thisNode = pn.Node("Type2", name="bar", yc=1)
tx.merge(previousNode)
tx.merge(thisNode)
theLink = pn.Relationship(thisNode, "PARTOF", previousNode)
tx.merge(theLink)
tx.commit()
Currently this throws the error
ValueError: Primary label and primary key are required for MERGE operation
the first time it needs to merge a node that it hasn't found (i.e., when creating a node). So then I change the line to:
tx.merge(thisNode,primary_label=list(thisNode.labels)[0], primary_key="name")
Which gives me the error IndexError: list index out of range from somewhere deep in the py2neo source code (....site-packages\py2neo\internal\operations.py", line 168, in merge_subgraph at node = nodes[i]). I tried to figure out what was going wrong there, but I couldn't decipher where the nodes list come from through various connections to other commands.
So, it currently matches and creates a few nodes without problem, but at some point it will match until it needs to create and then fails in trying to create that node (even though it is using the same code and doing the same thing under the same circumstances in a loop). It made it through all 20 rows in my sample once, but usually stops on the row 3-5.
I thought it had something to do with the transactions (see comments), but I get the same problem when I merge directly on the graph. Maybe it has to do with the py2neo merge function finding more identities for nodes than nodes. Maybe there is something wrong with how I specified my primarily label and/or key.
Because this error and code are opaque I have no idea how to move forward.
Anybody have any advice or instructions on merging nodes with py2neo?
Of course I'd like to know how to fix my current problem, but more generally I'd like to learn how to use this package. Examples, instructions, real documentation?
I am having a similar problem and just got done ripping my hair out to figure out what was wrong! SO! What I learned was that at least in my case.. and maybe yours too since we got similar error messages and were doing similar things. The problem lied for me in that I was trying to create a Node with a __primarykey__ field that had a different field name than the others.
PSEUDO EXAMPLE:
# in some for loop or complex code
node = Node("Example", name="Test",something="else")
node.__primarykey__ = "name"
<code merging or otherwise creating the node>
# later on in the loop you might have done something like this cause the field was null
node = Node("Example", something="new")
node.__primarykey__ = "something"
I hope this helps and was clear I'm still recovering from wrapping my head around things. If its not clear let me know and I'll revise.
Good luck.
Hi I'm currently searching for studies or tutorials where they used tensorflow API to do something (alarm, save video, print something, etc.) when a certain object is detected. I don't know if I'm bad at using google cause I can't seem to find what I want. Hope you guys can give me links regarding this. Thanks in advance :)
go into the visualize_utils.py in the utils folder under the current model directory and start tweaking with it.
if you want to tweak with perse print something if you detect an object whose label is already known, you may want to do the following under
def visualize_boxes_and_labels_on_image_array(.....):
Say if you want to print the current object to python command line modify the following section of above mention method as follows
else:
if not agnostic_mode:
if classes[i] in category_index.keys():
class_name = category_index[classes[i]]['name']
if (class_name == 'person'):
print(class_name + "Detected")
Please correct me / add upon to my answer ! Thanks and Welcome in advance!
The method draw_bounding_box_on_image - Line 131 which draws bounding box for each detected object. You can call another methods to manipulate the detected object etc. inside of draw_bounding_box_on_image method.
https://www.tensorflow.org/tutorials/
here you go
This will help i guess
I am trying spatial search in SOLR 5.0 , My system are up and running, but sometimes I am coming across this error, I have google it around but found no explanation as such, anyone please help me with this.
My Error
because: com.spatial4j.core.exception.InvalidShapeException: Self-intersection at or near point
(13.143009111281323, 80.07316589355469, NaN)","code":400}})
My Query :
Intersects(POLYGON((13.142340452070176 80.07522583007812,13.141003126359843 80.079345703125
,13.141003126359843 80.08621215820312,13.1383284530778 80.09445190429688,13.1383284530778 80.101318359375
,13.136991105507466 80.11367797851562,13.131641642380112 80.14114379882812,13.128966867118496 80.15350341796875
,13.126292062732247 80.16311645507812,13.124954649619115 80.17135620117188,13.111580118251648 80.17135620117188
,13.099542418228534 80.15899658203125,13.095529720741494 80.10543823242188,13.09820485966459 80.10543823242188
,13.099542418228534 80.10406494140625,13.102217513557752 80.10406494140625,13.103555050321653 80.10269165039062
,13.106230102044576 80.101318359375,13.114255082724767 80.101318359375,13.1155925540513 80.09994506835938
,13.118267474880913 80.09857177734375,13.119604924382593 80.09857177734375,13.124954649619115 80.0958251953125
,13.127629468565612 80.0958251953125,13.130304258390225 80.09445190429688,13.131641642380112 80.09445190429688
,13.134316388511614 80.09307861328125,13.136991105507466 80.09033203125,13.139665793362148 80.0848388671875
,13.141003126359843 80.08346557617188,13.141003126359843 80.08209228515625,13.142340452070176 80.08071899414062
,13.142340452070176 80.0738525390625,13.14367777049247 80.07247924804688,13.14367777049247 80.07110595703125
,13.142340452070176 80.07522583007812)))distErrPct=0
Well, let's take a look at the polygon:
Looks reasonable, but pretty busy in the lower right:
There you can see the self-intersection, and self-intersecting polygons aren't acceptable (see Solr Spatial search with self-intersecting polygons for some more information on that).
It looks to me like you're trying to be more precise than your application is capable of.