How to solve Google AutoML error: The target column can not contain invalid value for regression - regression

I am trying to do AutoML training for binary-regression on a column with just 2 possible values:
As you can see, it's just either "up" or "down", there is no null or missing value. Seems simple enough but I am getting this error:
Error Messages: The target column nextday_direction can not contain invalid value for regression.
What invalid value is it talking about? Does Google regression training have to be 0 or 1? No distinct value allowed?
Here is my training settings:

Turn out it is indeed have to be numeric, distinct value doesn't work, changed up/down to 0/1 and it works fine.

Related

Different Result with ROUND Function in MySQL

I have a table containing column of type DOUBLE, it has value 2.5 in it. When I provide this as an argument to round function i.e. round(columnName), the result is 2. However, when I pass 2.5 hardcoded to the round function, the result is 3.
Why is the round function not showing correct data when column name is supplied as an argument? Attached are the screenshots of the problem.
As per the comment of #Alvaro. I changed the data type of column from DOUBLE to DECIMAL. And the issue is resolved. Strange but true.
Now the ROUND function is bringing in the correct results.

Access 2016 Table Calculated Field

I have a table containing the following: Five Y/N fields and a calculated field [Priority Results] that totals the number of 'Yeses' from those five y/n fields. I'm trying to create another calculated field that will return a value of Low, Medium or High dependent on the number of boxes that have been checked. [Priority Results] currently returns the values 0 through -5. Low = 0 & -1, Medium = -2, High = -3 or lower. I've tried SEVERAL different versions of If/Then, If/Else, Iif statements and always receive a syntax error. I've read a lot of different sites and the following expression seems to be the most commonly used, but I'm still getting the error. Anyone have any ideas? I've even tried this statement on a non-calculated field and can't get it to work.
IIf([Priority results]<="-1","Low",IIf([Priority results]="-2","Medium",IIf([Priority results]>="-3","High")))
Here are the calculated field [Priority results] properties.
Expression:
[Class Non-Attendance]+[Instructor Referral]+[Late Registration]+[Low Starting GPA]+[Talon Log-in]
Result Type: Long Integer
enter image description here
The part of the table this question relates to has the following fields:
Class Non-Attendance: Yes/No
Instructor Referral: Yes/No
Late Registration: Yes/No
Low Starting GPA: Yes/No
Talon Log-In: Yes/No
Priority Results: Calculated field counting the Yes/No fields above
Priority Outcome: Calculated field (that isn't working) prioritizing based on Priority Results
Don't put parameters for number fields in quotes.
Consider:
IIf(Abs([Priority Results])<=1, "Low", IIf(Abs([Priority Results])=2, "Medium", "High"))
In a query or textbox, expression could be:
Switch(Abs([Priority Results])<=1, "Low", Abs([Priority Results])=2, "Medium", True, "High")
Parts of the question still confuse me, which is why this answer will be brief. You have a calculated field PriorityOutcome based on another calculated field PriorityResults and that is the problem. Access doesn't calculate PriorityResults before calculating PriorityOutcome. Instead Access says PriorityResults doesn't exist yet and passes null to PriorityOutcome resulting in either an error or a silent fail.
There are several fixes you can mix and match. You can repeat the calculation for PriorityResults inside PriorityOutcome: wasteful but often the fastest solution. You can also add a code module with public functions to do part or all of the calculations. Then refer to those public functions in your calculated fields Access intellisense can find public functions.

How do you retrieve the result of a DCount expression from a related textbox for multiple records in a continuous form in MS Access?

Hello I have been trying to return the result of a DCount within an MS Access form. I have a field called "Process" which stores a process such as "Shipping" and Sub-Process field which stores text too e.g. "Engineering". I have another field which needs to store the count of how many shipping processes have a specific sub-process such as answering "how many sub-processes are there for each process?" called txtcountsubprocesses.
The related text field is saved as txtprocess and the count field (the one I can't seem to get right) has the name txtcountsubprocesses. In the Control Source property for txtcountsubprocesses I have the following expression:
=DCount([Sub Process],[LogisticsData],[Process]=txtprocess.text)
I receive the following error message: #Name?
I have tried multiple other ways of programming the DCount however the way mentioned above seems to be the closest I have to a possible answer. I have also checked the spelling of the table headers from [LogisticsData].
Is it possible to solve my problem using a DCount method like this?
Required output (sorry not sure how to put in a proper table):
Process ; Sub-process ; Sub-processCount (3 columns)
Shipping ; Engineering ; 5 (three pieces of related data - the number being what I need to produce)
Shipping ; Medical ; 4 (three pieces of related data - the number being what I need to produce)
Firstly, DCount needs string parameters to identify field and table name.
Secondly, if you want to include something from the current form, you can concatenate those strings, or use a form parameter.
Thirdly, you should almost never use .Text. Use .Value instead. You can only use .Text on controls that have focus.
So, with all these things fixed:
=DCount("[Sub Process]","[LogisticsData]","[Process]='" & txtprocess.Value & "'")
You might want to read into using parameters, since oddities might occur when the value is Null or contains single quotes

SSRS <<expr>> error with sum

I have two equations on the same dataset. One returns an error, the other does not. The equations are as follows:
1) =Sum(IIF(Fields!Service.Value="Dispatch Only", 0, Fields!Charge.Value))
2) =Sum(IIF(Fields!Service.Value="DispatchOnly", 0, Fields!Charge.Value))
Note that the only difference between the two is the fact that I took a space out of the field I'm looking for.
I want a total sum of the entire data set. But then I also need to know what that same sum is, without the "Dispatch Only" values. Obviously, equation #2 doesn't produce any useful information (it's just the sum again), but I added it just to prove I wasn't insane with some very basic typo, like a comma out of place.
What am I doing wrong with equation #1??
This commonly occurs when applying an aggregate on differing data types, which you're unlikely to get unless you have an IIf statement, like in your example.
You're probably getting a mismatch between Charge and 0 (i.e. between the underlying data type of Charge and the integer 0).
To get around this, make sure that 0 is the same data type as Charge, i.e. use something like CDec(0) or CDbl(0) as required.
One other option to consider is to use Nothing in place of 0 - by using the SSRS null value you avoid any data type clashes, but it does have the disadvantage of returning Nothing if there are no matching Dispatch Only rows.

if statement that contains a "round" function

Please fix my if-statement, based on my criteria, listed below. I am getting the error message “the expression you entered contains invalid syntax. You may have entered a comma without a preceding value or identifier”.
Criteria:
1. If mth_sply365 value is greater than “0” and less than “1”, then round to one decimal place.
2. If mth_sply365 value is not greater than “0” and less than “1”, then round to zero decimals.
IIf([u].[mth_sply365] >0 and <1,Round([u].[mth_sply365],1),Round([u].[mth_sply365],0))
Thanks in advance, Nathaniel
I think your statement should be as follows :
IIf([u].[mth_sply365] >0 and [u].[mth_sply365] <1,Round([u].[mth_sply365],1),Round([u].[mth_sply365],0)).
[u].[mth_sply365] should be specified before each condition. Good luck.